Optimal policy

Dear All,

I am trying to solve a Ramsey optimal policy problem in Dynare. I am not too familiar with how to do this. When I run the code, I get the errors below. I don’t know how to determine where the problem is in the model, aside from the error letting me know that there is a NaN or Inf value somewhere.

Please find the code I am working with attached. Any help will be much appreciated.

In dyn_ramsey_static>dyn_ramsey_static_1 (line 152)
In dyn_ramsey_static>@(x)dyn_ramsey_static_1(x,M,options_,oo) (line 40)
In dyn_ramsey_static (line 67)
In evaluate_steady_state (line 55)
In resol (line 104)
In stoch_simul (line 88)
In ramsey_policy (line 25)
In transition_optimal (line 1058)
In dynare (line 180)
In transition_run (line 11)
Warning: Matrix is singular to working precision.
Error using print_info (line 80)
The steady state contains NaN or Inf

Error in stoch_simul (line 98)
print_info(info, options_.noprint, options_);

Error in ramsey_policy (line 25)
info = stoch_simul(var_list);

Error in transition_optimal (line 1058)
ramsey_policy(var_list_);

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

Error in transition_run (line 11)
dynare transition_optimal noclearall
transition_optimal.mod (9.82 KB)

Please use the Dynare unstable version and follow its warnings and error messages.

You are using Ramsey in a stochastic context, but the syntax you use for the shocks-block is for perfect foresight models. At the same time, the shock defined in the shocks-block does not appear in the model. Moreover, when using

you should try to provide a proper conditional steady state file.

Many thanks Prof. Pfeifer.