Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Factor Investing: From Statistical Foundations to Fama-French Models

A self-contained tutorial series on factor investing for anyone with an undergraduate-level background in probability and statistics. Key results are derived and demonstrated on data small enough to verify by hand, then applied to real market data.

Notebooks

Work through these in order — each builds on the previous one.

#NotebookTopics
1Statistical FoundationsDescriptive stats, CLT, hypothesis testing, OLS by hand, HC sandwich estimator, Newey-West HAC derivation — all on hand-checkable datasets (5–8 observations)
2Time-Series FoundationsPrices vs returns, stationarity & ADF tests, ACF/PACF, Ljung-Box, volatility clustering & ARCH, ergodicity & mixing, full assumption stack for FF regressions
3Fama-French 3-Factor ModelFF3 theory, real data (Ken French + Yahoo Finance ETFs: SPY, IWN, VTV), OLS normal equations, statsmodels, R²/F-tests, diagnostics (JB, BP, DW, VIF), robust SEs, Newey-West, interpretation & predictions, multi-ETF comparison
4Advanced Factor ModelsFF5, Carhart 4-factor, Novy-Marx profitability, reversals, beta anomaly & BAB, meta-research (replication, out-of-sample decay, Adaptive Markets Hypothesis), the practitioner debate (DFA, Avantis, premium timing), rolling-window analysis
5Practical Factor InvestingReal ETF data (AVWS, AVWC, AVEM, IWMO), monthly FF5+Momentum regressions with regional factor matching, portfolio construction (50/40/10), constrained optimisation, factor profiles, limitations of short samples
6Solution ManualComplete worked solutions to all 18 exercises from notebooks 01–04, with code, output interpretation, and explanations

Read Online

View the book on GitHub Pages →

Quick Start

git clone https://github.com/beachnoir/FamaFrench.git && cd FamaFrench
python -m venv venv && source venv/bin/activate   # Windows: venv\Scripts\activate
pip install -r requirements.txt
jupyter notebook

Requires Python 3.9+.

Preview the book locally

pip install -r requirements-book.txt
jupyter-book build --execute --html
jupyter-book start                     # opens at http://localhost:3000

Project Structure

FamaFrench/
├── 01_Statistical_Foundations.ipynb
├── 02_Time_Series_Foundations.ipynb
├── 03_Fama_French_3Factor.ipynb
├── 04_Advanced_Factor_Models.ipynb
├── 05_Practical_Factor_Investing.ipynb
├── 06_Solution_Manual.ipynb
├── custom.css               ← Styling for the Jupyter Book
├── myst.yml                 ← Jupyter Book v2 / MyST config + TOC
├── runtime.txt              ← Python version pin for hosted runtimes
├── .github/workflows/
│   └── deploy-book.yml      ← GitHub Actions: build + deploy to Pages
├── requirements.txt         ← Runtime deps (numpy, pandas, statsmodels, …)
├── requirements-book.txt    ← Book build deps (jupyter-book v2)
├── .gitignore
└── README.md

Data Sources

No data files are committed to the repo — everything is fetched when the notebooks execute.

License

This educational material is provided as-is for learning purposes.