Error NaN or Inf

Hello people,

I have some problems when I run my Dynare-file in Matlab:

Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0.010971
Equation number 4 : 0.047485
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0
Equation number 9 : -0.88789
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : NaN
Equation number 16 : 0
Equation number 17 : -0.031255
Equation number 18 : -0.010204
Equation number 19 : 0
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : 0
Equation number 23 : 0
Equation number 24 : 0
Equation number 25 : 0
Equation number 26 : 0

STEADY: numerical initial values or parameters incompatible with the following equations
15

Check whether your model in truly linear
Error using print_info (line 80)
The steady state contains NaN or Inf

Error in check (line 76)
print_info(info, 0, options);

Error in Stock_Market_DSGE (line 464)
oo_.dr.eigval = check(M_,options_,oo_);

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

I took all parameters from the paper. Where could be an error?
I want to replicate an interesting paper of castelnuovo and nistico, but I’m a newbie in Dynare and very confused.
ould someone help me ?
Stock_Market_DSGE2.mod (12.3 KB)

Try executing the parameter definitions with F9 in Matlab. You will see that you use

g

before you have defined it.

Thank you very much. My problem is that I had not seen 2 fundamental mistakes. Dynare just computes the parameter values in a chronological order (I sorted nothing in the parameter calibration) and some sloppy mistakes in typing down the equations like the error you’ve found (variable g instead of steady state value g_ss). Now it works after some readjustments and tommorrow I’ll try to get the right graphics for my purposes.

Have a nice week!