# Second order linearization does not generate IRFS

**URL:** <https://forum.dynare.org/t/second-order-linearization-does-not-generate-irfs/28159>\
**Category:** Stochastic simulations\
**Created:** [5 January 2026 23:11 UTC](https://forum.dynare.org/t/second-order-linearization-does-not-generate-irfs/28159 "2026-01-05T23:11:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramani](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@ramani](https://forum.dynare.org/u/ramani)\
**Post date:** [5 January 2026 23:11 UTC](https://forum.dynare.org/t/second-order-linearization-does-not-generate-irfs/28159/1 "2026-01-05T23:11:19Z")

</div>

[cg\_utility\_Passive\_Wel.mod](https://forum.dynare.org/uploads/short-url/946wMLHKib4GgywsLPdAaMLmKQY.mod) (7.7 KB)

Hello, I am trying to calculate the welfare cost for a New-Keynesian model. For this I take the 2nd order approximation. But the stoch\_simul (order =2) does not generate the IRFs (NaN). If I take the first order approximation stoch\_simul (order =1), then it generates the IRFS. Any idea why it is the case and what is the solution? I have attached the mod file.

---

<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:** [6 January 2026 08:59 UTC](https://forum.dynare.org/t/second-order-linearization-does-not-generate-irfs/28159/2 "2026-01-06T08:59:49Z")

</div>

If you want to generate GIRFs at higher order, you need to use `pruning`.

---

<div class="post-metadata">

**Author:** ![ramani](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/3da27b/32.png) [@ramani](https://forum.dynare.org/u/ramani)\
**Post date:** [6 January 2026 23:14 UTC](https://forum.dynare.org/t/second-order-linearization-does-not-generate-irfs/28159/3 "2026-01-06T23:14:42Z")

</div>

Thanks a lot Dr. Pfeifer for the help! It works!
