A reproducible, production-style research toolkit for volatility relative value strategies (VIX / variance risk premium / term structure carry). The framework is RV logic, not directional prediction.
make build-data
make build-signals
make run-backtest
make run-risk
make build-report
make reproducemake reproduce executes the full pipeline and writes a run manifest.
python3 -m venv .venv
source .venv/bin/activate
make setupmake reproduceExpected final artifacts:
outputs/run_manifest.jsonoutputs/reports/latest_report.htmloutputs/reports/latest_report.pdf(best effort)outputs/backtests/*.parquet+outputs/backtests/*.jsonoutputs/data/**stage artifacts
- Cache controller:
config/data.yaml->data.cache.force_refresh force_refresh: false: reuse existing stage outputs when required files exist and config hashes match prior manifestforce_refresh: true: rebuild all selected stages- Manifest:
outputs/run_manifest.jsoncontains:- UTC timestamp
- Python version
- git commit hash (if available)
- seed
- config snapshots + SHA256 hashes
- per-stage execution status (
executed/cache_hit)
- Data quality and fill actions are auditable in
outputs/data/qa/ - Signals use explicit anti-leak lagging
- Backtest includes configurable commission/slippage/roll costs
- Roll trades are generated from Stage 3 roll log when roll events exist
- Risk metrics use loss-positive sign convention (
loss = -return) for VaR/CVaR
- Data/QA:
outputs/data/ - Signals:
outputs/data/signals.parquet,outputs/data/signal_diagnostics.json - Backtest:
outputs/backtests/trades.parquet,positions.parquet,pnl.parquet,attribution.parquet,summary.json - Risk:
outputs/backtests/risk_metrics.json,stress_report.parquet,exposures.parquet - Report:
outputs/reports/latest_report.html,outputs/reports/latest_report.pdf
make test
pytest -q tests/test_reproducibility.pypyarrowCPU/sysctl warnings in sandboxed environments are non-fatal for this project.- Matplotlib may warn about cache directory permissions; set
MPLCONFIGDIRto a writable path if needed. - If PDF generation fails on your machine, HTML report is still produced and limitation is recorded in
outputs/reports/report_build.json.