Problem with varexo_det/ forecast + 2nd order approximati

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.

Problem with varexo_det/ forecast + 2nd order approximati

Postby Ansgar » Mon Aug 11, 2014 7:16 pm

Dear all,
I think I might have discovered a problem in dynare 4.4.3 and 4.3.3 relating to the conduct of simulations via the mixing of stochastic and deterministic shocks, i.e. using the varexo_det and forecast commands. Specifically, I tried to reproduce results from a simulation I had originally conducted in dynare 4.2.0. and earlier versions of dynare 4 and found that they differed if I use the second order approximation.
I searched the forum to see whether the issue has been discussed before, but did not find anything. To illustrate the issue, I have attached a .mod file, which is a modified version of example2.mod of Fabrice Collard which comes with each dynare installation. I introduce a deterministic shock e_det via the varexo_det command and also use the second order approximation to the solution of the model (dynare stores those results in the oo_.forecast.Mean folder, so I will refer to them as forecasts to distinguish them from the more conventional impulse responses). I find the following:
• With dynare 4.4.3 and 4.3.3, the forecast differs from the one generated by dynare 4.2.0 if I use the second order approximation (see for instance variable dy). For the first order approximation, the forecast is the same.
• By contrast, simple impulse responses computed under the second order approximation appear to be the same no matter whether version 4.4.3 or 4.2.0 is used.
• In principle, I guess both version 4.4.3 and 4.2.0 are equally likely to have a bug, but I suspect the problem is more likely to be with dynare 4.4.3: Within dynare 4.4.3, the forecast produced under the second order approximation appears to be affected by the presence or absence of essentially pure output variables, i.e. variables which are not necessary to solve the rest of the system. To see what I mean, “comment in” lines 27, 49 and 63, which adds an equation defining a new variable called “Sum”, which simply equals c+y. It does not appear in any other equation, you will find that it changes the forecast for the other variables. By contrast, in dynare 4.2.0, adding this equation has no effect on the other variables, as we would expect.
Needless to say, I would be extremely grateful for your help!
Kind regards,
Ansgar
Attachments
example2_A.mod
(1.7 KiB) Downloaded 174 times
Ansgar Rannenberg
IMK
Tel.: +49/211/7778113
Ansgar
 
Posts: 46
Joined: Tue Jun 26, 2007 11:35 am
Location: Düsseldorf

Re: Problem with varexo_det/ forecast + 2nd order approximat

Postby jpfeifer » Fri Aug 15, 2014 6:31 pm

Dear Ansgar,

thanks for reporting this. We will look into this and keep you posted. For now, see https://github.com/DynareTeam/dynare/issues/712

Best,

Johannes
------------
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: Problem with varexo_det/ forecast + 2nd order approximat

Postby jpfeifer » Sun Nov 02, 2014 7:02 pm

Hi Ansgar,
the 4.2 branch was correct. A bugfix for 4.4.3 is attached.
Attachments
stochastic_solvers.m
(13.53 KiB) Downloaded 173 times
------------
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: Problem with varexo_det/ forecast + 2nd order approximat

Postby Romero » Mon Nov 03, 2014 7:51 am

Thank's a lot, Johannes, that is very good news.
Best,
Ansgar
Romero
 
Posts: 1
Joined: Sun Aug 10, 2014 11:17 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests