Bug in Dynare 4.1.0?

Hey all,

I’m writing to ask for some help with the simulation of the first order approximation of the model I’m currently working with. The model solves ok, but if I set the variance of only one exogenous shock for a value different than zero, Dynare still plots impulse response functions for other exogenous variables. In the example I’m posting here, I have only a shock in the variable “g” (line 177), but there is still some response in the exogenous variable “mv” (line 162 of the code).

I solved the model in Dynare 4.0.4, but today I tried with Dynare 4.1.0. The problem still persists, with one important detail: in the variance decomposition, the values of “mv” are explained by 113% by its exogenous shock “mvsh”… That’s a bug, I assume.

Any help, comments, fixes, responses will be greatly appreciated!

Best,

Angelo

P.S.: by the way, great job with the variance decomposition in Dynare 4.1.0!!! Thank you so much for the added feature!model_steadystate.m (8.57 KB)model.mod (13.1 KB)

Hi,

The variable “mv” is not an exogenous, but an endogenous. So it is normal that Dynare gives IRF for that variable. You will however note that the IRF is almost flat (the shift is only of about 1e-9), so this is consistent with the fact that this variable is constant when you switch off the exogenous “mvsh”.

However there is indeed a bug with variance decomposition. In your particular example, since you have activated only one shock, the true answer is of course that this shock explains 100% of the variance of all endogenous variables. We will fix that bug in the future 4.1.1 release. This problem probably occurs with model containing non-stationary variables, as your model does: for the moment, stick to Dynare 4.0.4 if you need right values of variance decomposition.

Thanks for reporting this.

Hi Sebastien,

Thanks for your reply. One question, more related with the computational aspects of Dynare: it’s quite obvious that the IRF in other autorregressive variables than g, in my example, should be equal to zero, as they are not perturbed by a shock in g. My question is: what is exactly generating this very small perturbance in mv (as you said, up to 1e-9)? Is it related to the number of state variables in the model? Is it because of the new module in C++ and the way it invert some of the matrices to obtain the solution of the model?

Note that I clearly understand that this is a computational issue, and not something related with the model I presented. I’m just curious if you had seeing anything like that before, and if you have a clue about what is going on.

Thanks, again, for your previous reply.

Angelo