Dynamic Forecast with VECM

Questions and discussions on Vector Autoregressions
Poppelwops
Posts: 8
Joined: Thu Jan 22, 2009 11:39 am

Dynamic Forecast with VECM

Unread post by Poppelwops »

Dear RATS/CATS-users,

I've got the following problem. I set up a cointegrated VAR model in CATS, which I then exported to RATS. After that I reset the sample so that all deterministic variables (+exogenous) are defined over the forecasting-sample. I then use RATS VAR Forecast/Analyze option to produce 4-step ahead DYNAMIC Forecasts. The problem is that the forecasts do not change whether I choose 1,2,4 or 8 step ahead dynamic forecasts. Anybody an idea what I'm doing wrong her?

I've got a 5-variate CVAR-model with 2 cointegration vectors. In a dynamic forecast, the differences of the endogenous variables are predicted with each of the simultaneous equations, and based on that also the error correction term should be calculated (so also the cointegration relationship should be "endogenized"). Is this possible with RATS and if so how?

Thanks in advance for any help on this!
moderator
Site Admin
Posts: 269
Joined: Thu Oct 19, 2006 4:33 pm

Re: Dynamic Forecast with VECM

Unread post by moderator »

I'm not sure what you mean by "resetting the sample"? Depending on what you mean by that, you may not actually be defining the appropriate series over the necessary range.

Also, when you say the forecasts don't change--does that mean you are getting forecasts out to the shortest horizon, but don't get any results for the longer horizons?

If you can specify in more detail what you are doing, we can try to help. However, we might need you to email us the code with full details on what menu operations, etc., you are selecting to see what's happening.

Regards,
Tom Maycock
Estima
Poppelwops
Posts: 8
Joined: Thu Jan 22, 2009 11:39 am

Re: Dynamic Forecast with VECM

Unread post by Poppelwops »

First of all thanks for the fast reply.

I try to be more clear now. I did the following steps.

1.) I estimated a model from 1987Q1 to 2002Q4 (full sample ends 2008Q2) in CATS, more specifically a model with 5 endogenous variables, 1 restricted level shift (2001Q1) and 1 permanent impulse dummy (1992Q1). (all dummies are defined over the full sample from 1959Q1 to 2008Q2).

2.) I impose overidentifying restrictions, which cannot be rejected.

3.) I then choose "Export Rats Model" from the "Misc"-menu

4.) I choose "Shell to Rats" in the "CATS"-menu

5.) I enter "CALENDAR 1959 1 4" followed by "ALLOCATE 0 2008:2" (which is the full sample for which data is available).

6.) I choose "VAR FORECAST" from the "Statistics"-menu.

7.) I then choose my model from RATS, dynamic forecast, enter the forecasting horizon and the number of steps.

8.) No matter which number of steps I enter, the forecasts are always exactly equal (for all forecasting periods).

I am sure I am doing something wrong here, probably after exporting the model to RATS (I'm not really an expert in RATS, so far I exclusively used CATS).

Thanks in advance for your kind help. If you need further info please let me know.
moderator
Site Admin
Posts: 269
Joined: Thu Oct 19, 2006 4:33 pm

Re: Dynamic Forecast with VECM

Unread post by moderator »

I'm not sure that it has anything to do with what you are experiencing, but you don't want to change the CAL and ALL settings in the middle of things (especially if you've shelled out to RATS with CATS still active). Instead, just set those once, at the beginning of the program, with the ALLOCATE ending date set to include any periods that you might want to forecast out of sample (per Section 6.3 of the CATS manual).

Also, I'm not sure that you're really going to be able to get back into CATS smoothly after doing the forecasting. To at least eliminate some potential issues, I would suggest:

a) Exporting the model from CATS
b) Exiting CATS
c) Doing the forecast

Once you reach the point of getting the desired results, you can experiment with shelling out rather than just exiting CATS, but for now I would try exiting rather than shelling out. Remember that you can always re-start CATS by simply executing the @CATS line and any required supplementary cards.

As a simple example, try using the sample program PPPUIP_i1A.PRG provided in the "demo" subdirectory of CATS:

*** STEP 1 ***
calendar 1975 1 12
allocate 2003:12
open data c:\cats2\demo\pppuip.xls
data(format=xls,org=obs)

*** STEP 2 ***
log uscpi / lp2 ;* US price level
log gecpi / lp1 ;* German price level
log exgeus / ls12 ;* $-DM exchange rate
set lp1c / = lp1 + 0.02222*(T>=1991:1) ;* correct lp1 for post-unification effects
set ppp / = 0.01*(lp1c-lp2-ls12) ;* ppp
set b1 / = 0.01*geb/12 ;* German bond rate
set b2 / = 0.01*usb/12 ;* US bond rate
diff lp1c / dp1c ;* German inflation
diff lp2 / dp2 ;* US inflation

*** STEP 3 ***
source c:\cats2\cats.src
@cats(lags=2,season=12,dettrend=cimean) 1975:07 1998:12
# Dp1c Dp2 b1 b2 ppp

Try setting the rank to 3, accepting the default normalization. Then, use the Misc menu to export the CATS model. Use the default (ECM) model form. Then, exit CATS completely (selecting Exit from the CATS menu).

Then, try the following FORECAST instruction (originally generated via the Wizard):

FORECAST(MODEL=CATSMODEL,FROM=1999:01,TO=1999:12,RESULT=FORE,WINDOW='Fore')

You should see reasonable-looking forecasts.

If this doesn't help sort out the problem with your own code, email us a copy of the program and data file so we can try it here (support@estima.com).

Regards,
Tom Maycock
Post Reply