VARForecast (VAR forecasting)

For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

userfriendly
Posts: 5
Joined: Thu Oct 01, 2015 9:18 am

Re: VARForecast (VAR forecasting)

Postby userfriendly » Thu Oct 01, 2015 9:29 am

Hi! I have 5 times series from 1929 to 2012, with monthly data. I have estimated some VARs within this sample and I am trying to forecast the values of the subsequent periods.

For instance: I have a VAR from 1929m01 to 1960m12 and I use the add-in on the sample [1961m01 1961m12] in order to find the forecasts on it. The code runs properly, but I noticed that any time I run it I obtain different forecasts. I expected them to be all the same, as they are generated from the same VAR.

I believe the problem could lie either in the stochastic nature of the simulation or in their number (1000 might be too low). I would indeed appreciate if you could suggest a way to increase the precision of such forecast.

Thank you!

(EViews 8 )

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

Re: VARForecast (VAR forecasting)

Postby EViews Gareth » Thu Oct 01, 2015 9:33 am

If you're doing a stochastic forecast, yes you would expect the forecasts to be slightly different each time.
Follow us on Twitter @IHSEViews

userfriendly
Posts: 5
Joined: Thu Oct 01, 2015 9:18 am

Re: VARForecast (VAR forecasting)

Postby userfriendly » Thu Oct 01, 2015 9:41 am

EViews Gareth wrote:If you're doing a stochastic forecast, yes you would expect the forecasts to be slightly different each time.


Thank you Gareth.

I need a unique value of these forecasts for the dissertation I am currently writing, and I was thinking of running the code a certain number of time and then take the average of the forecasted values.

Hoever, I would appreciate if you could suggest whether it is possible to do the following things and, if so, how:
1) convert the stochastic forecast in the add-in with a deterministic one (I read someone has already compared these forecasts with the dynamic solution of the solve command)
2) increase the number of simulations performed (set to 1000 by default)

Apologies if the question is somehow naive. I greatly appreciate your help!

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

Re: VARForecast (VAR forecasting)

Postby EViews Gareth » Thu Oct 01, 2015 12:10 pm

Just don't perform a stochastic forecast
Follow us on Twitter @IHSEViews

userfriendly
Posts: 5
Joined: Thu Oct 01, 2015 9:18 am

Re: VARForecast (VAR forecasting)

Postby userfriendly » Thu Oct 01, 2015 12:47 pm

EViews Gareth wrote:Just don't perform a stochastic forecast


Yes, I would like to do a deterministic one. However, I need a code/program in order to do that, as I have around 1200 VARs from which I need the forecasts (and I cannot do it manually). That is why I was looking for the add-in or any useful way to modify it.

I have a "for" cycle that is structured the following way:

for i = 1 to 1200
Set sample
Estimate VAR
Set forecast sample
Perform the forecast (here I need the deterministic one)
Save the vector in the format I need
next

Therefore, is there any way to modify this add-in so as to insert it in such a code? Otherwise, do you have any suggestion regarding how to modify the line?

Apologies for not having been clear enough earlier. Thank you for any time and effort you will be willing to spend on my issue.

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

Re: VARForecast (VAR forecasting)

Postby EViews Gareth » Thu Oct 01, 2015 12:55 pm

Probably better off not using the addin at all, just programming the forecast with a model object.
Follow us on Twitter @IHSEViews

userfriendly
Posts: 5
Joined: Thu Oct 01, 2015 9:18 am

Re: VARForecast (VAR forecasting)

Postby userfriendly » Thu Oct 01, 2015 12:58 pm

EViews Gareth wrote:Probably better off not using the addin at all, just programming the forecast with a model object.


Thank you Gareth! Last question, relevant to my case: I am going to review how to program the forecast on the User Guide. Do you have any better reference I should look at?

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

Re: VARForecast (VAR forecasting)

Postby EViews Gareth » Thu Oct 01, 2015 1:07 pm

You want VAR->Makemodel in the VAR section of the Object Reference, then Model->Solve and Model->SolveOpt in the Model section of the Object Reference.
Follow us on Twitter @IHSEViews

userfriendly
Posts: 5
Joined: Thu Oct 01, 2015 9:18 am

Re: VARForecast (VAR forecasting)

Postby userfriendly » Thu Oct 01, 2015 1:08 pm

EViews Gareth wrote:You want VAR->Makemodel in the VAR section of the Object Reference, then Model->Solve and Model->SolveOpt in the Model section of the Object Reference.


Thank you Gareth! I really appreciate your support.

I will try working on it and have a research in the forum then.

EV_an
Posts: 5
Joined: Thu Jan 21, 2016 10:44 am

Re: VARForecast (VAR forecasting)

Postby EV_an » Thu Jan 21, 2016 11:00 am

Hi,

I am using the Add-in VarForecast with Eviews9, but I am experiencing some problem in saving the graph. I hope you can help me.

This is a semplified example of my code:

var1.fcast(g,s) f_var1 se_var
freeze(fcts_var1) vtemp

The first line produces the forecast and the graph. The second is meant to save the graph, but it's not working. I get an error message saying that vtemp is not defined. How can I solve it? Is there a way to save and name the graph.

Thanks for you help

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

Re: VARForecast (VAR forecasting)

Postby EViews Gareth » Thu Jan 21, 2016 11:42 am

The add-in is not meant for EViews 9 - EViews 9 has VAR forecasting built in.
Follow us on Twitter @IHSEViews

EV_an
Posts: 5
Joined: Thu Jan 21, 2016 10:44 am

Re: VARForecast (VAR forecasting)

Postby EV_an » Thu Jan 21, 2016 11:58 am

Thank you very much. You mean I can directly use the Var proc: forecast ?
If this is the case my code would be: var.forecast(g) f_var1 se_var1
But I'd still have the same problem to save the graph created. Further in this case how can I make static forecast?
Thanks again

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

Re: VARForecast (VAR forecasting)

Postby EViews Gareth » Thu Jan 21, 2016 12:24 pm

Freeze the forecast or fit command.
Follow us on Twitter @IHSEViews

EV_an
Posts: 5
Joined: Thu Jan 21, 2016 10:44 am

Re: VARForecast (VAR forecasting)

Postby EV_an » Thu Jan 21, 2016 1:23 pm

For some reason "forecast" does not work with my code ( var.forecast(g) f_var1 se_var1 ). First the error message says that the f_var1. Then even if I change name it goes off.
Can I still use the Add-in and in case some how freeze the graph?
Thank again

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

Re: VARForecast (VAR forecasting)

Postby EViews Gareth » Thu Jan 21, 2016 2:08 pm

No.
Follow us on Twitter @IHSEViews


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 19 guests