# DiscretionaryPolicy

**URL:** <https://forum.dynare.org/t/discretionarypolicy/16919>\
**Category:** Optimal Policy\
**Created:** [11 November 2020 17:47 UTC](https://forum.dynare.org/t/discretionarypolicy/16919 "2020-11-11T17:47:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vogel](https://forum.dynare.org/letter_avatar_proxy/v4/letter/v/e95f7d/32.png) [@vogel](https://forum.dynare.org/u/vogel)\
**Post date:** [11 November 2020 17:47 UTC](https://forum.dynare.org/t/discretionarypolicy/16919/1 "2020-11-11T17:47:30Z")

</div>

Good Evening,

can someone tell me (or have a hint) how to adapt my code below to simulate an anticipated shock under discretionary policy?  
With taylor rule (not implemented here) and commitment / ramsey\_policy I can simply change the anticipation horizon from 0 in epsu to 1 in epsu(-1) for example, but with discretionary\_policy it (obviously) doesn’t work…

Thank you very much in advance.

[forum.mod](https://forum.dynare.org/uploads/short-url/3EqnyENlyx7zEG76YMvu7BBxxkW.mod) (650 Bytes)

---

<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:** [11 November 2020 21:10 UTC](https://forum.dynare.org/t/discretionarypolicy/16919/2 "2020-11-11T21:10:13Z")

</div>

Thanks for reporting this. It seems to be due to a bug. For a fix, see [https://git.dynare.org/Dynare/dynare/-/merge\_requests/1767](https://git.dynare.org/Dynare/dynare/-/merge_requests/1767)

---

<div class="post-metadata">

**Author:** ![vogel](https://forum.dynare.org/letter_avatar_proxy/v4/letter/v/e95f7d/32.png) [@vogel](https://forum.dynare.org/u/vogel)\
**Post date:** [12 November 2020 14:50 UTC](https://forum.dynare.org/t/discretionarypolicy/16919/3 "2020-11-12T14:50:24Z")

</div>

Thank you for the quick answer&fix!
