strategy_compare
Run all nine built-in trading strategies on one stock's history and rank them by return above buy-and-hold, at the cost of a single backtest.
Instructions
Run every built-in strategy over ONE stock's history and rank them — the bars are fetched once for all nine, so this costs the same as a single backtest.
Ranked by return ABOVE buy-and-hold over the same window and costs, not by raw return: over a rising window every long-only strategy shows a profit, and the only question worth asking is whether the trading added anything to owning the stock.
Taking the winner of nine on one window is a SELECTION, not a finding. Run backtest with walk_forward on the winner before believing it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | ||
| bars | No | Sessions of history (default 500) | |
| from | No | ||
| symbol | Yes | IDX ticker, e.g. BBRI | |
| strategies | No | Which to compare. Default: all nine. | |
| stop_loss_pct | No | Applied to every strategy | |
| initial_capital | No | ||
| take_profit_pct | No |