# The steady state contains NaN or Inf (NaN and-inf residual)

**URL:** <https://forum.dynare.org/t/the-steady-state-contains-nan-or-inf-nan-and-inf-residual/10725>\
**Category:** Steady state\
**Created:** [12 September 2017 14:31 UTC](https://forum.dynare.org/t/the-steady-state-contains-nan-or-inf-nan-and-inf-residual/10725 "2017-09-12T14:31:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichelleHuang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/bc79bd/32.png) [@MichelleHuang](https://forum.dynare.org/u/MichelleHuang)\
**Post date:** [12 September 2017 14:31 UTC](https://forum.dynare.org/t/the-steady-state-contains-nan-or-inf-nan-and-inf-residual/10725/1 "2017-09-12T14:31:22Z")

</div>

Dear all,

since it’s my first time to build a DSGE model, the questions I ask might be too elementary. If so, I am very sorry. ☹

When I try to run my DSGE model, it shows

Residuals of the static equations:

Equation number 1 : 0  
Equation number 2 : NaN  
Equation number 3 : -Inf  
Equation number 4 : -0.0028558  
Equation number 5 : 0.017324  
Equation number 6 : 0.0084  
Equation number 7 : 2  
Equation number 8 : 0  
Equation number 9 : 0  
Equation number 10 : NaN  
Equation number 11 : -Inf  
Equation number 12 : 0.0148  
Equation number 13 : 2  
Equation number 14 : 0  
Equation number 15 : NaN  
Equation number 16 : NaN  
Equation number 17 : 2  
Equation number 18 : 0  
Equation number 19 : 0  
Equation number 20 : 0  
Equation number 21 : NaN  
Equation number 22 : 0.0148  
Equation number 23 : NaN  
Equation number 24 : NaN  
Equation number 25 : NaN  
Equation number 26 : NaN  
Equation number 27 : NaN  
Equation number 28 : NaN  
Equation number 29 : 0  
Equation number 30 : 0  
Equation number 31 : 0  
Equation number 32 : 0  
Equation number 33 : 0  
Equation number 34 : 0  
Equation number 35 : 0  
Equation number 36 : -1  
Equation number 37 : 0  
Equation number 38 : 0

And the error messenger is as follows:

Error using print\_info (line 90)  
The steady state contains NaN or Inf  
Error in steady (line 104)  
print\_info(info,options\_.noprint, options\_);  
Error in TRY (line 429)  
steady;  
Error in dynare (line 223)  
evalin(‘base’,fname) ;

I have looked for other similar questions but they couldn’t solve my problem.

How can I fix my model? I don’t know what the problem is.I am very puzzled .  
Thank in advance!

[TRY.mod](https://forum.dynare.org/uploads/default/original/2X/0/0e4b80742f505bfaca97c3e02055ef8b6904ca09.mod) (6.1 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:** [12 September 2017 18:30 UTC](https://forum.dynare.org/t/the-steady-state-contains-nan-or-inf-nan-and-inf-residual/10725/2 "2017-09-12T18:30:53Z")

</div>

You need to provide initial values for the steady state computations (`initval`-block). Otherwise, Dynare uses the default of 0, which is inconsistent with e.g. consumption.
