Run a backtest
run_backtestRun a point-in-time backtest and return its run_id, metrics, sources and honesty checks.
The run may only see data stamped on or before `as_of` — that is enforced structurally, not
by convention. Results arrive with the data `query_ids` behind them and an anti-overfitting
verdict (out-of-sample, deflated Sharpe, multiple-comparison, crash stress); a run that
fails the gate is returned REJECTED with reasons rather than hidden.
Args:
strategy_id: a registered strategy, e.g. 'buy_and_hold' or 'cross_sectional_momentum'.
start / end: the測試期間 (YYYY-MM-DD). `end` must not be after `as_of`.
as_of: the knowledge cutoff. REQUIRED — there is no "today" default.
tickers: required when universe_kind='explicit'; ignored for 'point_in_time'.
universe_kind: 'point_in_time' (survivorship-safe, resolved from listing/delisting
dates at each rebalance) or 'explicit' (a list you supplied).
market: optional market filter for a point-in-time universe.
rebalance: 'daily' | 'weekly' | 'monthly'.
cost_bps: one-way transaction cost in basis points.
params: strategy parameters, e.g. {'lookback_days': 60, 'top_k': 5}.
This measures history. It is not advice and it places no orders.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| as_of | Yes | ||
| label | No | ||
| start | Yes | ||
| market | No | ||
| params | No | ||
| tickers | No | ||
| cost_bps | No | ||
| rebalance | No | monthly | |
| strategy_id | Yes | ||
| universe_kind | No | point_in_time |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cagr | No | ||
| hint | No | ||
| as_of | No | ||
| error | No | ||
| period | No | ||
| reason | No | ||
| run_id | No | ||
| sharpe | No | ||
| status | No | ||
| blocked | No | ||
| accepted | No | ||
| turnover | No | ||
| warnings | No | ||
| citations | No | ||
| query_ids | No | ||
| gate_passed | No | ||
| max_drawdown | No | ||
| anti_overfitting | No | ||
| known_strategies | No | ||
| rejection_reasons | No | ||
| survivorship_safe | No | ||
| not_investment_advice | No |