# Expected shocks in stochastic simulations

Dear Professor Pfeifer/Dynare team,

I would like to ask you how Dynare computes stochastic simulation with added expected shocks. Does Dynare automatically expand the model with some additional equations (could you just briefly explain, how it works)? Does this approach still use perturbation approximation, and does it works with higher-order approximations?

Any suggestion/reference to the literature would be welcome!

Best
Jan Žemlička

See section 4.6 of the DYNARE reference manual on Auxiliary Variables for DYNARE implementation and the discussions on these forums here and here for examples.

My understanding is that anticipated shocks in DYNARE are by default modeled as in Schmitt-Grohe and Uribe (2012) and detailed in section 4 of their web appendix. If a shock is anticipated n periods in advance then DYNARE will generate n auxiliary variables to implement it. For example the paper above contains 7 driving processes which are subject to shocks anticipated 0, 4, and 8 periods in advance; as a result there are a total of 7*(0+4+8)=84 auxiliary state variables created in DYNARE if you enter the processes as x = x(-1) + ε0 + ε4(-4) + ε8(-8).

An alternative which may reduce the number of state variables (which is also documented in Section 4 of the technical appendix to SGU above) involves writing the states as a recursive system. This is my preferred method as it allows greater flexibility and often fewer states which speeds up estimation. But for stochastic simulations they are entirely equivalent.

All solution methods should be the same in DYNARE. The only difference is that with leads/lags in excess of 1 the program goes “behind the scenes” to replace what you wrote in the .mod file with the auxiliary state variables and their supporting system, and then perturbs this augmented system. Anticipated shocks aren’t actually any different than unanticipated ones, so I wouldn’t expect higher order approximations to present any special challenge.

Thank you very much!
If I can have one more question: is there any possibility to include expected shocks into stochastic simulation under optimal policy (computed by Ramsey_policy), if possible at 2/3 order?

I don’t think I understand the question. It is possible to consider any anticipation structure you would like for stochastic simulations.

@CZJAN A full answer might be more complex. What exactly did you have in mind?

Hi @jpfeifer. I was thinking about computing second/third order simulation under Ramsey policy when there is expected price shock (oil) to capture both effect of anticipated shock and uncertainty about “regular” fluctuations caused by stochastic shocks.

Best
Jan

When you say

what exactly do you mean? If it’s just a news shock, then yes, you can use it together with `order=2` in Ramsey.

What I mean is that there will be increase in oil prices, but it is expected n-periods ahead. Is it ok?

Sure, that is a news shock. But the central question is whether those shocks can happen regularly or whether there is a one time shock and nobody expects such news shocks in the future.