Page 1 of 1

Rolling ARMA and forecast t+1

Posted: Wed Jan 18, 2012 8:29 am
by jfca283
Hi
i need to run a rolling regression for an arma model, forecast and compute the mean squared error.
For example, i take a sample of 100obs from a universe of 1000.
First i run the arma model for 100obs. Then i forecast the Y on t=101, E(Y_101/X_101). After that i compute the mean squared error with the actual observation, Y_100.
I'm not sure how to forecast only one step forward and then check the residual. That residual i'm losing it when i run my code.
Can you help me?
Thanks for your time.

Re: Rolling ARMA and forecast t+1

Posted: Wed Jan 18, 2012 9:12 am
by EViews Gareth
Hard to help without knowing what you've got so far.

Re: Rolling ARMA and forecast t+1

Posted: Wed Jan 18, 2012 10:30 am
by jfca283
i did something like this

Code: Select all

!length=@obsrange vector(!length) const vector(!length) phi vector(!length) theta vector(!length) error for !i=20 to 20 smpl @first @first+!i equation eq9c eq9c.ls rl_dj c ar(1) ma(1) const(!i-1)=eq9c.@coef(1) phi(!i-1)=eq9c.@coef(2) theta(!i-1)=eq9c.@coef(3) eq9c.makeresid res2 next
i'm storing the coeficients for AR(1) and MA(1), i mean, i'm saving the estimated parameters for phi and theta for every sample i make with the loop
For example, i estimate an arma process for 100 obs and save phi and theta, then i ran again an estimation for the arma(1,1) but fot 101 obs and i store the phi and theta.
But how do i forecast for, eg, the t=101 using the phi and theta with the regression i did using only 100 obs? In simple words, i need to evaluate the mean squared error doing comparing the fitted v/s actual value at t=101.

The issue here is tha

Re: Rolling ARMA and forecast t+1

Posted: Wed Jan 18, 2012 10:40 am
by EViews Gareth
To do a forecast you just need to do equation.forecast forecastname. Thus in your case something like:

Code: Select all

eq9c.forecast myforc
The forecast will occur over the current workfile sample, so you just have to set the sample to the forecast period you want prior to doing the forecast.