# IRFs value depend on number of periods

**URL:** <https://forum.dynare.org/t/irfs-value-depend-on-number-of-periods/25807>\
**Category:** Stochastic simulations\
**Created:** [24 May 2024 14:21 UTC](https://forum.dynare.org/t/irfs-value-depend-on-number-of-periods/25807 "2024-05-24T14:21:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luca](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/51bf81/32.png) [@luca](https://forum.dynare.org/u/luca)\
**Post date:** [24 May 2024 14:21 UTC](https://forum.dynare.org/t/irfs-value-depend-on-number-of-periods/25807/1 "2024-05-24T14:21:58Z")

</div>

Hello, I am trying to generate IRFs of a model using 4th order perturbation with the code:  
stoch\_simul(order=4, irf=51, periods=0, irf\_plot\_threshold=0, nograph)

I notice that if I change the number of periods of the irf (irf option), or the number of periods of the simulation (periods option), irfs for some endogenous variables can change quite significantly. It is the first time this has happened to me. How can this be the case? If it can help, those endogenous variables seem to be also highly sensitive to higher order terms, as if I change the order of perturbation from 3 to 4, IRFs also change significantly.

Thanks a lot 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:** [25 May 2024 06:34 UTC](https://forum.dynare.org/t/irfs-value-depend-on-number-of-periods/25807/2 "2024-05-25T06:34:40Z")

</div>

IRFs at higher order are generalized IRFs based on simulations. If you don’t use IRFs at the stochastic steady state instead, you need a `replic` that is very high to get consistent IRFs.

---

<div class="post-metadata">

**Author:** ![luca](https://forum.dynare.org/letter_avatar_proxy/v4/letter/l/51bf81/32.png) [@luca](https://forum.dynare.org/u/luca)\
**Post date:** [27 May 2024 06:55 UTC](https://forum.dynare.org/t/irfs-value-depend-on-number-of-periods/25807/3 "2024-05-27T06:55:30Z")

</div>

Thank you! So when computing IRFs around the stochastic steady state, we always get consistent IRFs? Is this [DSGE\_mod/Basu\_Bundick\_2017/Basu\_Bundick\_2017.mod at master · JohannesPfeifer/DSGE\_mod · GitHub](https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Basu_Bundick_2017/Basu_Bundick_2017.mod) the most recent reference on how to compute IRFs around a stochastic steady state?

---

<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:** [27 May 2024 07:27 UTC](https://forum.dynare.org/t/irfs-value-depend-on-number-of-periods/25807/4 "2024-05-27T07:27:44Z")

</div>

Yes, that is correct.
