Page 1 of 1

Optimal policy

PostPosted: Tue Feb 21, 2017 5:27 pm
by S_V
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

Re: Optimal policy

PostPosted: Thu Feb 23, 2017 5:25 pm
by jpfeifer
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
Code: Select all
instruments

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

Re: Optimal policy

PostPosted: Fri Feb 24, 2017 1:51 pm
by S_V
Many thanks Prof. Pfeifer.