summarize_backtest_ledger
Summarize a backtest ledger by artifact ID, filtering by symbol, direction, and date range to compute net profit factor, break-even cost, and cost headroom for selected trades vs baseline.
Instructions
Summarize a locally registered immutable backtest ledger by SHA-256 artifact ID. Filter exact symbols, direction, and exit timestamps (UTC, from inclusive/to exclusive); group by symbol/year/month. Requires explicit flat round-trip cost in bps. Recomputes PF from trade-level net wins/losses, never averages PFs. Reports sample break-even flat round-trip cost and signed cost headroom for each population; not an execution guarantee or confidence bound. Returns the entire-ledger baseline, selected subset and excluded complement at the same cost, with complete-case common-opportunity deltas. All filters including dates define selection, not the baseline. Missing outcomes remain missing. No chart access, orders, imports, or arbitrary file paths. Register normalized direction-adjusted gross-bps evidence with the local import CLI first. Optional research_id explicitly enables a local append-only slice exploration journal write before returning metrics; it also records automatic period usage for the entire ledger trade envelope, not underlying price lookbacks. Optional usage_access_id with research_id makes period-record retries idempotent; slice call counts still increment. omitting it is explicitly untracked. Recording failure returns an error without metrics. Counts cover recorded calls for this research ID and artifact only, not all searches or independent trials.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| from | No | ||
| group_by | No | none | |
| direction | No | ||
| artifact_id | Yes | ||
| research_id | No | ||
| exclude_symbols | No | ||
| include_symbols | No | ||
| usage_access_id | No | ||
| round_trip_cost_bps | Yes |