I am reading Asset Pricing by Cochrane. I am struggling to do the Fama-Macbeth cross-sectional regression and I am questioning my understanding of how to do this. I have no problems understanding how to do the two-step cross-sectional regression, it's the Fama-Macbeth bit that I am struggling with.
To get a bearing, let's start with cross-sectional regression. We have two steps.
Cross-sectional regression
Step 1: time-series regression to estimate factor loadings
For asset $i = 1, \dots, N$, perform the following regression:
$$ R_t^i = F_t \beta^i + \varepsilon_t^i $$
where $R_t^i$ is the return of asset $i$ at time $t$, $F_t$ $(1 \times K)$ row of factor values at time $t$ and $\beta_i$ is a $(K \times 1)$ factor loadings.
Step 2: cross-sectional regression to find risk premia
So now collect $\beta_i$ into a $(K \times N)$ matrix and perform the following regression where the $\beta$ matrix is the matrix of regressors (i.e. the data matrix) and we are estimating the $(K \times 1)$ vector $\lambda$.
$$ R_E^i = \beta' \lambda + a_i $$
where $R_E^i$ is the mean return in time of asset $i$.
So far so good. I've implemented this and I get similar results to various implementations quoted in the literature.
Fama-Macbeth
To perform a monthly Fama-Macbeth cross-sectional regression estimated over a one-year rolling window on daily data I still need to do two steps like so.
Step 1
At each month, take the past 12 months of daily data (~252 data points) and perform a time-series regression to obtain the $\beta_t$ where $t$ is the index of the month. This is exactly the same as the first step in the previous example, only we don't use the full sample but we just use a rolling 12-month window.
Do this for all months and collect the $\beta_t$ matrices. Now $\beta = \frac{1}{T} \sum_{t=1}^T \beta_t$.
Step 2
Now we have the averaged factor loadings $\beta$, we perform effectively the same as step two above for each time period but we use the average betas across all periods. In other words, we perform the following regressions:
$$ R_{E,t}^i = \beta' \lambda_t + a_t^i $$
where $R_{E,t}^i$ is the average return of asset $i$ during the last 12 months leading to month $t$ computed on daily data.
Now, take the $\lambda_t$ and average them (similarly to the betas) and that is our result.
Having doneI seem to have implemented the cross-sectional regression correctly and get similar coefficients to one published in literature. But, having implemented the Fama-Macbeth regression, I'm getting wild coefficients which I don't expect to be getting which is why I believe my understanding of what to do is wrong.