Simulation explodes with basic New Keynesian model

Using Dynare to solve a basic New Keynesian sticky-price model, simulations of the 2nd order accurate solution explode after a few iterations. The policy rule is completely standard (Taylor rule with smoothing, weight on output = 0 and weight on inflation =1.5; the problem exists anyway for a variety of parametrizations). Using Dynare ++ I get the following: Order 2,4

Caugth Kord exception: At ./decision_rule.hweb:652:(253):NaN or Inf asserted in

Order 3,5:

SImulation explodes.

The model code has been double checked, and up to first order Dynare computes the same law of motion as when fed with the model log-linearized by hand.

  1. could it be that the model is simply globally non-stationary?

  2. Yet I am baffled by the fact that when you look at the individual simulated time series, even the series for the exogenous shocks (which are by construction stationary) explode.



It is frequent for a model to explode at 2nd order, because the shocks are too big for the radius of convergency of the second order approximation.

But if even the exogenous variables explode, this is suspicious. Could you post the *.mod file?



Are there any (published if possible) references to this phenomenon?

Thank you,


Dear Juha and Federico,

I examined your model file. Your calibration of shocks is extremely large. The standard error of your shocks is equal to 0.1, but you use your shocks aditively in logarithms. For example your muc equation looks like: exp(muc)=exp(d)*(…), where d is the shock. This shocks muc by ±10%. No wonder that the solution taking into account effects of this huge volatility is not stationary.

If you have observed exploding exogenous processes which are by definition stationary, make sure what you really observed. There are two possibilities:

First one is that you observed only consequences of numerical error commited by operations with huge (exploding) other variables. Note that the exogenous processes are solved numerically and thus dependence of these exogenous processes on the other variables is in practice non-zero (although in theory they are zero). In Dynare++ the numbers, which should be in theory equal to zero, are of orders of 1.e-15.

Second one is a real bug. Please report it.

More comments:

  1. The message NaN or Inf asserted in fix point calculations means that starting from deterministic steady and shocking the economy with zero shocks, the path explodes. This indicates a non-stationary solution.

  2. In the private email, you mentioned a simulation algorithm using pruning due to Sims and Kim (2003). We should discuss it at some point with Michel. I don’t know much details at the moment, I had only some discussion with Jinill Kim. I mean we should start a theoretically well founded discussion, I don’t know. Does anybody know how to access stationarity of a non-linear solution? There are many questions not answered yet. We should also consider making a support of shocks bounded. I don’t know.

Let me know if you have further questions

Ondra K.