query_backtest_history
Return a time series of {time, value, cash, positionValue, comparisonValue, reservedCollateral} per tick for a completed backtest. Reads from the backtesthistories collection (full minute-resolution; 30-day TTL). Use this to find suspicious single-tick portfolio value jumps without needing the codebase — feed the result through your own jump-detection logic. Cash is derived as value minus Σ(position.quantity × lastPrice). reservedCollateral is the collateral locked by open positions at that tick, as the engine computed it; it reads null for a run made before collateral reporting existed, which is NOT zero. Never re-derive it from cash − buyingPower. Zero research token cost.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (default 1) | |
| end_date | No | ISO date filter end (e.g. 2024-10-18). Inclusive; T23:59:59.999Z is appended if a bare date is given. | |
| page_size | No | Rows per page (default 500, max 5000). Larger than events because history is plain numbers — cheap to emit. | |
| start_date | No | ISO date filter start (e.g. 2024-10-07). Inclusive. | |
| backtest_id | Yes | Backtest ID (required). Must be owned by the calling MCP user. | |
| jump_bps_threshold | No | If set, the response appends a 'Suspicious jumps' section listing every single-tick Δvalue whose magnitude exceeds this many basis points of the FIRST point's value. E.g. 50 = flag any >0.5% move between consecutive ticks. Useful for mark-to-market bug hunts. Default: omitted (no jump scan). |