Skip to content
Snippets Groups Projects
Verified Commit 75feb048 authored by Johannes Pfeifer's avatar Johannes Pfeifer Committed by Sébastien Villemot
Browse files

evaluate_planner_objective.m: fix wrong timing in setting of shocks

(cherry picked from commit 334020fc)
parent b954c494
No related branches found
No related tags found
No related merge requests found
...@@ -347,11 +347,15 @@ if ~isempty(M_.det_shocks) ...@@ -347,11 +347,15 @@ if ~isempty(M_.det_shocks)
end end
u =oo_.exo_steady_state; u =oo_.exo_steady_state;
periods=[M_.det_shocks(:).periods]; periods=[M_.det_shocks(:).periods];
if ~all(periods==0) if any(periods==0)
fprintf(['\nevaluate_planner_objective: Shock values for periods other than the intial period 0 have been provided.\n' ... 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']) 'evaluate_planner_objective: Note that they will be ignored.\n'])
end end
shock_indices=find(periods==0); shock_indices=find(periods==1);
if any([M_.det_shocks(shock_indices).multiplicative]) if any([M_.det_shocks(shock_indices).multiplicative])
fprintf(['\nevaluate_planner_objective: Shock values need to be specified as additive.\n']) fprintf(['\nevaluate_planner_objective: Shock values need to be specified as additive.\n'])
end end
......
...@@ -37,8 +37,8 @@ end; ...@@ -37,8 +37,8 @@ end;
shocks; shocks;
var u; stderr 0.008; var u; stderr 0.008;
var u; var u;
periods 0; periods 0, 1;
values 1; values 1, 1;
end; end;
options_.dr_display_tol=0; options_.dr_display_tol=0;
planner_objective(ln(c)-phi*((n^(1+gamma))/(1+gamma))); planner_objective(ln(c)-phi*((n^(1+gamma))/(1+gamma)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment