Simulate only information and orders that would have been available at the time, charge realistic costs once, and compare the strategy with fair benchmarks and falsification controls.
walk_forward.pycreates chronological training and test windows.engine.pygenerates decisions without training on future labels.broker.pyandexecution.pyfill at the next available open.costs.pyand the threshold execution path charge fixed fees and one-way spread/slippage.- Positions drift between rebalances; optional small trades may be skipped, but obsolete positions are always closed.
metrics.pycalculates cumulative return, CAGR, Sharpe, volatility, drawdown, VaR, and CVaR.- Experiment modules add block-bootstrap intervals and shuffled-score distributions.
- Replaced close-to-close evaluation with next-open execution-aligned returns.
- Corrected fill dates so transactions appear on the actual fill session.
- Removed double counting of spread and slippage.
- Corrected astronomical CAGR, volatility, return, and fee outputs caused by accounting defects.
- Added identical execution treatment for model, control, and benchmark portfolios.
- Added fail-closed confirmation paths and artifact hashes.
For the 64-week v4 public confirmation:
- Average weekly turnover: 5.43%.
- Average executed orders: 3.08 per week.
- Annualized variable cost: 0.23%.
- Annualized fixed cost: 0.15%.
- Total modeled transaction cost: approximately 0.38% annually.
- Model net CAGR: 11.34%; Sharpe: 1.11; maximum drawdown: -5.73%.
The primary comparison was 70% SPY plus 30% cash, including the requested hypothetical 0.5% annual benchmark fee. A fully invested SPY comparison answers a different opportunity-cost question and should not be mistaken for equal exposure.
- Costs are static and omit participation, price impact, partial fills, taxes, borrow, and capacity.
- Weekly return samples are short for precise Sharpe or active-return inference.
- A backtest cannot validate unavailable historical data or publication timing.
- Performance metrics must never be reported without their period, exposure, and benchmark.
python -m src.cli run-backtest --help
python -m src.cli run-ablation --help
python -m src.cli run-revealing-controls --help
python -m src.cli analyze-regime-stability --help
python -m src.cli generate-report --help