Page 1 of 1

Rolling Forecast and rolling VAR

Posted: Fri Nov 11, 2011 4:55 am
by hichbenn
Hello,

I'm a new member in this forum. May you please excuse me if my questions exist already here, but please let me know where can I have some useful answers?

1. I estimated a VAR model with quarterly data; I wanna run rolling forecasts (dynamic forecasting) from 2008q1 to 2011q4. The problem is that I want to have a procedure to calculate the RMSE up to 6 quarters, but I can't find a program to do it automatically.

2. I would like to know if there is a procedure that estimates many VAR model with 3 variables (among 5 variables) and selects the best VAR model according to some criterions and also the RMSE from 1 to 4 quarters.

I'm looking forward to hearing from you, I know that I can't find exactly the programs that I'm looking for but at least I can find great ideas that can be very helpful.

Thank you.

Re: Rolling Forecast and rolling VAR

Posted: Fri Nov 11, 2011 7:27 am
by jonasdovern
I guess this is a problem so specific that you will have to code some loops to find out what the best 3-variable-VAR is. You might want to use the following function to compute the RMSEs easily:

Code: Select all

function %%rmse fcs true start end
	type 	series 	fcs true
	type 	integer	start end
	local 	series	error2
	*
	set error2 start end = (fcs(t)-true(t))^2.
	statistics(noprint) error2 start end
	comp %%rmse = %if(sqrt(%MEAN)<>0,sqrt(%MEAN),%na)
	*
end function

Re: Rolling Forecast and rolling VAR

Posted: Fri Nov 11, 2011 8:15 am
by hichbenn
Thank you very much for the code my friend.

In fact, I want to run all VAR model by combining three variables: so I will have to run three VAR models of 2 variables and one VAR with one variable. But I'm thinking about n variables, so you can imagine how many VAR models I need to run.

I know there is a VAR selection model in some software, but in general they are based only on statistics criterion. This is why I thought of this method. Even if it looks non intuitive, believe me it can give great results.

Do you mind to give me the code for estimating a simple VAR model with exogenous variables using Rats. It's my first time with this software, I used to work with Eviews before, but I think Rats is much better in programming.

Thank you very much.

Re: Rolling Forecast and rolling VAR

Posted: Fri Nov 11, 2011 10:29 am
by jonasdovern
You can look up such examples for simple VARs in Chapter 7 of the User Guide of RATS. No need to post them here.