Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dynare
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stéphane Adjemian
dynare
Commits
75feb048
Verified
Commit
75feb048
authored
3 years ago
by
Johannes Pfeifer
Committed by
Sébastien Villemot
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
matlab/evaluate_planner_objective.m
+7
-3
7 additions, 3 deletions
matlab/evaluate_planner_objective.m
tests/optimal_policy/Ramsey/ramsey_histval.mod
+2
-2
2 additions, 2 deletions
tests/optimal_policy/Ramsey/ramsey_histval.mod
with
9 additions
and
5 deletions
matlab/evaluate_planner_objective.m
+
7
−
3
View file @
75feb048
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
tests/optimal_policy/Ramsey/ramsey_histval.mod
+
2
−
2
View file @
75feb048
...
@@ -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)));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment