# Model with recursive preferences will not solve

**URL:** <https://forum.dynare.org/t/model-with-recursive-preferences-will-not-solve/5990>\
**Category:** Stochastic simulations\
**Created:** [23 January 2017 02:54 UTC](https://forum.dynare.org/t/model-with-recursive-preferences-will-not-solve/5990 "2017-01-23T02:54:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![phdstudent99](https://forum.dynare.org/letter_avatar_proxy/v4/letter/p/ecc23a/32.png) [@phdstudent99](https://forum.dynare.org/u/phdstudent99)\
**Post date:** [23 January 2017 02:54 UTC](https://forum.dynare.org/t/model-with-recursive-preferences-will-not-solve/5990/1 "2017-01-23T02:54:19Z")

</div>

Hello,  
I am trying to solve a model with recursive preferences similar to the one in Colacito and Croce (JoF 2013).  
My issue is that the model cannot be solved for values of risk aversion greater than 2.  
The error message I obtain depends on the value of risk aversion AND on the value I enter manually for the qz\_zero\_threshold.

For example, the model is solved when risk aversion (SIGMA) is 2 and the irfs seem to make sense.  
When SIGMA =3 and qz\_zero\_threshold = 1e-10, I get the following error:  
One of the eigenvalues is close to 0/0 (the absolute value of numerator and  
denominator is smaller than 1e-10!  
If you believe that the model has a unique solution you can try to reduce  
the value of qz\_zero\_threshold.

When SIGMA = 3 and qz\_zero\_threshold = 1e-20, I get the following error:  
There are 1 eigenvalue(s) larger than 1 in modulus  
for 2 forward-looking variable(s)  
The rank condition ISN’T verified!  
dynare:k\_order\_perturbation: Caught Kord exception: The model is not Blanchard-Kahn stable

When SIGMA = 4 and qz\_zero\_threshold = 1e-20, I get the following error:  
There are 2 eigenvalue(s) larger than 1 in modulus  
for 2 forward-looking variable(s)  
The rank condition is verified.  
dynare:k\_order\_perturbation: Caught Kord exception: NaN or Inf asserted in first order derivatives in FirstOrder::solve  
Error using print\_info (line 68)  
k\_order\_pert was unable to compute the solution

Does this mean there is a problem with my model or with my code?  
My mod file is attached and I am using Dynare 4.4.3 and Matlab 2013a.

Thank you.  
[test2.mod](https://forum.dynare.org/uploads/default/original/2X/4/4a02b9eda220f03d4edd7a8f65f7b40474e9a30d.mod) (2.94 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:** [23 January 2017 11:28 UTC](https://forum.dynare.org/t/model-with-recursive-preferences-will-not-solve/5990/2 "2017-01-23T11:28:41Z")

</div>

There seems to be a more fundamental collinearity/singularity problem in your model. You can see this when running `model_diagnostics`  
As detecting singularity as opposed to near-singularity is a numerical challenge, it can pop up in strange ways. That is what you encounter.

---

<div class="post-metadata">

**Author:** ![Xuyanxia](https://forum.dynare.org/letter_avatar_proxy/v4/letter/x/e95f7d/32.png) [@Xuyanxia](https://forum.dynare.org/u/Xuyanxia)\
**Post date:** [7 April 2025 03:23 UTC](https://forum.dynare.org/t/model-with-recursive-preferences-will-not-solve/5990/3 "2025-04-07T03:23:35Z")

</div>

[keti2.mod](https://forum.dynare.org/uploads/short-url/eKu5yp3FWaqhpIrp0lQFrs57iVP.mod) (2.8 KB)  
Is there a similar fundamental collinearity/singularity problem in my model?

---

<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:** [7 April 2025 06:55 UTC](https://forum.dynare.org/t/model-with-recursive-preferences-will-not-solve/5990/4 "2025-04-07T06:55:41Z")

</div>

There is nothing obvious apart from `ex` being 0 in steady state.

---

<div class="post-metadata">

**Author:** ![Xuyanxia](https://forum.dynare.org/letter_avatar_proxy/v4/letter/x/e95f7d/32.png) [@Xuyanxia](https://forum.dynare.org/u/Xuyanxia)\
**Post date:** [10 April 2025 07:31 UTC](https://forum.dynare.org/t/model-with-recursive-preferences-will-not-solve/5990/5 "2025-04-10T07:31:56Z")

</div>

It is a timing problem.I finally found it .
