Dear all,
I’m a newbie to Dynare and I’m trying to use it to solve my DSGE model.
I follow the approach in NK_baseline.mod, so I write a nonlinear model in my .mod file and compute the steady state using a separate steadystate.m file, which calls the function fsolve to solve a system of 2 nonlinear equations.
I’m having a trouble running my codes now. It keeps returning the error like this:
Error using trustnleqn (line 28)
Objective function is returning undefined values at initial point. FSOLVE cannot continue.
Error in fsolve (line 368)
[x,FVAL,JACOB,EXITFLAG,OUTPUT,msgData]=…
Error in Thesis_nln_steadystate (line 104)
[FVAL,fval,exitflag] = fsolve(@F,[0.45;4.5],options);
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 steady_ (line 55)
[steady_state,params,info] =
evaluate_steady_state(oo_.steady_state,M_,options_,oo_,~options_.steadystate.nocheck);
Error in steady (line 81)
[steady_state,M_.params,info] = steady_(M_,options_,oo_);
Error in Thesis_nln (line 410)
steady;
Error in dynare (line 223)
evalin(‘base’,fname) ;
Could anyone please have a look at my codes and help me detect the problem? I’d really appreciate it if you could help me with this.
I’m using Dynare 4.5.4 and Matlab 2015a. Attached here are my codes.
F.m (926 Bytes)
Thesis_nln.mod (9.2 KB)
Thesis_nln_steadystate.m (3.8 KB)