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

example2_A.mod (1.7 KB)

Dear Ansgar,

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

Best,

Johannes

Hi Ansgar,

the 4.2 branch was correct. A bugfix for 4.4.3 is attached.

stochastic_solvers.m (13.5 KB)

Thank’s a lot, Johannes, that is very good news.

Best,

Ansgar