Case Studies
Nine case studies thread through Chapters 6-20, applying the same ML4T workflow to different asset classes, frequencies, and trading constraints. Each case study defines a universe, builds labels and features, trains models from linear baselines through deep learning, and evaluates strategies through backtesting, portfolio construction, cost analysis, and risk management.
Overview
| # | Case Study | Asset Class | Frequency | Universe | Primary Label |
|---|---|---|---|---|---|
| 1 | ETFs | Multi-asset ETFs | Daily | 100 ETFs | fwd_ret_21d |
| 2 | Crypto Perps Funding | Crypto perpetual futures | 8-hourly | 19 pairs | fwd_ret_8h |
| 3 | NASDAQ-100 Microstructure | US equities (intraday) | 15-min | 114 stocks | fwd_ret_15m |
| 4 | S&P 500 Equity + Options | S&P 500 equities | Daily | 634 stocks | fwd_ret_5d |
| 5 | US Firm Characteristics | US equities (fundamental) | Monthly | ~2,500 stocks | fwd_ret_1m |
| 6 | FX Pairs | G10 currency pairs | Daily | 20 pairs | fwd_ret_1d |
| 7 | CME Futures | Multi-sector futures | Daily | 30 products | fwd_ret_5d |
| 8 | S&P 500 Options | S&P 500 equity options | Daily | S&P 500 straddles | fwd_ret_dh_10d |
| 9 | US Equities Panel | Broad US equities | Daily | ~3,200 stocks | fwd_ret_1d |
Pipeline Stages
Every case study runs the same sequence of phases, and each phase maps to a book chapter. The stage numbers differ from one case study to the next, because each market gets a different set of model-family stages, but the phase order is identical everywhere. The phase-to-chapter table lives in Running Notebooks.
Not every case study has every model type. The exact notebook set depends on the dataset characteristics; each case study's own README lists its stages, in order, with the chapter each one belongs to.
Running a Complete Pipeline
Run the stages in order from the repo root. See Running a Case Study End to End for the pattern, and the case study's own README for its exact stage list. Reduced-parameter test runs and headless execution are covered in the same document.
Directory Layout
Each case study follows this structure:
case_studies/{id}/
+-- README.md # Dataset profile, pipeline table
+-- config/
| +-- setup.yaml # SSOT: universe, costs, CV, labels
+-- 01_feasibility_analysis.py / .ipynb # Numbered notebook sequence
+-- 02_labels.py / .ipynb
+-- ...
+-- labels/ # Generated learning targets (gitignored)
+-- features/ # Generated financial and temporal features
+-- evaluation/ # Generated feature diagnostics
+-- run_log/ # Downloaded or generated result state
| +-- registry.db # Result and provenance source of truth
| +-- training/{hash}/ # Specs, coefficients, boosters, checkpoints
| +-- predictions/{hash}/ # Stored prediction arrays
| +-- backtest/{hash}/ # Returns, trades, weights, and configs
Reproducibility
config/setup.yamldefines the trading setup, cost model, and evaluation protocolrun_log/implements the Chapter 6.7 run log: every model run is content-addressed by its config hashrun_log/registry.dbis the only result source of truth; legacy result JSON files are not usedscripts/download_artifacts.pyinstalls the accepted run log and stored artifacts without retrainingscripts/create_experiment.pycreates a writable copy for new configurations and backtests
For the schema and querying API, see RUN_LOG.md. For reproduction and experimentation steps, see Running Notebooks.