# Second order approximation and the IRF explosive

**URL:** <https://forum.dynare.org/t/second-order-approximation-and-the-irf-explosive/11515>\
**Category:** Optimal Policy\
**Created:** [21 March 2018 14:10 UTC](https://forum.dynare.org/t/second-order-approximation-and-the-irf-explosive/11515 "2018-03-21T14:10:46Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Grant](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Grant](https://forum.dynare.org/u/Grant)\
**Post date:** [28 March 2018 16:32 UTC](https://forum.dynare.org/t/second-order-approximation-and-the-irf-explosive/11515/4 "2018-03-28T16:32:32Z")

</div>

Dear Prof. Jpfeifer,

Thanks for your reply. The post you pointed to is very helpful. And I can run the 2nd order approximation well when I reduce the shock size to 0.01.

However, for the code you posted in [Policy frontier](https://forum.dynare.org/t/policy-frontier/5910/6), it uses the command “osr” which is designed for the linear-quadratic problem. What I want to do is to find the values of the optimal policy coefficients which can maximize the welfare. The welfare is defined as a variable as the utility of the household. I have clearly written the model in level and the steady states. The parameter values of the policy rule do Not impact the steady states. I think I might have to write a function which can solve the maximization problem based on the function of welfare, but I don’t know how to do it in Dynare. Could you please help me with it?

Thank you very much. I am looking forward to your reply.

---

_[View the full topic](https://forum.dynare.org/t/second-order-approximation-and-the-irf-explosive/11515)._
