I used fslove to find my SS values but there is Error massages from dynare

Dear Moderators,

I am a Dynare beginner.
I am now replicating Chang, Liu, Spiegel (2015) DSGE analysis part. I used fsolve compute the steady-state values and then put these values into my dynare mod(BM1012.mod). However, there were some error massages as follows, I already check my equations and coding countless times but still confused to find my problem. Could you look through my steady state files and mod. files then give any suggestions.
Thank you in advance.

Error using print_info (line 83)
Impossible to find the steady state. Either the model doesn’t have a steady state, there are an
infinity of steady states, or the guess values are too far from the solution

Error in steady (line 104)
print_info(info,options_.noprint, options_);

Error in BM1012 (line 267)
BM1012.mod (3.2 KB)
Chang_Liu_Spiegel (1).pdf (429.1 KB)

Error in dynare (line 235)
evalin(‘base’,fname) ;
MyfunctionSS.m (2.1 KB)
SSvalue1012.m (147 Bytes)

1 Like

When you


before steady, you will see that your steady state computations do not fit the entered model equations.

That being said, I don’t really understand your computational approach. You should be using a steady state file instead of manually entering analytic steady state.

Thank you Prof.Pfeifer for your reply. Since the dynare generally hard to get steady state value, especially for complex models, hence I used Matlab fslove option to solve my non-linear steady state equations.

Thank you for reminding, I should have used steady state file.
I will try again, hope everything goes well!

Dear Prof.Pfeifer,
I have very stupid question that I got my NEW steady state values by fsolve ( I used the same way that I uploaded ) . But now really confused how can I transfer my these steady state values to my dynare mod file. You said I should use steady state file but I am not that familiar how to write the steady state file. Could give me any guidance? Sorry for my very basic and stupid question.


by the way I used Dynare 4.6 version not Dynare++.


An example of how to call fsolve in a steady state file is

1 Like

Prof. Pfeifer
Thank you for your quick reply. I will try it now.

Dear Prof. Pfeifer,

Sorry for disturbing you again. I used the steady state file and call my fslove . But when run my dynare there was error massage like as follows:
Could you simply look through my steady state file? I am not sure whether my logic is right.
Great Thanks!

Not enough input arguments.

Error in beta (line 19)
y = exp(betaln(z,w));

Error in yyc_steadystate (line 59)
R =1/beta;

Error in evaluate_steady_state_file (line 52)
_ [ys,check] = h_steadystate(ys_init, exo_ss);_

Error in evaluate_steady_state (line 212)
_ [ys,params,info] = evaluate_steady_state_file(ys_init,exo_ss,M,_
_ options,steadystate_check_flag);_

Error in resid (line 66)
_ evaluate_steady_state(oo_.steady_state,M_,options_,oo_,0);_

Error in yyc (line 250)

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

yyc_steadystate.m (1.6 KB)
myfct.m (1.1 KB)
yyc.mod (2.7 KB)

I just double checked and fix the error . However, now I get following residual reports, does it mean my steady state variables not correct? But I checked my steady state equations again, I am sure there is no any mistakes… Could you give me any suggestions? I am really struggling about this step…
Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0.019008
Equation number 7 : 0.00015209
Equation number 8 : -0.031477
Equation number 9 : 0.0039469
Equation number 10 : 0.0012842
Equation number 11 : 0.0040229
Equation number 12 : -0.031048
Equation number 13 : 0.030982
Equation number 14 : -3.4061e-07
Equation number 15 : -0.00010355
Equation number 16 : 0.0045049
Equation number 17 : 0.015515
Equation number 18 : -0.001167
Equation number 19 : 0.015468
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : 0

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 yyc (line 251)

This means your model equations and the steady state computation do not match. Thus, either there is still a mistake in the model equations or the model equations are wrong. Given the many residuals, there should be at least one mistake in the steady state computations.

Dear Professor.
Thank you for your reply . I will double check my all equations.