Sir : Can you help me ?
I want to use rolling regressing estimators (window=200) to predict the IBM's daily return of the next t+1,t+2,t+3,t+4 and
t+5 day.I hope results are below table:
start date f(t+1) f(t+2) f(t+3) f(t+4) f(t+5)
-----------------------------------------------------------------------------------------------
1 16oct2003 y1_hat y2_hat y3_hat y4_hat y5_hat
2 17oct2003 y1_hat y2_hat y3_hat y4_hat y5_hat
3 20oct2003 y1_hat y2_hat y3_hat y4_hat y5_hat
. . . . . . .
290 09dec2004 y1_hat y2_hat y3_hat y4_hat y5_hat
-----------------------------------------------------------------------------------------------
. use
http://www.stata-press.com/data/r11/ibm
. tsset t
time variable: t, 1 to 494
delta: 1 unit
. generate ibmadj = ibm - irx
. generate spxadj = spx - irx
. rolling _b _se, window(200) saving(betas, replace) keep(date): regress ibmadj spxadj
. use betas, clear
. sort date
. list in 1/295, abbrev(10)
--------------------------------------------------------------------------
PS :The code cited on page 253 from "STATA TIMESERIES REFERENCE MANUAL RELEASE 11".
Thanks.