Run a backtest
run_backtestWhat it does: runs one strategy spec against 15+ years of real 1-minute futures history (NQ by default; set spec.instrument to ES or GC) with realistic fills, slippage and commission, and saves the run to the user's private vault. Returns: run_id, metrics (trades, win rate, profit factor, net P&L in dollars, max drawdown, Sharpe, exit breakdown), an equity curve of at most 500 points, a monthly table, credits charged and credits left. A rejected spec returns a teaching error naming the exact path and the valid options: fix the spec and call again. When to use: whenever the user wants numbers for an idea; compose the spec from get_spec's grammar and never estimate results yourself. Costs 1 credit (2 on 1-minute bars); an identical re-run on the same data is a free cache hit. Never returns price bars.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"spec": "<spec>"
},
"name": "run_backtest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | The full strategy spec object, per get_spec's grammar |