Hi, anyone has idea why while the mod file could compute simulated moments but cannot produce impulse response functions? All numbers recorded in IRF, e.g, variable_shock, are NaN.
Here is the mod file, a simple OLG neoclassical growth model.
gammaNotOne.mod (1.47 KB)
Try putting order=1 or pruning into stoch_simul
It does work if order=1. What is the reason?
If I simply change the risk aversion parameter gamma to 1 and accordingly modify the Euler equation slightly, the mod produces IRF even order=2. Why if gamma=2 the IRF are NaN?
gammaIsOne.mod (1.54 KB)
I spot some errors in the mod file. The consumption variable should be forward-looking in the Euler equation.
Without pruning the simulations used for generating the IRFs might be explosive. See the spawning literature on pruning starting with Kim, Kim, Schaumburg, Sims
Explosive simulations without pruning don’t tell you anything about your model. It is just a problem with the solution technique used to solve your model. Just read the first two pages of Den Haan/De Wind (2012): “Nonlinear and stable perturbation-based approximations”.
If first order looks ok and only at second order problems appear, this simply suggests problem with pruning