Saving forecast from var

For questions regarding programming in the EViews programming language.

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

nicolau
Posts: 4
Joined: Mon Aug 06, 2012 4:36 pm

Saving forecast from var

Postby nicolau » Tue Aug 07, 2012 8:43 am

Hi,

i am trying to save multiplus forecast results from var in to a group but i do not know how. I am doing the following steps:
1 - estimate var models
2 - make model
3 - solve the model
the next step would be to salve the forecasts results in to a group called "forecast". The problem is to change the name of the series forecast of each var in order to save all the resoults. The way i am doing, its overwright the results of each var.

By now, i got the following code:

VAR VAR_2_AIC.LS 1 4 D_IPCA_LIVRE D_IPCA_ADM D_TCR_IPCA SELIC_REAL D_PROD_IND D_M1 'set var model
VAR_2_AIC.MAKEMODEL(MOD2_AIC) 'make the model from var
smpl {%data_inicio_proj} {%data_fim} 'set forecast period
SOLVE MOD2_AIC 'make the forecast


VAR VAR_2_SIC.LS 1 1 D_IPCA_LIVRE D_IPCA_ADM D_TCR_IPCA SELIC_REAL D_PROD_IND D_M1
VAR_2_AIC.MAKEMODEL(MOD2_SIC)
smpl {%data_inicio_proj} {%data_fim} 'determina o período para a projeção
SOLVE MOD2_SIC

group forecast
forecast.add d_ipca_adm_0
forecast.add d_ipca_livre_0
forecast.add d_ipca_adm_0

Tks.

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

Re: Saving forecast from var

Postby EViews Gareth » Tue Aug 07, 2012 9:19 am

Because the endogenous variables are the same in each model, each solve of the models will overwrite the forecast series. The easiest thing to do is to create new series equal to the forecast series between each solve.

Code: Select all

VAR VAR_2_AIC.LS 1 4 D_IPCA_LIVRE D_IPCA_ADM D_TCR_IPCA SELIC_REAL D_PROD_IND D_M1 'set var model VAR_2_AIC.MAKEMODEL(MOD2_AIC) 'make the model from var smpl {%data_inicio_proj} {%data_fim} 'set forecast period SOLVE MOD2_AIC 'make the forecast series forc1 = d_ipca_adm_0 series forc2 = d_ipca_livre_0 series forc3 = d_ipca_adm_0 group forecast forc1 forc2 forc3 VAR VAR_2_SIC.LS 1 1 D_IPCA_LIVRE D_IPCA_ADM D_TCR_IPCA SELIC_REAL D_PROD_IND D_M1 VAR_2_AIC.MAKEMODEL(MOD2_SIC) smpl {%data_inicio_proj} {%data_fim} 'determina o período para a projeção SOLVE MOD2_SIC forecast.add d_ipca_adm_0 forecast.add d_ipca_livre_0 forecast.add d_ipca_adm_0

nicolau
Posts: 4
Joined: Mon Aug 06, 2012 4:36 pm

Re: Saving forecast from var

Postby nicolau » Tue Aug 07, 2012 1:34 pm

Thanks


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests