Fama–French Factor Lab

Single project hub for US five-factor and Carhart-style analysis, multi-asset ETF comparisons, international sleeve loadings in a common coordinate system, volatility-regime splits, marginal risk budgeting, sleeve attribution, and an interactive SPY estimation grid — plus documented hooks for q-factors.

Overview

This page consolidates several factor-investing workflows that are usually scattered across notebooks: a factor return dashboard, a cross-asset regression panel, an international sleeve comparison, Carhart momentum diagnostics, volatility-regime conditioning, marginal risk shares, sleeve-level attribution, and a compact research grid for sensitivity to estimation window and model specification.

Factors are sourced from the Ken French Data Library (Dartmouth); ETF total returns use Yahoo Finance via yfinance. The generator script is original to this repository and follows standard linear asset-pricing notation.

Econometric Specification

Let R_{i,t} be the total return on asset i and RF_t the one-day risk-free rate from the same factor file. The regression uses excess returns y_{i,t} = R_{i,t} − RF_t.

The US five-factor model uses (Mkt-RF, SMB, HML, RMW, CMA)_t as regressors. The Carhart-style four-factor model replaces profitability and investment with the daily momentum factor Mom_t from Ken French.

Ordinary least squares is applied to the aligned sample after inner-joining on dates. Reported α is the regression intercept in daily units; annualized α multiplies the daily intercept by 252 trading days (conventional scaling, not a t-stat correction). R² is the in-sample coefficient of determination on excess returns.

Rolling R² uses a 252-day trailing window on SPY with a sparse step to limit payload size. Regime splits classify days by the trailing 21-day volatility of Mkt-RF relative to its median, then refit FF5 within each regime.

International sleeve (coordinate choice)

Region-native European daily five-factor CSV endpoints are not wired here because stable public URLs and redistribution terms vary. Instead, EFA and VEA are regressed on the US factor set with the US risk-free rate so loadings are directly comparable to SPY in one coordinate system.

When you need strictly region-matched factors, extend the ETL to the appropriate Ken French regional file for your license and hosting policy, then add a parallel block in the JSON schema.

Risk budgeting and sleeve attribution

Marginal risk shares combine the fitted β vector with the sample covariance matrix of US factors (recent window capped for stability). Shares are normalized to the sum of absolute marginal contributions for readability.

The 252-day sleeve table refits OLS on the last 252 days and reports cumulative linear contributions Σ_t β_k f_{k,t} plus n·α on that same window.

Q-factor roadmap

Hou–Xue–Zhang (q) factors are distributed separately from the Fama–French library. The interactive page includes a dedicated tab describing how a second ingest could mirror the FF5/Carhart tables for q-style research.

Reproducibility and updates

Regenerate: `npm run data:fama-french-lab` or run the unified pipeline (phase copies JSON to `public/data/fama-french-lab/` for static hosting).

Respect Ken French’s terms when mirroring or republishing derived statistics; this site stores compressed regression summaries, not raw vendor redistribution of the full CSVs.

Results

No factor lab dataset found. Run npm run data:fama-french-lab or the unified pipeline to generate fama_french_lab.json.