σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
statsmodels skill›Module 3 · Cross-sections and tails›Topic 3.2·~1 hrAdvanced

Fama–MacBeth regressions

Skill positionModule 3 of 3 · Topic 2 of 3
3.2 Fama–MacBeth regressions
—Lab score— / 100Total XP—Streak—

Estimating what the market pays for a trait

Do stocks with high momentum or low volatility earn more next month, and by how much? A single regression on all stocks and all months pools 18,00018{,}00018,000 observations as if they were independent, but stocks in the same month share the same market shock, so their errors are correlated and the t-statistics come out far too big. Fama and MacBeth avoided this with two passes. First, for every month run a cross-sectional regression of next-month returns on today's characteristics: each month gives one slope per characteristic, the price the market paid that month. Second, treat these monthly slopes as a time series: the premium is their average, and its standard error comes from their spread, se=s/T\mathrm{se}=s/\sqrt{T}se=s/T​, so the t-statistic is λˉ/(s/T)\bar\lambda/(s/\sqrt T)λˉ/(s/T​).

yi,t+1=λ0,t+λ1,txi,t+ui,t+1,λ^=1T∑t=1Tλ^t,t=λ^sλ/Ty_{i,t+1}=\lambda_{0,t}+\lambda_{1,t}x_{i,t}+u_{i,t+1},\qquad \hat\lambda=\frac1T\sum_{t=1}^{T}\hat\lambda_t,\qquad t=\frac{\hat\lambda}{s_\lambda/\sqrt{T}}yi,t+1​=λ0,t​+λ1,t​xi,t​+ui,t+1​,λ^=T1​t=1∑T​λ^t​,t=sλ​/T​λ^​(1)
One month and four monthsIn one month, four stocks have characteristics x=−3,−1,1,3x=-3,-1,1,3x=−3,−1,1,3 (already centred) and next-month returns y=−1,0,3,2y=-1,0,3,2y=−1,0,3,2 in percent. Then ∑xy=12\sum xy=12∑xy=12, Sxx=20S_{xx}=20Sxx​=20, so the slope is 0.60.60.6 and the intercept is yˉ=1.0\bar y=1.0yˉ​=1.0. Suppose four months of such slopes are 0.6,−0.2,0.5,0.10.6,-0.2,0.5,0.10.6,−0.2,0.5,0.1. Their mean is 0.250.250.25, the squared deviations add to 0.410.410.41, so s2=0.41/3=0.1367s^2=0.41/3=0.1367s2=0.41/3=0.1367, s=0.370s=0.370s=0.370, se=0.370/4=0.185\mathrm{se}=0.370/\sqrt4=0.185se=0.370/4​=0.185 and t=0.25/0.185=1.35t=0.25/0.185=1.35t=0.25/0.185=1.35. On real data, take 307307307 months from January 2001 to July 2026 and about 565656 stocks per month (17,07517{,}07517,075 stock-months in all), with three characteristics made comparable by standardising them each month: 12-month momentum skipping the last month, last month's return, and 12-month volatility. The average monthly slopes are +0.178%+0.178\%+0.178% for momentum (t=1.68t=1.68t=1.68), −0.071%-0.071\%−0.071% for the last month (t=−0.83t=-0.83t=−0.83) and +0.270%+0.270\%+0.270% for volatility (t=2.00t=2.00t=2.00, or 3.2%3.2\%3.2% a year). A single pooled regression gives volatility t=5.47t=5.47t=5.47, more than twice the Fama–MacBeth value, and clustering by month gives 2.352.352.35. The volatility premium is positive in both halves of the sample (0.27%0.27\%0.27% and 0.27%0.27\%0.27% a month) but the stock list is today's large companies, so survivorship makes high-volatility winners such as NVIDIA over-represented.

The monthly slopes can themselves be autocorrelated, so many studies replace s/Ts/\sqrt Ts/T​ by a Newey–West standard error with a few lags. Here it hardly matters: for volatility t=2.00t=2.00t=2.00 becomes 1.991.991.99 with four lags. A second point is that the intercept λ^0\hat\lambda_0λ^0​ is the average return of a stock with average characteristics, 1.00%1.00\%1.00% a month in this sample (t=4.08t=4.08t=4.08), which mostly reflects the market and the survivors.

  • Two passes: a regression per month, then the mean and spread of the monthly slopes.
  • Standardise the characteristics each month so the slopes are comparable and outliers matter less.

Lab · what's graded

  • One month's slope15 pts
  • The premium10 pts
  • The spread of the slopes10 pts
  • The standard error10 pts
  • The t-statistic15 pts
  • Pooled against Fama–MacBeth15 pts
  • What survivorship does25 pts
0/ 7 answered
Tasks
1Numeric answer15 ptsNot answered

Four stocks have centred characteristics x=−3,−1,1,3x=-3,-1,1,3x=−3,−1,1,3 and next-month returns y=−1,0,3,2y=-1,0,3,2y=−1,0,3,2. With ∑xy=12\sum xy=12∑xy=12 and Sxx=20S_{xx}=20Sxx​=20, what is the cross-sectional slope? Give one decimal.

b=b =b=accepted: ± 0.01
2Numeric answer10 ptsNot answered

Four monthly slopes are 0.6,−0.2,0.5,0.10.6,-0.2,0.5,0.10.6,−0.2,0.5,0.1. What is their mean, the estimated premium? Give two decimals.

m=m =m=accepted: ± 0.005
3Numeric answer10 ptsNot answered

The squared deviations from the mean 0.250.250.25 add to 0.410.410.41. With T=4T=4T=4 months, what is the standard deviation s=0.41/(T−1)s=\sqrt{0.41/(T-1)}s=0.41/(T−1)​? Use 0.1367=0.370\sqrt{0.1367}=0.3700.1367​=0.370 and give three decimals.

s=s =s=accepted: ± 0.004
4Numeric answer10 ptsNot answered

With s=0.370s=0.370s=0.370 and T=4T=4T=4 months, what is se=s/T\mathrm{se}=s/\sqrt Tse=s/T​? Give three decimals.

se=se =se=accepted: ± 0.002
5Numeric answer15 ptsNot answered

The premium is 0.250.250.25 and its standard error is 0.1850.1850.185. What is the t-statistic? Give two decimals.

t=t =t=accepted: ± 0.03
6Choice15 ptsNot answered

A pooled regression gives the volatility premium t = 5.47, while Fama–MacBeth gives t = 2.00. Why is the pooled value too big?

7Explain in words25 ptsNot answered

The stock list is today's large companies, and the volatility premium came out positive. In one or two sentences, explain how survivorship could inflate the premium.

Math modeKeyboard or LaTeX inputTask 1 of 7 · Ctrl ⏎ to check

Log in to run your code.

Every lecture is free to read. Create an account or log in to run code, run tests and submit this lab.

  • In-browser IDE with a bash terminal — nothing to install
  • Instant grading, XP and your place on the skill
Create an accountLog in
OR
Continue with GitHub