Module V·Article II·~3 min read
Portfolio Theory and CAPM
Financial Mathematics
Turn this article into a podcast
Pick voices, format, length — AI generates the audio
Modern portfolio theory (Markowitz, 1952) and CAPM (Sharpe, Lintner, Mossin, 1964–66) are two cornerstones of quantitative finance that created the passive investment industry. The Nobel Prizes awarded to Markowitz and Sharpe (1990) recognized their fundamental role.
Markowitz Efficient Frontier
Problem: min_w wᵀΣw subject to wᵀμ = μ₀, wᵀ1 = 1. n assets, expected returns μ, covariance matrix Σ. KKT conditions: w* = λΣ⁻¹μ + γΣ⁻¹1 — a parametric family. Efficient frontier: a parametric curve (σₚ(w*), μₚ(w*)) — a parabola in the (σ,μ)-space.
Two-Fund Theorem: All efficient portfolios are linear combinations of any two points on the efficient frontier. Practically: there is no need to enumerate all n assets — it suffices to use two base portfolios.
Tangency portfolio with risk-free r: T = Σ⁻¹(μ − r·1)/cᵀΣ⁻¹(μ − r·1) — maximizes the Sharpe Ratio SR = (μ_p − r)/σ_p. Capital Market Line (CML): μ_p = r + SR·σ_p.
Diversification: n assets with σᵢ² = σ², correlation ρ between every pair:
σ²_ew = σ²/n + ρσ²(1 − 1/n) → ρσ² as n → ∞
Non-systematic risk σ²/n → 0 (diversifies away). Systematic ρσ² remains. With ρ = 0.3, σ = 20%: σ_ew for n=1: 20%, n=10: 14%, n=100: 11%, n→∞: 10.95%.
CAPM
Equilibrium with homogeneous expectations: All investors are rational Markowitz-type, see identical μ and Σ. Equilibrium: T = market portfolio M (weighted by capitalization). Pricing relationship:
E[Rᵢ] = r + βᵢ(E[Rₘ] − r), βᵢ = Cov(Rᵢ, Rₘ)/Var(Rₘ)
Interpretation of β: βᵢ = 1: asset moves with the market (neutral). βᵢ > 1: “aggressive” — amplifies market movements (grows/falls stronger than the market). βᵢ < 0: “hedge” — moves counter to the market (gold during crises). Only β is rewarded with premium — idiosyncratic risk diversifies away for free.
CAPM Test (Fama-MacBeth, 1973): Two-step regression. Step 1: for each stock i estimate βᵢ in the prior period. Step 2: cross-sectional regression of return on β: μᵢ = λ₀ + λ₁βᵢ + εᵢ. CAPM predicts: λ₀ = r, λ₁ = E[Rₘ] − r. Result: slope λ₁ is significantly below prediction — “flat SML”. Anomalies are absent in theory, present in the data.
Anomalies and Multifactor Models
CAPM Anomalies: Momentum (Jegadeesh-Titman, 1993): past “winners” continue to outperform for 3–12 months. Size effect (Banz, 1981): small companies generate excess return versus CAPM. Value effect: high B/P (book-to-price) → higher return.
Fama-French Three-Factor Model (1993):
E[Rᵢ] − r = βᵢ(E[Rₘ] − r) + sᵢ·E[SMB] + hᵢ·E[HML]
SMB = Small Minus Big (return of small − big companies). HML = High Minus Low (high B/P − low B/P). The model explains ~90% of cross-sectional portfolio variation (vs ~70% for CAPM).
Fama-French Five-Factor (2015): +RMW (Robust Minus Weak profitability), +CMA (Conservative Minus Aggressive investment). Covers most anomalies except momentum.
Q-factor model (Hou, Xue, Zhang, 2015): Based on investment theory (investment CAPM). Factors: market, size, investment, profitability. Explains 161 out of 447 anomalies in the literature.
Numerical Example
Three assets: μ = (10%, 15%, 12%), σ = (20%, 30%, 25%), ρ₁₂ = 0.4, ρ₁₃ = 0.2, ρ₂₃ = 0.3, r = 5%.
Matrix Σ: σ₁₂ = 0.4·0.2·0.3 = 0.024, σ₁₃ = 0.2·0.2·0.25 = 0.01, σ₂₃ = 0.3·0.3·0.25 = 0.0225. Numerical calculation: Σ⁻¹ ... (3×3 inversion). Tangency portfolio: w ≈ (0.28, 0.52, 0.20). μ_T ≈ 13.1%, σ_T ≈ 22.4%. SR ≈ 0.362.
Beta of assets relative to T: β₁ = Cov(R₁, R_T)/Var(R_T), β₂ = ..., β₃ = ... CAPM: E[R₁] = 5 + β₁·8.1, ... Check: does the CAPM relationship hold for all three assets?
Assignment: (1) Implement the Markowitz problem in Python (scipy minimize or analytically): 5 assets (historical S&P 500 component data, 5 years). Plot the efficient frontier (100 points). Find the tangency portfolio. (2) Evaluate CAPM: regression of μᵢ on βᵢ for 50 stocks. Is there a flat SML? (3) Add the SMB and HML factors (data from the Fama website). Does the three-factor model improve the explanation of cross-sectional differences?
§ Act · what next