backtest-engine

Documentation

Deterministic, event-driven backtesting with a look-ahead detector.

Real-data case studies

Single asset: SPY daily, 2016-11-21 to 2026-11-20. Walk-forward moving average, costs, buy-and-hold comparison, and a subtle full-sample look-ahead strategy caught by the detector.

Open the SPY case study

Two assets: SPY and TLT. Relative momentum with monthly rebalancing, per-asset costs, capital allocation, and a cross-sectional future trap caught by the detector.

Open the SPY/TLT case study

Source and package

github.com/IkerAbad/backtest-engine
pip install backtest-engine

Reproducibility

The report hashes are committed in case_study.sha256 and multi_asset.sha256 and verified in CI on Linux, Windows and macOS. The engine report in ../reports/example.html is verified on the same platforms.