| title | Backtest Engine |
|---|---|
| description | Walk-forward validation, grid sweep, and regime-conditioned backtesting. |
b1e55ed includes a walk-forward backtesting engine for strategy validation.
b1e55ed backtest walkforward \
--symbols BTC,ETH,SOL \
--strategies momentum,ma_crossover \
--start 2023-01-01 \
--end 2025-12-31Runs a walk-forward test with FDR-corrected results. Outputs: Sharpe ratio, Sortino ratio, max drawdown, win rate per strategy/asset combination.
b1e55ed backtest gridsweep \
--strategies momentum \
--assets BTC,ETHSweeps parameter combinations for a strategy. FDR correction applied across all combinations to control false discovery rate.
b1e55ed backtest megasweepSweeps all strategies × all parameter combos × all assets. Runs in parallel. Produces ranked survivors after FDR correction.
b1e55ed backtest regime --symbols BTC,ETHBreaks performance down by detected regime (EARLY_BULL, LATE_BULL, BEAR, SIDEWAYS). Shows which strategies hold in each regime.
b1e55ed kellyEstimates optimal position sizing from trade history using the Kelly criterion. Regime-adjusted.
| Metric | Threshold | Notes |
|---|---|---|
| Sharpe > 0.5 | Acceptable | After costs |
| Sharpe > 1.0 | Good | Reproducible edge |
| Max DD < 25% | Acceptable | Strategy-dependent |
| Passes FDR q=0.05 | Required | Controls false discoveries |
FDR correction is mandatory. A strategy that looks good on a single backtest is likely noise.
Combined multi-factor strategies (momentum + MA crossover) outperform single-factor strategies after FDR correction. Pure momentum and pure RSI do not survive strict out-of-sample validation.
See: architecture.md for how backtest results feed into the learning loop.