# Deterministic simulation and impulse response

**URL:** <https://forum.dynare.org/t/deterministic-simulation-and-impulse-response/17070>\
**Category:** Perfect foresight simulations\
**Created:** [6 December 2020 12:49 UTC](https://forum.dynare.org/t/deterministic-simulation-and-impulse-response/17070 "2020-12-06T12:49:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![1734qq](https://forum.dynare.org/letter_avatar_proxy/v4/letter/1/0ea827/32.png) [@1734qq](https://forum.dynare.org/u/1734qq)\
**Post date:** [6 December 2020 12:49 UTC](https://forum.dynare.org/t/deterministic-simulation-and-impulse-response/17070/1 "2020-12-06T12:49:36Z")

</div>

I want to ask a seemingly silly question.Deterministic simulation If you use an unexpected shock the simulation path that you get is equivalent to the impulse response that you get in a nonlinear environment, right?

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [7 December 2020 09:23 UTC](https://forum.dynare.org/t/deterministic-simulation-and-impulse-response/17070/2 "2020-12-07T09:23:59Z")

</div>

I am not sure I understand the question. What has nonlinearity to do with it? Did you mean

> [@Stoch\_simull(order=1) and news shocks](https://forum.dynare.org/t/stoch-simull-order-1-and-news-shocks/6282):
>
> Dear all, I have a stupid and embarrassing question to ask. I let dynare solve my DSGE model by choosing a first order Taylor approximation (i.e. stoch\_simull(order=1,…) ). However, we know that 1st order linearizations yield the certainty equivalence property. Since my model contains news shocks, is there a conflict regarding the approximation number? As we know it is quite complicated to introduce news shocks into perfect foresight models. Many thanks in advance for your help. Best Robert

?

---

<div class="post-metadata">

**Author:** ![1734qq](https://forum.dynare.org/letter_avatar_proxy/v4/letter/1/0ea827/32.png) [@1734qq](https://forum.dynare.org/u/1734qq)\
**Post date:** [7 December 2020 09:41 UTC](https://forum.dynare.org/t/deterministic-simulation-and-impulse-response/17070/3 "2020-12-07T09:41:54Z")

</div>

What I mean by this is that if unexpected shocks are used in deterministic simulations, then the resulting simulation path for each variable is in fact the impulse response diagram of that shock.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [7 December 2020 10:03 UTC](https://forum.dynare.org/t/deterministic-simulation-and-impulse-response/17070/4 "2020-12-07T10:03:11Z")

</div>

Yes, the responses of an unanticipated shock in perfect foresight simulations can be interpreted as an impulse response.

---

<div class="post-metadata">

**Author:** ![1734qq](https://forum.dynare.org/letter_avatar_proxy/v4/letter/1/0ea827/32.png) [@1734qq](https://forum.dynare.org/u/1734qq)\
**Post date:** [8 December 2020 02:00 UTC](https://forum.dynare.org/t/deterministic-simulation-and-impulse-response/17070/5 "2020-12-08T02:00:31Z")

</div>

Thank you, professor.I want to ask you one more question, how do you implement the regime-switching model？I want to know how do you write it in a mod if you want to set up the talyor rule in the first few periods , and then switch to another rule.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [8 December 2020 08:24 UTC](https://forum.dynare.org/t/deterministic-simulation-and-impulse-response/17070/6 "2020-12-08T08:24:44Z")

</div>

Do you mean true regime-switching where agents know the probabilities of switching to a different regime? Or an unforeseen break in policy? Or an anticipated change in policy that is known to be once and for all?

---

<div class="post-metadata">

**Author:** ![1734qq](https://forum.dynare.org/letter_avatar_proxy/v4/letter/1/0ea827/32.png) [@1734qq](https://forum.dynare.org/u/1734qq)\
**Post date:** [8 December 2020 08:36 UTC](https://forum.dynare.org/t/deterministic-simulation-and-impulse-response/17070/7 "2020-12-08T08:36:57Z")

</div>

Thank you professor, I have not read enough literature, I did not expect there are so many kinds.  
I would like to ask the models that the agent to know the probability and the models that the agent fully anticipates regime-switching.

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [8 December 2020 11:19 UTC](https://forum.dynare.org/t/deterministic-simulation-and-impulse-response/17070/8 "2020-12-08T11:19:13Z")

</div>

A perfectly anticipated change is a straightforward perfect foresight exercise. You can implement this via an exogenous variable being an indicator for the regime.

Agents knowing the probability is of a switch usually boils down to Markov-Switching DSGE models. Do a Google search and you will find a large literature. Junior Maih’s RISE toolbox is well-suited for this model class.
