# Fama-Macbeth second step confusion

I am confused on how to run the second step of the Fama Macbeth (1973) two step procedure.

I have monthly stock returns and monthly Fama-French factors, for around 10,000 stocks. This creates an unbalanced panel, mainly because stocks start and stop trading within the period I examine (1991-2015, 25 years, 300 months).

In the first step I regress each stock's excess return on the Fama-French factors: $$R_{i,t} = \alpha_i + \beta_{i, MktRf} MktRf_t + \beta_{i, SMB} SMB_t + \beta_{i, HML} HML_t + \epsilon_{i, t}$$

So, I get 10,000 "quadruplets" $\alpha_i, \text{ } \beta_{i, MktRf}, \text{ } \beta_{i, SMB}, \text{ } \beta_{i, HML}$ for each stock.

But how exactly do I proceed for the second step, which requires me to run 300 (number of months in sample) regressions??

What exactly are the dependent and the independent variables for each time period (month)?

Then for each month $t$, you run a cross-section regression:

$r_{i,t} = \lambda_0 + \hat{\beta}_i {\lambda}_t + \alpha_{i,t}$

Where: $\hat{\beta}_i \equiv [\beta_{i, MktRf}, \beta_{i, SMB}, \beta_{i, HML}]'$, is a vector of the coefficients estimated on the first step.

What you are looking for is to estimate the vector of $\hat{\lambda}_t \equiv [\lambda_{t, MktRf}, \lambda_{y, SMB}, \lambda_{t, HML}]$.

So after the second step you will have $T$ estimates for each $\lambda$ (price of risk).

Then you just need to average those $\lambda$'s:

$\hat{\lambda} = \frac{1}{T} \sum^{T}_{t=1} \hat{\lambda}_t$

And you can test their statistical significance using as a variance estimate the following:

$Est.Asy.Var(\hat{\lambda}) = \frac{1}{T^2} \sum^{T}_{t=1} (\hat{\lambda}_t - \hat{\lambda} )(\hat{\lambda}_t - \hat{\lambda} )'$

• The t-statistics of the Fama French factors, should be significant. For HML, I calculate them simply by the t-statistic : $\frac{\text{average} \hat \lambda_{HML}}{\text{standard deviation of} \hat \lambda_{HML}}$, which must roughly be larger than 2, right? – Konstantinos Feb 20 '16 at 14:22
• That's correct. – phdstudent Feb 20 '16 at 14:26
• @ppidosaurus I think it should be standard error of lamda instead of standard deviation. – John Feb 20 '16 at 15:31
• Actually, you just need to take the square root of the last expression on my answer. But I will update it with something more. – phdstudent Feb 20 '16 at 15:58
• volcompt and @Freddorick thank you so much for your care. I will update the question soon. I will include some R code for calculating the factors with some Fama-French portfolios. You may consider it out of scope, so do not worry. But if not, it will be really useful for network stumblers. – Konstantinos Feb 22 '16 at 15:12

The two step Fama-Macbeth regression works as follows:

First, run a cross sectional regression in each period. I believe that you want to estimate risk premia for each of the Fama and French factors. Therefore you run:

$$r_{i,t} = \lambda_{t,MKT} \hat{\beta}_{i,MKT}+\lambda_{t,HML} \hat{\beta}_{i,HML}+\lambda_{t,SMB} \hat{\beta}_{i,SMB}+ \alpha_{i,t} \quad \forall t \in [t_0,t_T]$$

The independent variables are the estimates from your times series regressions. They are the same for each cross-sectional regression. You run thus cross-sectional regression for each of your 300 months in the sample. This gives you 300 estimates for each risk premium, one for each period. Note that some people prefer to run the cross-sectional regressions also with intercept.

Second, to find the risk premium for each risk factor you average each premium over time.

$$\hat{\lambda_{RP}} =\frac{1}{T} \sum_{t = 0}^T \lambda_{t,RP}$$

To obtain standard errors:

$$\hat{\sigma}^2(\hat{\lambda}_{RP}) =\frac{1}{T^2} \sum_{t = 0}^T (\lambda_{t,RP}-\hat{\lambda}_{RP})^2$$

where RP is either MKT, HML or SMB. With the standard error and the estimate you can perform a t-test.

A few comments on the procedure:

1) Please note that the Fama-Machbeth regression only corrects for cross sectional correlation. Petersen (2009) recommends to estimate standard errors with the Newey-West procedure to correct for autocorrelation. John Cochrane recommends to use GMM in his book Asset Pricing.

2) The time series regressions you mention in your post as a first step are actually not part of the Fama-Macbeth regression and the only purpose of those regressions is to find the betas. However, they are often called first step in many academic papers.

3) There is an excellent summary by Jason Hsu.

• Guys plz don't fight. :) So when people say the two-step regression they mean your answer right? But in their paper Fama-MacBeth mention that we should sort the stocks in portfolios according to beta, so why don't people mean this, when they refer to Fama MacBeth? – Konstantinos Feb 20 '16 at 14:22
• What they mean is that you should not do this with 10,000 stocks individually. You should first sort stocks according to some characteristic (Beta, Book to market, size) into portfolios and estimate the regressions for portfolios to make the estimates much less noisy. – phdstudent Feb 20 '16 at 14:27
• Hi @volcompt, when I started typing my answer yours wasn't there yet. Guess you were faster, you should receive the credit. – Freddorick Feb 20 '16 at 14:52
• @Freddorick You say "They are the same for each cross-sectional regression". I thought there are two ways to do it. You could either estimate the time series regression over the whole period once or you could do rolling regressions. I thought the rolling regression approach was more common, TBH. – John Feb 20 '16 at 15:29
• That's right John. The big advantage of fama macbeth vs 2 pass regressions is the possibility of time-varying betas. – phdstudent Feb 20 '16 at 15:57