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
Container registry
Model registry
Operate
Environments
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
Dynare
dynare
Commits
6d7218f9
Commit
6d7218f9
authored
9 years ago
by
ferhat
Browse files
Options
Downloads
Patches
Plain Diff
Fix bugs in det_cond_forecast.m
parent
77f5d572
No related branches found
No related tags found
1 merge request
!1103
Fix bugs in det_cond_forecast.m
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/perfect-foresight-models/det_cond_forecast.m
+12
-2
12 additions, 2 deletions
matlab/perfect-foresight-models/det_cond_forecast.m
with
12 additions
and
2 deletions
matlab/perfect-foresight-models/det_cond_forecast.m
+
12
−
2
View file @
6d7218f9
...
...
@@ -34,7 +34,9 @@ pp = 2;
initial_conditions
=
oo_
.
steady_state
;
verbosity
=
options_
.
verbosity
;
options_
.
verbosity
=
0
;
if
options_
.
periods
==
0
options_
.
periods
=
25
;
end
;
%We have to get an initial guess for the conditional forecast
% and terminal conditions for the non-stationary variables, we
% use the first order approximation of the rational expectation solution.
...
...
@@ -134,11 +136,19 @@ else
oo_
.
endo_simul
(
M_
.
aux_vars
(
i
)
.
endo_index
,
1
:
sym_dset
.
nobs
)
=
repmat
(
oo_
.
steady_state
(
M_
.
aux_vars
(
i
)
.
endo_index
),
1
,
range
.
ndat
+
1
);
end
end
%Compute the initial path using the
first order solution around th
e
%Compute the initial path using the
the steady-stat
e
% steady-state
for
jj
=
2
:
(
options_
.
periods
+
2
)
oo_
.
endo_simul
(:,
jj
)
=
oo_
.
steady_state
;
end
missings
=
isnan
(
oo_
.
endo_simul
(:,
1
));
if
any
(
missings
)
for
jj
=
1
:
M_
.
endo_nbr
if
missings
(
jj
)
oo_
.
endo_simul
(
jj
,
1
)
=
oo_
.
steady_state
(
jj
,
1
);
end
end
end
if
options_
.
bytecode
save_options_dynatol_f
=
options_
.
dynatol
.
f
;
...
...
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