15 academic trading strategies. Fully implemented. No paywalls.
Each chapter takes a landmark academic paper and turns it into clean, runnable Python — from volatility targeting to machine learning alphas. Free data, no Bloomberg terminal required.
git clone https://github.com/hakvinv/paper-alpha.git cd paper-alpha pip install -r requirements.txt python ch01_volatility_targeting.py
# File Strategy Paper 01 ch01_volatility_targeting.pyEWMA Vol Targeting Moreira & Muir (2017) 02 ch02_momentum.py12-1 Sector Momentum Jegadeesh & Titman (1993) 03 ch03_value.pyValue vs Growth via ETFs Fama & French (1992) 04 ch04_carry.pyFX Carry Trade AUD/JPY Lustig et al. (2011) 05 ch05_low_volatility.pyLow-Vol Anomaly SPLV/SPHB Baker et al. (2011) 06 ch06_trend_following.py3-Asset Trend Following Moskowitz et al. (2012) 07 ch07_quality.pyQuality Minus Junk Asness et al. (2019) 08 ch08_betting_against_beta.pyBetting Against Beta Frazzini & Pedersen (2014) 09 ch09_reversal.pyWeekly Sector Reversal Lehmann (1990) 10 ch10_pairs_trading.pyZ-Score Pairs: KO/PEP, XOM/CVX Gatev et al. (2006) 11 ch11_risk_parity.pyInverse-Vol Risk Parity Qian (2005) 12 ch12_factor_timing.pyValue Spread Analysis Asness (2016) 13 ch13_ml_alpha.pyXGBoost on ETF Features Gu, Kelly & Xiu (2020) 14 ch14_volatility_risk_premium.pyVRP + Conservative Short-Vol Ilmanen (2011) 15 ch15_combined.pyTrend + Risk Parity Combined Hamill et al. (2016)
Package Purpose yfinanceFree market data pandasData manipulation numpyNumerical computing matplotlibPlotting scipyStatistics xgboostCh. 13 (falls back to sklearn)
All scripts pull free data from Yahoo Finance — no paid subscriptions, no API keys. If your numbers differ slightly from the book, Yahoo Finance may have revised historical data since publication (dividend adjustments, splits).
Built by Hakvin Vosteen
hakvinv/paper-alpha
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|