Hi,

I am currently working on my MSc Thesis Finance. I am trying to replicate the Lewellen regressions from the Cross-section of Expected Stock Returns (2015) and I got stuck.

First, I would like to forecast estimates of expected returns by using characteristics t-1 and rolling windows of 3 years.
Second, I would like to test predicitve ability by regression 'real' returns on 'forecasted returns'.

I used the following code, but I think a made some misstakes:
gen lag_LogSize = LogSize[_n+1]
gen lag_LogBM = LogBM[_n+1]
gen lag_Return = Return[_n+1]

asreg returnsmonthly lag_LogSize lag_LogBM lag_Return, by(IdentifierNumber) wind(year -2 0) fit

sum _fitted , detail
tabstat _fitted, stat(mean sd p10 p90)
drop _Nobs - _b_cons

asreg returnsmonthly _fitted, by(IdentifierNumber) wind(year -2 0) newey(4)
sum _fitted - _se_cons

Could someone help me out?

Thank you!