diff --git a/matlab/evaluate_planner_objective.m b/matlab/evaluate_planner_objective.m index 162953a37d7294acf15a35dc86ac63671685c30b..3a516b31be0a4fe3b3b862254fab600df6763f29 100644 --- a/matlab/evaluate_planner_objective.m +++ b/matlab/evaluate_planner_objective.m @@ -347,11 +347,15 @@ if ~isempty(M_.det_shocks) end u =oo_.exo_steady_state; periods=[M_.det_shocks(:).periods]; - if ~all(periods==0) - fprintf(['\nevaluate_planner_objective: Shock values for periods other than the intial period 0 have been provided.\n' ... + if any(periods==0) + fprintf(['\nevaluate_planner_objective: M_.det_shocks contains values for the predetermined t=0 period.\n'... + 'evaluate_planner_objective: Dynare will ignore them. Use histval to set the value of lagged innovations.\n']) + end + if any(periods>1) + fprintf(['\nevaluate_planner_objective: Shock values for periods not contained in the initial information set (t=1) have been provided.\n' ... 'evaluate_planner_objective: Note that they will be ignored.\n']) end - shock_indices=find(periods==0); + shock_indices=find(periods==1); if any([M_.det_shocks(shock_indices).multiplicative]) fprintf(['\nevaluate_planner_objective: Shock values need to be specified as additive.\n']) end diff --git a/tests/optimal_policy/Ramsey/ramsey_histval.mod b/tests/optimal_policy/Ramsey/ramsey_histval.mod index d237f0cea69397538da533ab15b8ec075ef62025..5f296a74099187e6e41340bd7194f09caf02b04a 100644 --- a/tests/optimal_policy/Ramsey/ramsey_histval.mod +++ b/tests/optimal_policy/Ramsey/ramsey_histval.mod @@ -37,8 +37,8 @@ end; shocks; var u; stderr 0.008; var u; -periods 0; -values 1; +periods 0, 1; +values 1, 1; end; options_.dr_display_tol=0; planner_objective(ln(c)-phi*((n^(1+gamma))/(1+gamma)));