Ch 21: AI for Finance - Advanced¶
Track: Advanced | Try code in Playground | Back to chapter overview
Read online or run locally
You can read this content here on the web. To run the code interactively, either use the Playground or clone the repo and open chapters/chapter-21-ai-for-finance/notebooks/03_pitfalls_and_ml.ipynb in Jupyter.
Chapter 21: AI for Finance — Notebook 03 (Pitfalls & ML in Finance)¶
Most backtests lie. We catalogue the biases that inflate results and discuss where ML genuinely helps in finance — and where it mostly overfits noise.
What you'll learn¶
| Topic | Section |
|---|---|
| Look-ahead and survivorship bias | §1 |
| Overfitting and multiple testing | §2 |
| Where ML adds value in finance | §3 |
Time estimate: 2 hours
Key concepts¶
- Look-ahead bias — the single most common backtest error.
- Survivorship bias — testing only on assets that still exist flatters results.
- Multiple testing — try enough strategies and one looks great by luck.
- Signal-to-noise — financial returns are mostly noise; humility is a strategy.
Look-ahead and survivorship bias plus multiple testing make naive backtests untrustworthy. ML helps most on well-posed financial problems, not on predicting prices from prices.
Run the full notebook in the chapter folder for code and outputs.
Generated by Berta AI