Statics forecast of different periods

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

campac2011
Posts: 1
Joined: Thu Jan 26, 2012 3:16 pm

Statics forecast of different periods

Postby campac2011 » Thu Jan 26, 2012 3:39 pm

Hi,
I want to create a programming in order to run statics forecasts from a VAR model, but the issue is that I have first to regress from period 1 to 100, then forecast from the period 101 to 102, and find the RMSE. After that, I have to regress again but from period 1 to 102, then forecast from period 103 to 104, and find the RMSE, and do it again the same procedure until the end of the sample. I started to programming the forecast in a very easy but not so refined mode (see the program at the end of this message).
I was wondering if you can guide me if there is a programming to compute this multiple forecasts without doing it one by one.
Regards,
ECPM

'Forecast two periods inflation (static forecast)
'1 forecast
smpl 1954q3 1999q4
equation eq_inf.ls inf c inf(-1) inf(-2) inf(-3) inf(-4) u(-1) u(-2) u(-3) u(-4) ff(-1) ff(-2) ff(-3) ff(-4)
smpl 2000q1 2000q2
fit inf_hat
scalar rmse_1p = @rmse(inf, inf_hat)
'2 forecast
smpl 1954q3 2000q2
equation eq_inf.ls inf c inf(-1) inf(-2) inf(-3) inf(-4) u(-1) u(-2) u(-3) u(-4) ff(-1) ff(-2) ff(-3) ff(-4)
smpl 2000q3 2000q4
fit inf_hat
scalar rmse_2p = @rmse(inf, inf_hat)
'3 forecast
smpl 1954q3 2000q4
equation eq_inf.ls inf c inf(-1) inf(-2) inf(-3) inf(-4) u(-1) u(-2) u(-3) u(-4) ff(-1) ff(-2) ff(-3) ff(-4)
smpl 2001q1 2001q2
fit inf_hat
scalar rmse_3p = @rmse(inf, inf_hat)

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Statics forecast of different periods

Postby EViews Gareth » Thu Jan 26, 2012 4:28 pm

Have you looked through the basic rolling regression/forecast program:
http://forums.eviews.com/viewtopic.php?f=15&t=878

(pay attention to Esther's program).


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest