@bitget-ai/getagent-skill 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +15 -4
- package/.claude-plugin/plugin.json +1 -1
- package/VERSION +1 -1
- package/package.json +1 -1
- package/skills/getagent/SKILL.md +169 -6
- package/skills/getagent/examples/btc-ema-cross-demo/backtest.yaml +4 -0
- package/skills/getagent/references/api/confirm.md +59 -0
- package/skills/getagent/references/api/index.md +9 -7
- package/skills/getagent/references/api/publish.md +13 -6
- package/skills/getagent/references/api/run.md +5 -5
- package/skills/getagent/references/api/upload.md +22 -4
- package/skills/getagent/references/backtest-engine.md +82 -152
- package/skills/getagent/references/package-schema.md +31 -8
- package/skills/getagent/references/sdk/backtest/catalog.md +17 -2
- package/skills/getagent/references/sdk/data/arxiv.md +8 -10
- package/skills/getagent/references/sdk/data/catalog.md +3 -8
- package/skills/getagent/references/sdk/data/commodity.md +71 -39
- package/skills/getagent/references/sdk/data/coverage.md +0 -3
- package/skills/getagent/references/sdk/data/crypto.md +1583 -402
- package/skills/getagent/references/sdk/data/currency.md +55 -15
- package/skills/getagent/references/sdk/data/derivatives.md +161 -50
- package/skills/getagent/references/sdk/data/economy.md +911 -259
- package/skills/getagent/references/sdk/data/equity.md +1719 -393
- package/skills/getagent/references/sdk/data/etf.md +550 -64
- package/skills/getagent/references/sdk/data/famafrench.md +38 -50
- package/skills/getagent/references/sdk/data/fixedincome.md +574 -139
- package/skills/getagent/references/sdk/data/imf_utils.md +0 -8
- package/skills/getagent/references/sdk/data/index.md +18 -32
- package/skills/getagent/references/sdk/data/news.md +128 -58
- package/skills/getagent/references/sdk/data/regulators.md +108 -43
- package/skills/getagent/references/sdk/data/sentiment.md +188 -34
- package/skills/getagent/references/sdk/data/uscongress.md +13 -21
- package/skills/getagent/references/sdk/data/web_search.md +3 -7
- package/skills/getagent/references/sdk/data/wikipedia.md +12 -18
- package/skills/getagent/references/sdk.md +14 -5
- package/skills/getagent/scripts/validate.py +109 -3
- package/skills/getagent/scripts/version_check.sh +13 -12
- package/skills/getagent/references/sdk/data/playbook-supported.md +0 -9871
|
@@ -93,9 +93,10 @@ Required sections:
|
|
|
93
93
|
- `class`
|
|
94
94
|
- optional `config_class`
|
|
95
95
|
- optional `config`
|
|
96
|
-
- `execution`
|
|
97
|
-
- optional `start`
|
|
98
|
-
|
|
96
|
+
- `execution` (optional)
|
|
97
|
+
- optional `start` / `end` — bar filters applied when present; omit them to
|
|
98
|
+
replay every bar you fetched. The window is the author's choice and the
|
|
99
|
+
platform never polices its presence, length, or recency.
|
|
99
100
|
|
|
100
101
|
## Execution Model
|
|
101
102
|
|
|
@@ -138,7 +139,9 @@ instrument frames into the strategy through `set_feature_frames(...)` or
|
|
|
138
139
|
| `result.sharpe_ratio` | float | Sharpe ratio |
|
|
139
140
|
| `result.max_drawdown_pct` | float | Max drawdown % |
|
|
140
141
|
| `result.win_rate` | float | Win rate fraction (0.0-1.0) |
|
|
141
|
-
| `result.total_trades` | int |
|
|
142
|
+
| `result.total_trades` | int | Filled execution count when fills are available |
|
|
143
|
+
| `result.fill_count` | int | Filled execution count |
|
|
144
|
+
| `result.position_count` | int | Nautilus position row count |
|
|
142
145
|
| `result.profit_factor` | float | Profit factor |
|
|
143
146
|
| `result.summary` | dict | Stable normalized account-level summary |
|
|
144
147
|
| `result.raw` | dict | Full Nautilus-derived output |
|
|
@@ -244,185 +247,112 @@ Inspect:
|
|
|
244
247
|
- `result.raw["reports"]["fills"]`
|
|
245
248
|
- `result.raw["reports"]["positions"]`
|
|
246
249
|
|
|
247
|
-
##
|
|
250
|
+
## Backtest Output Contract
|
|
248
251
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
+
When `main_backtest.py` writes output files, the platform Runner collects them
|
|
253
|
+
and merges them into the run record. Getting this wrong causes publish failures
|
|
254
|
+
("缺少可发布的真实 equity curve") or incorrect metrics display.
|
|
252
255
|
|
|
253
|
-
|
|
256
|
+
### Required Output Files
|
|
254
257
|
|
|
255
|
-
|
|
258
|
+
| File | Purpose | Size |
|
|
259
|
+
| ---- | ------- | ---- |
|
|
260
|
+
| `output/backtest_report.json` | Nautilus raw result (summary, stats, reports, config) | Keep small — omit equity curve from JSON |
|
|
261
|
+
| `output/equity_curve.csv` | Lightweight curve the Runner always reads reliably | ~100 bytes/point |
|
|
256
262
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
# Backtest Engine
|
|
263
|
+
The Runner reads **both** files. If `backtest_report.json` is too large (common
|
|
264
|
+
with 3+ month runs), `proxy.read_file()` may silently fail. The CSV is a
|
|
265
|
+
guaranteed fallback.
|
|
261
266
|
|
|
262
|
-
|
|
267
|
+
### Equity Curve Metadata
|
|
263
268
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
- [Spec Shape](#spec-shape)
|
|
267
|
-
- [Execution Model](#execution-model)
|
|
268
|
-
- [BacktestResult](#backtestresult)
|
|
269
|
-
- [Multi-Instrument Replays](#multi-instrument-replays)
|
|
270
|
-
- [Zero-Trade Diagnostics](#zero-trade-diagnostics)
|
|
271
|
-
- [Chart Generation](#chart-generation)
|
|
272
|
-
|
|
273
|
-
## Basic Usage
|
|
269
|
+
The platform records actual curve metadata such as point count and the first /
|
|
270
|
+
last curve timestamp. It does not require a fixed density.
|
|
274
271
|
|
|
275
272
|
```python
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
bars = data.crypto.futures.kline(symbol="BTCUSDT", interval="1h", exchange="binance")
|
|
279
|
-
ohlcv = data.to_dataframe(bars, datetime_index="date")
|
|
280
|
-
|
|
281
|
-
result = backtest.run(
|
|
282
|
-
ohlcv_data={"BTCUSDT.BINANCE": ohlcv},
|
|
283
|
-
spec=runtime.backtest_spec,
|
|
284
|
-
)
|
|
285
|
-
chart_path = backtest.generate_chart(result)
|
|
273
|
+
expected_points = ceil((execution.end - execution.start).total_seconds() / interval_seconds)
|
|
286
274
|
```
|
|
287
275
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
### Use the engine when:
|
|
293
|
-
|
|
294
|
-
- the core trading decision is deterministic
|
|
295
|
-
- the decision can be reconstructed from historical data
|
|
296
|
-
- strategy logic can be expressed as a NautilusTrader `Strategy` subclass
|
|
297
|
-
- any LLM usage is outside the trade decision path
|
|
298
|
-
|
|
299
|
-
### Do not use the engine as public evidence when:
|
|
300
|
-
|
|
301
|
-
- open-ended LLM reasoning decides whether to trade
|
|
302
|
-
- the strategy depends on live chat, memory, or search context
|
|
303
|
-
- the decision cannot be reconstructed at the original point in time
|
|
304
|
-
|
|
305
|
-
Typical outcome:
|
|
276
|
+
That value may still appear as diagnostic metadata in older runs, but it is not
|
|
277
|
+
a publish gate. Do not fabricate forward-filled points just to make the curve
|
|
278
|
+
look dense.
|
|
306
279
|
|
|
307
|
-
|
|
308
|
-
- `backtest_support: none` -> use paper or live evidence instead
|
|
309
|
-
|
|
310
|
-
## Spec Shape
|
|
311
|
-
|
|
312
|
-
The managed engine expects an explicit Nautilus replay spec from `backtest.yaml`,
|
|
313
|
-
usually read through `runtime.backtest_spec`.
|
|
314
|
-
|
|
315
|
-
Required sections:
|
|
316
|
-
|
|
317
|
-
- `venue`
|
|
318
|
-
- `name`
|
|
319
|
-
- `account_type`
|
|
320
|
-
- `oms_type`
|
|
321
|
-
- `starting_balances`
|
|
322
|
-
- `instrument` or `instruments`
|
|
323
|
-
- `id`
|
|
324
|
-
- `kind`
|
|
325
|
-
- `raw_symbol` or `symbol`
|
|
326
|
-
- `base_currency`
|
|
327
|
-
- `quote_currency`
|
|
328
|
-
- `price_precision`
|
|
329
|
-
- `size_precision`
|
|
330
|
-
- `price_increment`
|
|
331
|
-
- `size_increment`
|
|
332
|
-
- `bar_type`
|
|
333
|
-
- perpetual instruments also need `settlement_currency`
|
|
334
|
-
- `strategy`
|
|
335
|
-
- `module`
|
|
336
|
-
- `class`
|
|
337
|
-
- optional `config_class`
|
|
338
|
-
- optional `config`
|
|
339
|
-
- `execution`
|
|
340
|
-
- optional `start`
|
|
341
|
-
- optional `end`
|
|
280
|
+
### Metrics Merge Priority (Critical)
|
|
342
281
|
|
|
343
|
-
|
|
282
|
+
The Runner builds `metrics_output` with this merge order:
|
|
344
283
|
|
|
345
|
-
|
|
284
|
+
```python
|
|
285
|
+
merged_metrics = dict(backtest_report) # report is BASE
|
|
286
|
+
for key, value in signal_metrics.items():
|
|
287
|
+
merged_metrics.setdefault(key, value) # signal only fills gaps
|
|
288
|
+
```
|
|
346
289
|
|
|
347
|
-
|
|
348
|
-
2. `backtest.run()` normalizes each DataFrame into OHLCV bars
|
|
349
|
-
3. the engine builds Nautilus venue + instrument definitions from `backtest.yaml`
|
|
350
|
-
4. `BarDataWrangler` converts DataFrames into Nautilus bars
|
|
351
|
-
5. the author's `Strategy` subclass is imported from `src/**`
|
|
352
|
-
6. Nautilus `BacktestEngine` runs the replay
|
|
353
|
-
7. the platform normalizes summary metrics and preserves the deeper reports
|
|
290
|
+
**`setdefault` does not override existing keys** — even if they are `null`.
|
|
354
291
|
|
|
355
|
-
|
|
356
|
-
|
|
292
|
+
`result.raw` from the engine has `result.update(summary)` applied, which
|
|
293
|
+
flattens `net_pnl`, `total_return_pct`, `starting_balance` etc. to the top
|
|
294
|
+
level. These engine-level values may be `null` or denominated by
|
|
295
|
+
`venue.starting_balances` (account basis) rather than `margin_budget` (strategy
|
|
296
|
+
basis).
|
|
357
297
|
|
|
358
|
-
-
|
|
359
|
-
- `bar_type`
|
|
360
|
-
- `instrument_ids`
|
|
361
|
-
- `bar_types`
|
|
298
|
+
**You must override these top-level keys before writing the JSON:**
|
|
362
299
|
|
|
363
|
-
|
|
300
|
+
```python
|
|
301
|
+
# Compute correct absolute USDT values
|
|
302
|
+
net_pnl = ending_total - initial_capital
|
|
303
|
+
strategy_return_pct = net_pnl / initial_capital * 100.0
|
|
364
304
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
305
|
+
# Override engine values so backend merge picks up correct numbers
|
|
306
|
+
raw["net_pnl"] = round(net_pnl, 4)
|
|
307
|
+
raw["total_return_pct"] = round(strategy_return_pct, 4)
|
|
308
|
+
raw["starting_balance"] = initial_capital
|
|
368
309
|
|
|
369
|
-
|
|
310
|
+
# Write files
|
|
311
|
+
(out_dir / "backtest_report.json").write_text(json.dumps(raw, default=str))
|
|
312
|
+
```
|
|
370
313
|
|
|
314
|
+
Without this, the platform's `_apply_strategy_basis_metrics` will compute
|
|
315
|
+
`total_return_pct = net_pnl / margin_budget * 100` using the engine's
|
|
316
|
+
potentially wrong `net_pnl`, producing incorrect display values.
|
|
371
317
|
|
|
372
|
-
|
|
373
|
-
| ------------------------- | ----- | ---------------------------- |
|
|
374
|
-
| `result.total_return_pct` | float | Account return % using the replay starting balance |
|
|
375
|
-
| `result.sharpe_ratio` | float | Sharpe ratio |
|
|
376
|
-
| `result.max_drawdown_pct` | float | Max drawdown % |
|
|
377
|
-
| `result.win_rate` | float | Win rate fraction (0.0-1.0) |
|
|
378
|
-
| `result.total_trades` | int | Total closed position count |
|
|
379
|
-
| `result.profit_factor` | float | Profit factor |
|
|
380
|
-
| `result.summary` | dict | Stable normalized account-level summary |
|
|
381
|
-
| `result.raw` | dict | Full Nautilus-derived output |
|
|
318
|
+
### Equity Curve CSV Format
|
|
382
319
|
|
|
320
|
+
```csv
|
|
321
|
+
timestamp,value,nav
|
|
322
|
+
2026-03-01T00:00:00,1000.0,1.0
|
|
323
|
+
2026-03-01T01:00:00,1002.5,1.0025
|
|
324
|
+
...
|
|
325
|
+
```
|
|
383
326
|
|
|
384
|
-
`
|
|
327
|
+
Do **not** embed the equity curve in `backtest_report.json` (`reports.equity_curve`).
|
|
328
|
+
The Runner reads `equity_curve.csv` independently and attaches it to the report
|
|
329
|
+
via `_attach_equity_curve_to_report`. Keeping the curve out of the JSON reduces
|
|
330
|
+
file size and prevents read failures for long backtest windows.
|
|
385
331
|
|
|
386
|
-
|
|
387
|
-
- `stats`
|
|
388
|
-
- `reports`
|
|
389
|
-
- `config`
|
|
332
|
+
### Correct Execution Order
|
|
390
333
|
|
|
391
|
-
|
|
334
|
+
```
|
|
335
|
+
1. Run backtest.run()
|
|
336
|
+
2. Build an equity curve from real replay/account values — never fabricate
|
|
337
|
+
or forward-fill points
|
|
338
|
+
3. Compute net_pnl from account report
|
|
339
|
+
4. Override raw top-level metrics
|
|
340
|
+
5. Write backtest_report.json (without equity curve)
|
|
341
|
+
6. Write equity_curve.csv
|
|
342
|
+
7. runtime.emit_signal() with correct metrics
|
|
343
|
+
```
|
|
392
344
|
|
|
393
|
-
|
|
345
|
+
### `csv` Module Is Blocked
|
|
394
346
|
|
|
395
|
-
|
|
347
|
+
The sandbox blocks the `csv` stdlib module. Write CSV manually:
|
|
396
348
|
|
|
397
349
|
```python
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
},
|
|
403
|
-
spec=runtime.backtest_spec,
|
|
404
|
-
)
|
|
350
|
+
csv_lines = ["timestamp,value,nav"]
|
|
351
|
+
for point in equity_curve:
|
|
352
|
+
csv_lines.append(f"{point.get('timestamp','')},{point.get('value','')},{point.get('nav','')}")
|
|
353
|
+
(out_dir / "equity_curve.csv").write_text("\n".join(csv_lines) + "\n", encoding="utf-8")
|
|
405
354
|
```
|
|
406
355
|
|
|
407
|
-
The engine does not synthesize cross-instrument logic for you. Multi-instrument
|
|
408
|
-
behavior belongs in the author's Nautilus strategy code.
|
|
409
|
-
|
|
410
|
-
## Zero-Trade Diagnostics
|
|
411
|
-
|
|
412
|
-
If `result.total_trades == 0`, common causes are:
|
|
413
|
-
|
|
414
|
-
1. bars were filtered out by `execution.start` / `execution.end`
|
|
415
|
-
2. the strategy never subscribed to the declared `bar_type`
|
|
416
|
-
3. instrument IDs in strategy config do not match the spec
|
|
417
|
-
4. order sizing is invalid for the declared increment / lot size
|
|
418
|
-
|
|
419
|
-
Inspect:
|
|
420
|
-
|
|
421
|
-
- `result.raw["config"]`
|
|
422
|
-
- `result.raw["reports"]["orders"]`
|
|
423
|
-
- `result.raw["reports"]["fills"]`
|
|
424
|
-
- `result.raw["reports"]["positions"]`
|
|
425
|
-
|
|
426
356
|
## Chart Generation
|
|
427
357
|
|
|
428
358
|
```python
|
|
@@ -357,15 +357,38 @@ Sections:
|
|
|
357
357
|
| `venue` | mapping | Venue name, account type, OMS type, and starting balances |
|
|
358
358
|
| `instrument` or `instruments` | mapping or list[mapping] | Explicit instrument definitions and `bar_type` declarations |
|
|
359
359
|
| `strategy` | mapping | Author strategy module/class entry plus config payload |
|
|
360
|
-
| `execution` | mapping | Optional replay window
|
|
360
|
+
| `execution` | mapping | Optional replay window filters `start` and `end` |
|
|
361
361
|
| `data_requirements` | mapping | Optional replay data contract such as required enriched bar columns |
|
|
362
362
|
|
|
363
363
|
|
|
364
|
+
`execution.start` and `execution.end` are optional bar filters: when present
|
|
365
|
+
the engine drops bars outside the window before replay; when omitted the
|
|
366
|
+
replay covers every bar the strategy fetched. The window is entirely the
|
|
367
|
+
author's choice — the platform never polices window presence, length, or
|
|
368
|
+
recency. Pick whatever range the strategy needs; if a single fetch cannot
|
|
369
|
+
cover it, batch history requests. The only hard rule is honesty: the replay
|
|
370
|
+
must run on real bars, and metrics/curves must come from the actual run.
|
|
371
|
+
|
|
372
|
+
Symbols are part of the package contract. Keep `manifest.trading_symbols`,
|
|
373
|
+
`display_name`, `description`, README, `backtest.yaml` instrument symbols, data
|
|
374
|
+
calls, and emitted signal symbols aligned. If a user submits a typo such as
|
|
375
|
+
`TCUSDT` and you correct it to `BTCUSDT`, the package must be renamed and the
|
|
376
|
+
README/final summary must explicitly say the submitted symbol was corrected to
|
|
377
|
+
the supported symbol. Never publish a package whose title claims one symbol
|
|
378
|
+
while its backtest uses another.
|
|
379
|
+
|
|
380
|
+
Do not put `provider` anywhere in `backtest.yaml`. The managed runtime chooses
|
|
381
|
+
the DataSDK provider for the deployment; package authors declare symbols,
|
|
382
|
+
venues, intervals, instruments, and feature requirements only.
|
|
383
|
+
|
|
364
384
|
Optional `data_requirements.required_bar_fields` lets a deterministic strategy
|
|
365
385
|
declare extra normalized bar columns it expects in addition to core OHLCV.
|
|
366
386
|
These names should use lower snake case to match the replay engine's normalized
|
|
367
387
|
DataFrame columns, for example `quote_volume`, `trade_count`, or
|
|
368
|
-
`taker_buy_volume`.
|
|
388
|
+
`taker_buy_volume`. Every field listed here must also appear in `src/**` code
|
|
389
|
+
and be created by `getagent.backtest.build_feature_frame(...)` or equivalent
|
|
390
|
+
before calling `backtest.run(...)`; otherwise validation rejects the package as a
|
|
391
|
+
custom bar fields mismatch.
|
|
369
392
|
|
|
370
393
|
Every backtest instrument must declare explicit `maker_fee` and `taker_fee`.
|
|
371
394
|
Do not rely on zero-fee defaults. High-frequency Playbooks can look profitable
|
|
@@ -376,12 +399,12 @@ contract assumption.
|
|
|
376
399
|
|
|
377
400
|
Data coverage is part of the package contract. If a strategy requires enriched
|
|
378
401
|
columns such as `quote_volume`, `taker_buy_ratio`, open interest, funding, or
|
|
379
|
-
liquidation data, author code must prove that the selected DataSDK
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
the run with a clear error.
|
|
402
|
+
liquidation data, author code must prove that the selected DataSDK endpoint,
|
|
403
|
+
symbol, and interval returns enough rows for the claimed replay window and the
|
|
404
|
+
exact fields used by the strategy. Do not pass `provider=...` to `getagent.data`
|
|
405
|
+
calls. Do not silently fill a missing decision feature with constants such as
|
|
406
|
+
`0`, `0.5`, or `False` and still claim a valid backtest. If a feature is
|
|
407
|
+
degraded, expose that in metrics/meta or fail the run with a clear error.
|
|
385
408
|
|
|
386
409
|
Large multi-symbol backtests must batch data fetches instead of issuing one
|
|
387
410
|
tight loop over every symbol and endpoint. If a Playbook scans many symbols
|
|
@@ -75,7 +75,8 @@ Parameters:
|
|
|
75
75
|
- `venue`
|
|
76
76
|
- `instrument` or `instruments`
|
|
77
77
|
- `strategy`
|
|
78
|
-
- optional `execution`
|
|
78
|
+
- optional `execution.start` / `execution.end` bar filters (the replay
|
|
79
|
+
window is the author's choice; omit to replay every fetched bar)
|
|
79
80
|
- optional `data_requirements.required_bar_fields`
|
|
80
81
|
|
|
81
82
|
### Generate a chart
|
|
@@ -98,6 +99,8 @@ Behavior:
|
|
|
98
99
|
- `win_rate`
|
|
99
100
|
- `profit_factor`
|
|
100
101
|
- `total_trades`
|
|
102
|
+
- `fill_count`
|
|
103
|
+
- `position_count`
|
|
101
104
|
- `summary`
|
|
102
105
|
- `raw`
|
|
103
106
|
|
|
@@ -178,8 +181,19 @@ runtime.emit_signal(
|
|
|
178
181
|
|
|
179
182
|
- Use `runtime.backtest_spec` as the default source of replay configuration
|
|
180
183
|
- Keep public backtest claims tied to deterministic strategy logic
|
|
184
|
+
- Do not pass `provider=...` to `getagent.data` calls; the managed DataSDK
|
|
185
|
+
provider is selected by the platform
|
|
186
|
+
- The `backtest.yaml.execution.start` / `execution.end` window is optional and
|
|
187
|
+
entirely the author's choice — the platform never polices it. When you do
|
|
188
|
+
declare one, verify the selected endpoint returns real bars inside it
|
|
189
|
+
- Keep `manifest.trading_symbols`, display text, README, `backtest.yaml`
|
|
190
|
+
instruments, data calls, and emitted signal symbols aligned. If you correct a
|
|
191
|
+
typo or replace an unavailable symbol, rename the package/title and explain
|
|
192
|
+
the correction.
|
|
181
193
|
- Declare enriched replay column dependencies in
|
|
182
194
|
`backtest.yaml -> data_requirements.required_bar_fields`
|
|
195
|
+
- Every required replay field must be created and referenced in `src/**`; remove
|
|
196
|
+
the declaration if the strategy no longer reads that feature
|
|
183
197
|
- Use `prepare_frame()` / `build_feature_frame()` to standardize multi-endpoint
|
|
184
198
|
replay assembly instead of open-coded timestamp joins
|
|
185
199
|
- Expect `backtest.run()` to fail fast when declared replay columns are missing
|
|
@@ -194,7 +208,8 @@ runtime.emit_signal(
|
|
|
194
208
|
- Strategy classes may import `nautilus_trader`; Playbook code must not import
|
|
195
209
|
legacy backtest engines directly
|
|
196
210
|
- Do not use `backtest.run()` as fake evidence for `llm_bounded` strategies
|
|
197
|
-
- Treat `result.total_trades == 0` as
|
|
211
|
+
- Treat `result.total_trades == 0` as an honest no-trade outcome for the
|
|
212
|
+
selected window; do not loosen strategy thresholds just to force trades
|
|
198
213
|
- Prefer `generate_chart(result)` over writing ad hoc chart files yourself
|
|
199
214
|
- Do not emit `metrics=result.summary` directly for user-visible backtest
|
|
200
215
|
results when the strategy has a configured budget. Convert `net_pnl` to
|
|
@@ -12,7 +12,7 @@ are callable through the DataSDK wrapper.
|
|
|
12
12
|
### `arxiv.search`
|
|
13
13
|
|
|
14
14
|
```python
|
|
15
|
-
data.arxiv.search(query=None, max_results=10, page=1, sort_by='relevance', sort_order='descending', search_field='all', category=None
|
|
15
|
+
data.arxiv.search(query=None, max_results=10, page=1, sort_by='relevance', sort_order='descending', search_field='all', category=None)
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Summary: Search
|
|
@@ -22,7 +22,6 @@ Summary: Search
|
|
|
22
22
|
| Endpoint ID | `arxiv.search` |
|
|
23
23
|
| HTTP | `GET` |
|
|
24
24
|
| Path | `/inner/v1/agent-data/arxiv/search` |
|
|
25
|
-
| Default provider | `arxiv` |
|
|
26
25
|
| SDK | `supported` |
|
|
27
26
|
| Host | `supported` |
|
|
28
27
|
| Notes | - |
|
|
@@ -31,11 +30,10 @@ Summary: Search
|
|
|
31
30
|
|
|
32
31
|
| Param | Required | Type | Default | Notes |
|
|
33
32
|
|---|---|---|---|---|
|
|
34
|
-
| `query` | `no` | `string | null` | `-` | Search query string.
|
|
35
|
-
| `max_results` | `no` | `integer` | `10` | Maximum number of results.
|
|
36
|
-
| `page` | `no` | `integer` | `1` | Page number, starting at 1.
|
|
37
|
-
| `sort_by` | `no` | `string` | `relevance` | Sort by relevance, last updated date, or submitted date.
|
|
38
|
-
| `sort_order` | `no` | `string` | `descending` | Sort direction.
|
|
39
|
-
| `search_field` | `no` | `string` | `all` | Field to search: all, ti (title), au (author), abs (abstract), cat (category).
|
|
40
|
-
| `category` | `no` | `string | null` | `-` | Filter by arXiv subject category, e.g. 'cs.AI', 'q-fin.TR'.
|
|
41
|
-
| `provider` | `no` | `string` | `arxiv` | - |
|
|
33
|
+
| `query` | `no` | `string | null` | `-` | Search query string. |
|
|
34
|
+
| `max_results` | `no` | `integer` | `10` | Maximum number of results. |
|
|
35
|
+
| `page` | `no` | `integer` | `1` | Page number, starting at 1. |
|
|
36
|
+
| `sort_by` | `no` | `string` | `relevance` | Sort by relevance, last updated date, or submitted date. |
|
|
37
|
+
| `sort_order` | `no` | `string` | `descending` | Sort direction. |
|
|
38
|
+
| `search_field` | `no` | `string` | `all` | Field to search: all, ti (title), au (author), abs (abstract), cat (category). |
|
|
39
|
+
| `category` | `no` | `string | null` | `-` | Filter by arXiv subject category, e.g. 'cs.AI', 'q-fin.TR'. |
|
|
@@ -7,10 +7,8 @@ Playbook creator source tree.
|
|
|
7
7
|
|
|
8
8
|
## Read order
|
|
9
9
|
|
|
10
|
-
1.
|
|
11
|
-
|
|
12
|
-
2. Use the domain files below for exact signatures, defaults, enums,
|
|
13
|
-
provider notes, and parameter details.
|
|
10
|
+
1. Use the domain files below for exact signatures, defaults, enums,
|
|
11
|
+
and parameter details.
|
|
14
12
|
|
|
15
13
|
## Domain index
|
|
16
14
|
|
|
@@ -19,7 +17,7 @@ Playbook creator source tree.
|
|
|
19
17
|
| `Coverage` | [coverage.md](coverage.md) | 3 |
|
|
20
18
|
| `arxiv` | [arxiv.md](arxiv.md) | 1 |
|
|
21
19
|
| `commodity` | [commodity.md](commodity.md) | 7 |
|
|
22
|
-
| `crypto` | [crypto.md](crypto.md) |
|
|
20
|
+
| `crypto` | [crypto.md](crypto.md) | 96 |
|
|
23
21
|
| `currency` | [currency.md](currency.md) | 4 |
|
|
24
22
|
| `derivatives` | [derivatives.md](derivatives.md) | 8 |
|
|
25
23
|
| `economy` | [economy.md](economy.md) | 42 |
|
|
@@ -45,9 +43,6 @@ Playbook creator source tree.
|
|
|
45
43
|
separate sandbox allowlist.
|
|
46
44
|
- For backtests, verify the endpoint returns the fields and time axis your
|
|
47
45
|
strategy needs before declaring those fields in `backtest.yaml`.
|
|
48
|
-
- `provider` may be shown with a default even when the upstream OpenAPI
|
|
49
|
-
marks it as required. That reflects the managed `getagent.data` wrapper,
|
|
50
|
-
which auto-injects the default provider when one is defined.
|
|
51
46
|
- Time ranges use millisecond Unix-epoch `start_time` / `end_time` and the
|
|
52
47
|
canonical datetime column is `time`. The SDK still accepts the legacy
|
|
53
48
|
`start_date` / `end_date` parameters (and exposes a derived `date` field)
|