I am trying to use simult_ function to simulate model that is solved using order=2 (and order=3). I start the simulation from the steady-state (oo_.dr.ys), input shocks that has value zero.

For order=1, everything works as expected: the deviation from oo_.dr.ys is zero.

For order=2, and order=3, the deviation is not anymore zero (in the attached example of magnitude 10^-3).

What is wrong? The attached code builds on jermann98.mod file using the instructions I found the forum.

Your model transitions from the deterministic steady state to the stochastic steady state. The latter is defined as the fixed point of the model in the absence of shocks, but where agents take into account that shocks might happen. At second order, you get an additional term g_sigma_sigma in your policy rules that depend on uncertainty. Because of that, the fixed point is not the deterministic steady state anymore. See e.g. the Appendix to Born/Pfeifer (2014): â€śRisk Matters: A commentâ€ť at aeaweb.org/articles.php?doi=10.1257/aer.104.12.4231

I have couple of couple of clarifying questions (letâ€™s limit to second order case for simplicity):

If I read the manual correctly the (higher order) approximation is still done around the deterministic steady-state?

Assuming the above is correct, then simulated path (of y^h = y-y^s) is affected by the additional constant term 0.5\Delta^2, and the second order term (y^h kronecker y^h) results the â€śhump-shapedâ€ť (non-constant) path?

It seems that dynare++ (that results a zero line in a similar exercise) does NOT take the approximation around the deterministic steady-state but around the point that takes into account this additional term. Itsâ€™ manual says â€śThe approximation takes into account deterministic effects of future volatilityâ€ť.

Is there way to do the same in the standard dynare?

The ultimate goal is to have more control over the impulse responses the model produces. (This is the reason for using simult_) For example, to see the impulse responses of a shock of certain size (different from standard error).

1.) Correct. Dynare always approximates around the steady state. There is some unfinished risky steady state implementation
2.) Exactly.
3.) Dynare++ by default recenters the approximation point following Juillard/Kamenik (2005) unless you use the

--no-centralize

option
4.) No, there isnâ€™t. At higher order, there are two common ways for computing GIRFs: the one of Fernandez-Villaverde et al 2011 that computes IRFs around the stochastic steady state and the one of Andreasen et al . (2012) that computes IRFs around the ergodic mean. I donâ€™t see why you would want to change the approximation point. The question rather is where to start your IRFs. In the replication code to Born/Pfeifer (2014): â€śRisk Matters: A commentâ€ť you can find code that uses the simult_ function to compute IRFs around the stochastic steady state. There, the hump would be absent.

Thanks again Johannes! This is really beyond the call of duty!

I quickly skimmed your code. Is the following interpretation right

You simulate looonnngg sequence with zero shocks and take the last value to of the path to get what you call â€śergodicmean_no_shocksâ€ť.

You simulate the shocked path starting from this â€śergodicmean_no_shocksâ€ť and calculate the impulse responses as the deviation from the above mentioned â€śergodic meanâ€ť.

Exactly. You start at the stochastic steady state and, given that there is only a one-time shock, you will converge back to it. The IRF is thus the difference. But you really should not call it ergodic mean. Either call it â€śergodic mean in the absence of shocksâ€ť or â€śstochastic steady stateâ€ť. Ergodic mean would be the mean of the simulation with shocks.

Finally, when using these IRFs at an order higher than 2, you should be aware of their advantages and limitation. See Section â€śIV. IRFs at the Ergodic Meanâ€ť of the Appendix to the comment references above.

If I may pick up on this disscusion. Actually, if one use the pruning option with third order approximation in stoch_simul command then the response to the zero shock is no longer zero as in the example posted by Anti where the pruning was not used. So in general one will get different impulse responses (starting from the â€śergodic mean in the absence of shocksâ€ť and using simult_) to shocks with and without pruning used in the stoch_simul command. Hence my question is: if one uses the pruning option should the impulse responses to some shock in the model be computed as a difference between (I assume there is only one exogenous shock in the model):

IRFs = simult_(initial_condition_states,oo_.dr, ex_1, 3) - simult_(initial_condition_states,oo_.dr, ex_0, 3) where ex_0 is just a vector of zeros and where ex_1(1,1) = 1, and initial_condition_states is the â€śergodic mean in the absence of shocksâ€ť.

Sorry, but I donâ€™t understand what you mean. Even with pruning the IRF to a 0 shock will be 0. See our replication code for Born/Pfeifer (2014) â€śRisk Matters: A commentâ€ť where we use pruning.

It appears there is a short transition period after the zero shock when the pruning is used. The system starts from the stochastic steady state but it deviates for few periods and then returns back to the stochastic steady-state. I agree it should be zero but it seems that it is not. Maybe I did something wrong. I will check again and post the code when I get to my laptop.

The problem is the particular pruning scheme. As shown in Andreasen et al., pruning enlarges the state-space. In this case, the EMAS is characterized by three initial states instead of just one as in the Fernandez-Villaverde et al (2011) pruning. But you are currently initializing the pruned system with only one element of the enlarged state-space.

Ok. I get your point. So what is your opinion on taking care of this when constructing the IRFs to nonzero shock by simply substracting the zero shock IRFs? My intuition is that this should work at least as an approximation.