# Perfect foresight convergence

**URL:** <https://forum.dynare.org/t/perfect-foresight-convergence/11045>\
**Category:** Perfect foresight simulations\
**Created:** [26 November 2017 22:27 UTC](https://forum.dynare.org/t/perfect-foresight-convergence/11045 "2017-11-26T22:27:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brooks](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/ce73a5/32.png) [@Brooks](https://forum.dynare.org/u/Brooks)\
**Post date:** [26 November 2017 22:28 UTC](https://forum.dynare.org/t/perfect-foresight-convergence/11045/1 "2017-11-26T22:28:00Z")

</div>

Dear Prof Johannes,

I am doing perfect foresight simulation, in some case Dynare ran very quickly and can solve the problem. Yet, in other case it reports “no convergence” as below:  
Iter. | Lambda | status | Max. residual  
++++++++++++++++++++++++++++++++++++++++++++++++++++++  
1 | 0.50000 | succeeded | 6.442782e-09  
2 | 1.00000 | failed | 9.628932e-02  
3 | 0.75000 | failed | 4.796007e-02  
4 | 0.62500 | succeeded | 6.107341e-06  
5 | 0.75000 | failed | 2.422837e-02  
6 | 0.68750 | failed | 1.210255e-02  
7 | 0.65625 | failed | 6.048381e-03  
8 | 0.64063 | failed | 3.023478e-03  
9 | 0.63281 | succeeded | 3.775955e-07  
10 | 0.64063 | failed | 1.513020e-03  
11 | 0.63672 | failed | 7.564655e-04  
12 | 0.63477 | failed | 3.782222e-04  
13 | 0.63379 | succeeded | 6.320937e-07  
14 | 0.63477 | failed | 1.891554e-04  
15 | 0.63428 | succeeded | 8.310898e-06  
16 | 0.63477 | failed | 9.461683e-05  
17 | 0.63452 | failed | 4.732124e-05  
18 | 0.63440 | succeeded | 7.011321e-06  
19 | 0.63452 | failed | 2.367930e-05  
20 | 0.63446 | failed | 1.185387e-05  
21 | 0.63443 | succeeded | 7.249863e-06  
22 | 0.63446 | failed | 1.185387e-05  
23 | 0.63445 | succeeded | 8.897512e-06  
24 | 0.63446 | failed | 1.185387e-05  
++++++++++++++++++++++++++++++++++++++++++++++++++++++

It stops after 24 iterations (homotopy) though I think the result is good enough.  
Could I use this simulation? That is I would accept a bit higher tolerance \> 1e-5.

Another question is “does perfect foresight estimation always have a solution?” If Dynare cannot solve the model by default settings what I should do?

Thank you and best regards,

---

<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:** [28 November 2017 09:06 UTC](https://forum.dynare.org/t/perfect-foresight-convergence/11045/2 "2017-11-28T09:06:12Z")

</div>

No, you cannot use this as the tolerance refers to homotopy with Lambda\<1. Thus, you are not solving the actual problem.  
What you should try is different `stack_solve_algo` (and potentially `robust_lin_solve`). See the manual.  
As you are solving nonlinear difference equations, there is nothing that guarantees the existence of a solution.
