Run a backtest
run_strategy_backtestStart a backtest of a strategy the client built, and return its key at once.
Writes: the backtest publishes the strategy's holdings and transaction ledger.
Takes a minute or two; returns a ``key`` and an ETA, and ``get_backtest_status(key)``
(free) follows it. Each run spends the backtest allowance, except that the same
definition on the same day reuses the earlier run. The window is the history the
strategy was built with, 5 years by default; ``history_years`` first moves the
strategy's start (back to 2006 at most) and backtests over the new window,
leaving the definition as it is. For a strategy already backtested,
``describe_portfolio_series`` reads the result.
A strategy on a fixed list (``asset_ids``) holds that list through its whole
history, so a list picked today, from a screen or from today's holdings, has
hindsight bias in its backtest; a screened strategy picks its names as of each date.
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": {
"strategy_id": "<strategy_id>"
},
"name": "run_strategy_backtest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strategy_id | Yes | ||
| history_years | No |