compare_backtests
Run several strategies on the same data and compare side by side.
One quota-counted call, but compute scales with the number of
strategies. If the wall-clock compute budget is exceeded, the call
fails with a tool error (504) instead of returning partial results —
narrow the request (fewer strategies, shorter date range, coarser
frequency) and retry.
Args:
data_source: Shared data source (same shape as run_backtest).
strategies: List of {"label": str, "strategy": {...},
"execution": {...}?} entries. Labels need not be unique or
id-safe — they are echoed back verbatim in the result.
include_benchmark: Add a buy-and-hold benchmark to the comparison.
response_detail: Shaping level applied to each strategy's result.
trades_limit: Max trades per strategy when detail is 'full'.
Returns:
{"strategies": [{"label", "result"}, ...], "equity_curves": {...},
"alignment"?}, each result shaped at the requested detail. When a
benchmark is included, non-benchmark entries also carry
"relative" (beta, alpha, information ratio, etc.). A 400/422
rejection returns {"accepted": false, "error": ...};
capacity/timeout/permission failures raise a tool error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| strategies | Yes | ||
| data_source | Yes | ||
| trades_limit | No | ||
| response_detail | No | summary | |
| include_benchmark | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||