Dear Dynare staff,

I am trying to run a deterministic simulation, by using the following command `simul (periods=100);`

in the model by Gertler and Karadi (2011).

While the stochastic simulation works properly, when I try to use simul command the simulation does not work and the endogenous variables take NaN as values.

The model is correctly specified (it is just the one downloaded from their website and also initval are correct). How can I solve this problem?

Thanks is advance for your kind help.

DSGE.mod (4.7 KB)

The algorithm used for solving deterministic models solves for the trajectory of all endogenous variables given initial values and terminal values (steady state).

This comes down to solving for current variables given the value of lead and lag variables.

In this model, equations 2 and 4 have a unique current variable, R, so the above approach canâ€™t work.

I need to think if there is a work around.

In the model only the expectation of Rk matters for the dynamics, not its current value.

In deterministic perfect foresight models, the expectation of a variable is equal to its future value.

Here is a version of the model that uses the expectation of Rk (eRk) instead of its current value. Equation 6 is modified accordingly.

I have added tags to the equations to help me see which equation was determining which current variable (the mapping is probably not unique).

Best

Michel

DSGE1.mod (4.92 KB)

Dear Michel Juillard,

thanks a lot for your help to solve this problem. Now it works fine.

Thanks again

my best regards

marco