Question About Recursive Forecasts

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Question About Recursive Forecasts

Postby ErikinWest » Thu May 29, 2014 1:26 pm

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
ErikinWest
 
Posts: 5
Joined: Sun May 25, 2014 10:00 pm

Re: Question About Recursive Forecasts

Postby jpfeifer » Sun Jun 01, 2014 11:08 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Question About Recursive Forecasts

Postby ErikinWest » Mon Jun 02, 2014 12:58 am

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

Erik
ErikinWest
 
Posts: 5
Joined: Sun May 25, 2014 10:00 pm

Re: Question About Recursive Forecasts

Postby ErikinWest » Tue Jun 03, 2014 1:27 am

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
Attachments
simulate.mod
Generates simulated data
(1.29 KiB) Downloaded 62 times
data_puller.m
function to help extract data
(155 Bytes) Downloaded 56 times
forecast2.mod
Generates one-step-ahead forecasts
(1.74 KiB) Downloaded 75 times
forecast.mod
estimates model parameters
(1.67 KiB) Downloaded 80 times
script_forum.m
main script
(4.61 KiB) Downloaded 57 times
ErikinWest
 
Posts: 5
Joined: Sun May 25, 2014 10:00 pm

Re: Question About Recursive Forecasts

Postby jpfeifer » Sat Jun 07, 2014 8:19 pm

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Question About Recursive Forecasts

Postby ErikinWest » Sun Jun 08, 2014 3:29 pm

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

Thanks for your time,
Sincerely,
Erik
ErikinWest
 
Posts: 5
Joined: Sun May 25, 2014 10:00 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 5 guests