Page 1 of 1

Question About Recursive Forecasts

PostPosted: Thu May 29, 2014 1:26 pm
by ErikinWest
Dear all,

I've been puzzled about the recursive forecast command. Consider my estimation command:

estimation(datafile=data,conf_sig =.95,nobs=[39:47],forecast=4,nodisplay) pie da r;

Now, my 'oo_.RecursiveForecast.Mean.pie', contains a 9X4 matrix. The columns represent the kth step ahead forecast of inflation. And the row represents the maximum observation numbers up until that point. So Row 9 is the forecasts made "Using in total 47 observations. "

However! When I look at the one-step-ahead forecasts, I find that the that forecast using data up until 39th, 40th, 41st, ..., 47th best fits with the ACTUAL data of the 39th, 40th, ...., 47th obsevation. This is odd! After all, Row 1 Column 1 should correspond to the forecast of the 40th period, and Row 2 Column 1 should correspond to the forecast of the 41st period!

Am I missing something? I've included a picture that shows with two of the data series. The pictures on the left show the one-step-ahead forecasts ( i.e. oo_.RecursiveForecast.Mean.pie(:,1) ) synced up with the 39-47th actual data series, and on the right, the same one-step-ahead forecasts are synced up with the 40-48th actual data.

http://postimg.org/image/7lncjayjb/

Thanks for any assistance.
Erik

Re: Question About Recursive Forecasts

PostPosted: Sun Jun 01, 2014 11:08 am
by jpfeifer
Could you try the most recent unstable Dynare version. If the problem persists, could you please send me the files you are using including the ones you used to generate the picture.

Re: Question About Recursive Forecasts

PostPosted: Mon Jun 02, 2014 12:58 am
by ErikinWest
Ok thank you, I will try this and report back.

Erik

Re: Question About Recursive Forecasts

PostPosted: Tue Jun 03, 2014 1:27 am
by ErikinWest
Hi again,

I downloaded the most recent version of Dynare and tried it again, and the results still are the same.

I've attached the matlab script, including three .mod files and a function. If you run my script it will generate those four pictures that I attached.

I appreciate your help.

Erik

Re: Question About Recursive Forecasts

PostPosted: Sat Jun 07, 2014 8:19 pm
by jpfeifer
I finally found the time to check it. The recursive forecasts of Dynare are correct. The reason you think the forecast is wrong is that you misjudged the relative importance of predictable and unpredictable components. Forecasts can only with one period lag adopt to unpredictable shocks that happen in the next period. Consider the following example to see the logic why the forecast may appear to lag by one period:
Say you have an AR1 process with autocorrelation 0.9, you know the true process and the starting value at time 0. Given this information, you forecast next period's value to be 0 as well. But in the data, a shock of size 1 happens. At time t=1 you now observe a value of x_1=1. Your forecast for time t=2 will now be \hat x_2=0.9*x_1=0.9. Thus the forecast will adjust to the large shock at time 1 only in period 2.

Onl< if the shock size is always 0 will the values be the same. If you want, I can provide you with a modified version of your code that shows this for a simple AR1.

Re: Question About Recursive Forecasts

PostPosted: Sun Jun 08, 2014 3:29 pm
by ErikinWest
Ah yes ok thanks Johannes! No no it's quite all right I understand!

Thanks for your time,
Sincerely,
Erik