# Difficulty with zero SS

Dear friends,

I have a non-linear model with 23 eq and 23 variables. I have defined the model block in the mod file, and as far as I know, if I do not define “initval,” Dynare will consider them zero, and thus steady-state values will be zero. However, every time I run the code, I get the following error: “The steady state has NaNs or Inf.” Is there anything wrong with the code?

giocode.mod (5.8 KB)

Hi GioGio,

you are right that if you do not specifically give Dynare initial values it will set them to zero. The second part is, however, wrong. It does not imply that the steady states are thus also zero, most likely they are quite the opposite. It just uses zero as a starting value for the steady state solver, which could be far away ant so make it impossible for Dynare to find it.

One danger when not giving initial values is that using zero as starting values could lead to incorrect specification for example if you then have 1/0 or, like what you have in your Taylor rule, log(0). This of course does not work.

Try either to calculate the steady state analytically or at least give proper (“good”) initial guesses of them.

Best

1 Like

Thank you for your response. I have one more question: I have obtained only some steady-state values analytically. Is it possible to combine these values and initial guesses within initval block? Does it give the correct steady-state (of course, conditional on proper initial guesses)?

``````[name='Taylor rule']
0 = ln(R) - rho_r*ln(R(-1)) - (1-rho_r)*(ln(R_ss)+ phi_pi*(ln(Pi)-ln(Pi_ss))+ phi_y*(ln(Y)-ln(Y_ss))+phi_vsigma*(ln(vsigma(+1))-ln(vsigma_ss)))- shock_R;

[name='Tax rule']
0 = ln(tau) - rho_tau*ln(tau(-1)) - (1-rho_tau)*(psi_vsigma*(ln(vsigma(+1))-ln(vsigma_ss)))- shock_tau;

[name='TFP shock']
0 = ln(A)- rho_a*ln(A(-1)) - shock_A;
``````

everything that is in logs cannot have a steady state of 0. With the default initial value of 0, you will get log(0)=Inf.
2. Yes, you can combine true steady state values and initial guesses in an `initval`-block.

1 Like

Yes, I see the problem now. Thank you very much for your help.