I am confused about how to run fama macbeth regressions for portfolios with rolling window. For example if I have 25 portfolios and time period is 50 years(monthly), rolling window period is 5 years. In first step I regress my portfolio returns on factors in 5 year sub samples. This yields hundreds of betas. I don't get exactly how I need to carry a second stage regression if I have hundreds of betas. I take time 0 and am supposed to run cross sectional regression on returns, but which betas should I use? Do I take y0i=a+lambda?
For applying Fama/MacBeth (1973) regression, it is necessary to always run the cross-sectional regressions and then averaging the betas across years. In this case, as you run Fama/MacBeth regression, the first step is to get the cross-section regression, after which you get the betas for each characteristics. Then you do a rolling window of 5 years, every time you would get the betas for the characteristics. Add them up and take the average.