Question About Recursive Forecasts

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.

Thanks for any assistance.

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.

Ok thank you, I will try this and report back.


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.

simulate.mod (1.29 KB)
data_puller.m (155 Bytes)
forecast2.mod (1.74 KB)
forecast.mod (1.67 KB)
script_forum.m (4.61 KB)

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.

Ah yes ok thanks Johannes! No no it’s quite all right I understand!

Thanks for your time,