Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
0d8371c2
Commit
0d8371c2
authored
Jan 20, 2012
by
Stéphane Adjemian
Browse files
Added an option to track the expectation in the (S)EP approach.
parent
b5c71ed1
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/ep/extended_path.m
View file @
0d8371c2
...
...
@@ -32,6 +32,7 @@ function time_series = extended_path(initial_conditions,sample_size)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
global
M_
options_
oo_
memory
=
0
;
debug
=
0
;
options_
.
verbosity
=
options_
.
ep
.
verbosity
;
verbosity
=
options_
.
ep
.
verbosity
+
debug
;
...
...
@@ -158,6 +159,11 @@ t = 0;
hh
=
dyn_waitbar
(
0
,
'Please wait. Extended Path simulations...'
);
set
(
hh
,
'Name'
,
'EP simulations.'
);
if
memory
mArray1
=
zeros
(
M_
.
endo_nbr
,
100
,
nnn
,
sample_size
);
mArray2
=
zeros
(
M_
.
exo_nbr
,
100
,
nnn
,
sample_size
);
end
% Main loop.
while
(
t
<
sample_size
)
if
~
mod
(
t
,
10
)
...
...
@@ -302,6 +308,10 @@ while (t<sample_size)
oo_
.
endo_simul
=
tmp
;
end
% Save results of the perfect foresight model solver.
if
memory
mArray1
(:,:,
s
,
t
)
=
oo_
.
endo_simul
(:,
1
:
100
);
mArrat2
(:,:,
s
,
t
)
=
transpose
(
oo_
.
exo_simul
(
1
:
100
,:));
end
time_series
(:,
t
)
=
time_series
(:,
t
)
+
www
(
s
)
*
oo_
.
endo_simul
(:,
2
);
%save('simulated_paths.mat','time_series');
% Set initial condition for the nex round.
...
...
@@ -315,4 +325,8 @@ end
dyn_waitbar_close
(
hh
);
oo_
.
endo_simul
=
oo_
.
steady_state
;
\ No newline at end of file
oo_
.
endo_simul
=
oo_
.
steady_state
;
if
memory
save
([
M_
.
fname
'_memory'
],
'mArray1'
,
'mArray2'
,
'www'
);
end
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment