# Steady state file numeric solution

**URL:** <https://forum.dynare.org/t/steady-state-file-numeric-solution/14092>\
**Category:** Steady state\
**Created:** [3 July 2019 17:04 UTC](https://forum.dynare.org/t/steady-state-file-numeric-solution/14092 "2019-07-03T17:04:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![feryb](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/a183cd/32.png) [@feryb](https://forum.dynare.org/u/feryb)\
**Post date:** [3 July 2019 17:04 UTC](https://forum.dynare.org/t/steady-state-file-numeric-solution/14092/1 "2019-07-03T17:04:04Z")

</div>

Dear all,

I have been struggling to get steady values of my model. I reduced some of the equations but I can not do it for K and Y because Y appears in steady state K equation. And K also appears in ss of the LF, LP equations. I can not reduce to equations to get K and Y.

Is there any idea how I can solve this issue? or there is a problem for the model dynamic which doesnt allow to find the steady state ?

Best

[model\_steadystate.m](https://forum.dynare.org/uploads/short-url/rMlu0FpMaa8Hg2Ws6vWtBObvKOd.m) (2.0 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:** [4 July 2019 07:01 UTC](https://forum.dynare.org/t/steady-state-file-numeric-solution/14092/2 "2019-07-04T07:01:20Z")

</div>

Try to reduce the number of equations you need to solve by combining the equations. Then call a numerical solver to solve the remaining equations.

---

<div class="post-metadata">

**Author:** ![feryb](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/a183cd/32.png) [@feryb](https://forum.dynare.org/u/feryb)\
**Post date:** [4 July 2019 12:40 UTC](https://forum.dynare.org/t/steady-state-file-numeric-solution/14092/3 "2019-07-04T12:40:44Z")

</div>

Hello Dr Pfeifer,

I reduced the equations and now I get this errors. Could you please check what it is it about ?

Best  
resid: The initial values for the steady state of the following variables are complex:  
Y  
LF  
LP  
w1  
w2  
CE  
CW  
C  
K  
r  
pi  
I

Residuals of the static equations:

Equation number 1 : 0.29101  
Equation number 2 : 0.21507  
Equation number 3 : -0.09086  
Equation number 4 : 2.1494  
Equation number 5 : 13.4682  
Equation number 6 : 0  
Equation number 7 : 0.18266  
Equation number 8 : 0  
Equation number 9 : 0  
Equation number 10 : 1.1041  
Equation number 11 : 1.0954  
Equation number 12 : -0.02209  
Equation number 13 : 0  
Equation number 14 : 0  
Equation number 15 : 0  
Equation number 16 : 0.2

Error using print\_info (line 76)  
The steadystate file did not compute the steady state

Error in steady (line 104)  
print\_info(info,options\_.noprint, options\_);

Error in model (line 218)  
steady;

Error in dynare (line 235)  
evalin(‘base’,fname) ;

[model.mod](https://forum.dynare.org/uploads/short-url/a4Rx6qIMvUHYLOJ9zTs7ZA3JEF6.mod) (1.3 KB) [model\_steadystate.m](https://forum.dynare.org/uploads/short-url/AthnBgVQb1E0JiRkUZFER6heHHO.m) (2.2 KB)

---

<div class="post-metadata">

**Author:** ![cmarch](https://forum.dynare.org/user_avatar/forum.dynare.org/cmarch/32/7827_2.png) [@cmarch](https://forum.dynare.org/u/cmarch)\
**Post date:** [4 July 2019 16:04 UTC](https://forum.dynare.org/t/steady-state-file-numeric-solution/14092/4 "2019-07-04T16:04:37Z")

</div>

Hi feryb,

Focus on the solution with paper and pencil: Lagrangian multipliers and rates of interest are usually the easiest to find (e.g. with the Lucas asset pricing condition). Gross steady state inflation is 1 (unless you would like trend inflation in the model). And so on. You do not have many equations, so try and combine equations, as mentioned by @jpfeifer. For example, if you have a problem with K and Y, try to solve for a ratio of the two.  
In Dynare, start by focusing on the equations with very large residuals, spot the mistake, and then move to those with smaller residuals and so on. The larger the residual, the coarser the mistake you are likely to have made.🙂  
Also, you can help yourself by adding name tags to equations, which is helpful to know the name of the equation that is giving you problems in terms of residuals.  
For example,

```auto
[name='Definition of marginal utility of consumption UCS']
ucs = exp(a_p)*(1-ETA)*(cs - ETA*cs(-1))^(-1); 
[name='FOC wrt housing H_S']
ucs*( q-lambdas*(1-RHOS)*ms*exp(a_mh)*((q(+1)*pinf(+1))/rs) ) = (JEI*exp(a_j)*exp(a_p))/hs + BETAS*(ucs(+1)*q(+1));

```

🙂

---

<div class="post-metadata">

**Author:** ![feryb](https://forum.dynare.org/letter_avatar_proxy/v4/letter/f/a183cd/32.png) [@feryb](https://forum.dynare.org/u/feryb)\
**Post date:** [4 July 2019 16:44 UTC](https://forum.dynare.org/t/steady-state-file-numeric-solution/14092/5 "2019-07-04T16:44:08Z")

</div>

Dear Cmarch,

Thank you for the help. I will keep trying.

Best
