# Perfect foresight simulation with multiple shocks

**URL:** <https://forum.dynare.org/t/perfect-foresight-simulation-with-multiple-shocks/22378>\
**Category:** Perfect foresight simulations\
**Created:** [2 May 2023 10:53 UTC](https://forum.dynare.org/t/perfect-foresight-simulation-with-multiple-shocks/22378 "2023-05-02T10:53:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KGK](https://forum.dynare.org/letter_avatar_proxy/v4/letter/k/edb3f5/32.png) [@KGK](https://forum.dynare.org/u/KGK)\
**Post date:** [2 May 2023 10:53 UTC](https://forum.dynare.org/t/perfect-foresight-simulation-with-multiple-shocks/22378/1 "2023-05-02T10:53:29Z")

</div>

Dear Dr. Pfeifer,

I am trying to conduct a perfect foresight simulation as described on slides 57-59 in this presentation by Villemot: [https://sebastien.villemot.name/pdf/talks/2019/deterministic.pdf](https://sebastien.villemot.name/pdf/talks/2019/deterministic.pdf), [deterministic-examples/rbc\_unexpected.mod · 73579ccff9f96e25f0cc0f4b96fcc74c9040f096 · Sébastien Villemot / perfect-foresight-slides · GitLab](https://git.dynare.org/sebastien/perfect-foresight-slides/-/blob/73579ccff9f96e25f0cc0f4b96fcc74c9040f096/deterministic-examples/rbc_unexpected.mod).

Specifically, I would like to implement a perfect foresight simulations in which the economy is hit by two shocks in different periods (e.g., a pre-announced shock in period 1 and then an unexpected shock in period 10 as in the slides). I could implement this following the slides when both shocks are transitory. However, I am wondering if there is a way to declare the second shock as permanent (instead of transitory as described in the example in the slides).

Thanks in advance.

---

<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:** [3 May 2023 12:25 UTC](https://forum.dynare.org/t/perfect-foresight-simulation-with-multiple-shocks/22378/2 "2023-05-03T12:25:34Z")

</div>

Dynare has a new syntax for experiments like this. See [tests/deterministic\_simulations/pfwee\_learnt\_in.mod · master · Dynare / dynare · GitLab](https://git.dynare.org/Dynare/dynare/-/blob/master/tests/deterministic_simulations/pfwee_learnt_in.mod) and the manual.
