Hi,
I'm trying to manage a a deterministic exogenous variable in my planner_objective with ramsey_policy, but it seems that the command VAREXO_DET is not allowed with ramsey_policy. I get the following error message code :
??? Attempted to access x(3); index out of bounds because numel(x)=2.
Error in ==> essai_ter_objective_static at 14
residual(1) = (y(1)+y(2)-x(3))^2;
Error in ==> dyn_ramsey_static>dyn_ramsey_static_1 at 128
[U,Uy,Uyy] = feval([fname '_objective_static'],x,ex, params);
Error in ==> dyn_ramsey_static>@(x)dyn_ramsey_static_1(x,M,options_,oo) at
39
nl_func = @(x) dyn_ramsey_static_1(x,M,options_,oo);
Error in ==> dynare_solve at 85
fvec = feval(func,x,varargin{:});
Error in ==> dyn_ramsey_static at 62
[xx,info1] = dynare_solve(nl_func,xx,0);
Error in ==> evaluate_steady_state at 55
[ys,params] = dyn_ramsey_static(ys_init,M,options,oo);
Error in ==> resol at 108
[dr.ys,M.params,info] =
evaluate_steady_state(oo.steady_state,M,options,oo,0);
Error in ==> stoch_simul at 76
[oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
Error in ==> ramsey_policy at 25
info = stoch_simul(var_list);
Error in ==> essai_ter at 137
ramsey_policy(var_list_);
Error in ==> dynare at 120
evalin('base',fname) ;
I attach an example.
I use initval and endval to help computing the steady states, but also tried with the command shock and it doesn't work as well. A deterministic shock in the model also doesn't work.
Is there any problem with my code ?
Besides, is there a way to get the deterministic path of the variables with ramsey_policy following a deterministic shock only (without random shocks), and starting away from the steady state (using histval for example) ?
Thanks for your help
BD