# Unable to find perfect foresight solution of simple NK model with ZLB

**URL:** <https://forum.dynare.org/t/unable-to-find-perfect-foresight-solution-of-simple-nk-model-with-zlb/14663>\
**Category:** Perfect foresight simulations\
**Created:** [29 October 2019 17:20 UTC](https://forum.dynare.org/t/unable-to-find-perfect-foresight-solution-of-simple-nk-model-with-zlb/14663 "2019-10-29T17:20:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![N2K2](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/47e85d/32.png) [@N2K2](https://forum.dynare.org/u/N2K2)\
**Post date:** [29 October 2019 17:20 UTC](https://forum.dynare.org/t/unable-to-find-perfect-foresight-solution-of-simple-nk-model-with-zlb/14663/1 "2019-10-29T17:20:43Z")

</div>

Hi everyone,

I’ve adapted the example available at [https://github.com/JohannesPfeifer/DSGE\_mod/blob/master/Gali\_2015/Gali\_2015\_chapter\_5\_commitment\_ZLB.mod](https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Gali_2015/Gali_2015_chapter_5_commitment_ZLB.mod) to find a perfect foresight solution of a simple model consisting of the usual Phillips and IS curves, plus a “strict inflation targeting” rule of the form [mcp=‘i\>0’] pi = 0. However, I’m surprised that Dynare is struggling to find a solution. In particular, I get the following:

_Simulation of the perfect foresight model failed!_  
_Switching to a homotopy method…_

_Iter. | Lambda | status | Max. residual_  
_++++++++++++++++++++++++++++++++++++++++++++++++++++++++_  
_1 | 0.50000 | succeeded | 1.776357e-15_  
_2 | 1.00000 | failed | 5.557033e+00_  
_3 | 0.75000 | failed | 2.778516e+00_  
_4 | 0.62500 | failed | 1.389258e+00_  
_5 | 0.56250 | failed | 6.946291e-01_  
_6 | 0.53125 | failed | 3.473146e-01_  
_7 | 0.51563 | failed | 1.736573e-01_  
_8 | 0.50781 | failed | 8.682864e-02_  
_9 | 0.50391 | failed | 4.341432e-02_  
_10 | 0.50195 | failed | 2.170716e-02_  
_11 | 0.50098 | failed | 1.085358e-02_  
_12 | 0.50049 | failed | 5.426790e-03_  
_13 | 0.50024 | failed | 2.713395e-03_  
_14 | 0.50012 | failed | 1.356697e-03_  
_15 | 0.50006 | failed | 6.783487e-04_  
_16 | 0.50003 | failed | 3.391744e-04_  
_17 | 0.50002 | failed | 1.695872e-04_  
_++++++++++++++++++++++++++++++++++++++++++++++++++++++++_

_Failed to solve perfect foresight model_

Is anyone able to suggest strategies for dealing with this problem?

A copy of my code is attached. Note that I’ve used “%%%” to comment out equations and variables that were specific to the example I mentioned above, and if you uncomment those parts you’ll see that the code runs fine.

Thanks very much!

Best,  
N2K2

[Gali\_chap5\_\_v1c.mod](https://forum.dynare.org/uploads/short-url/jDzTIHbFgBFVMj9aZABzLLSbqvy.mod) (1.6 KB)

---

<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:** [30 October 2019 10:04 UTC](https://forum.dynare.org/t/unable-to-find-perfect-foresight-solution-of-simple-nk-model-with-zlb/14663/2 "2019-10-30T10:04:26Z")

</div>

Are you sure that model has a solution? If I use

```auto
pi(+1) = 0;

```

as the strict inflation targeting policy rule, a solution is immediately found. Maybe there is an economic reason it does not work in Dynare.

---

<div class="post-metadata">

**Author:** ![N2K2](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/47e85d/32.png) [@N2K2](https://forum.dynare.org/u/N2K2)\
**Post date:** [30 October 2019 14:00 UTC](https://forum.dynare.org/t/unable-to-find-perfect-foresight-solution-of-simple-nk-model-with-zlb/14663/3 "2019-10-30T14:00:41Z")

</div>

Thank you very much for your reply, Professor Pfeifer. I would think that with the rule pi = 0 the model would correspond to the “no response” case reported in section seven of Gali’s recent JME ([https://www.sciencedirect.com/science/article/pii/S0304393219301357](https://www.sciencedirect.com/science/article/pii/S0304393219301357)).

---

<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:** [2 November 2019 07:54 UTC](https://forum.dynare.org/t/unable-to-find-perfect-foresight-solution-of-simple-nk-model-with-zlb/14663/4 "2019-11-02T07:54:59Z")

</div>

Did you check whether that rule works in your model without the ZLB? That is, conduct the same experiment without the ZLB.
