changes to stochastic perfect foresight simulation (still doesn't work
correctly with ZLB)time-shift
parent
d497ba19f7
commit
dd5cb335fb
|
@ -193,6 +193,8 @@ function [flag,endo_simul,err] = solve_stochastic_perfect_foresight_model(endo_s
|
|||
end
|
||||
flag = 0;% Convergency obtained.
|
||||
endo_simul = reshape(Y(:,1),ny,periods+2);%Y(ny+(1:ny),1);
|
||||
figure;plot(Y(16:ny:(periods+2)*ny,:))
|
||||
pause
|
||||
break
|
||||
end
|
||||
dy = -A\res;
|
||||
|
|
|
@ -53,8 +53,15 @@ end;
|
|||
steady;
|
||||
|
||||
options_.ep.verbosity = 0;
|
||||
options_.ep.order = 1;
|
||||
options_.ep.nnodes = 2;
|
||||
options_.ep.stochastic.nodes = 2;
|
||||
options_.console_mode = 0;
|
||||
|
||||
ts = extended_path([],100);
|
||||
options_.ep.stochastic.order = 0;
|
||||
ts0 = extended_path([],100);
|
||||
|
||||
options_.ep.stochastic.order = 1;
|
||||
ts1 = extended_path([],100);
|
||||
|
||||
options_.ep.stochastic.order = 2;
|
||||
ts2 = extended_path([],100);
|
||||
|
||||
|
|
|
@ -68,11 +68,12 @@ end;
|
|||
options_.maxit_ = 100;
|
||||
options_.ep.verbosity = 0;
|
||||
options_.ep.stochastic.order = 0;
|
||||
options_.ep.stochastic.nodes = 2;
|
||||
options_.console_mode = 0;
|
||||
ts = extended_path([],1000);
|
||||
ts = extended_path([],100);
|
||||
|
||||
options_.ep.stochastic.order = 1;
|
||||
sts = extended_path([],1000);
|
||||
sts = extended_path([],100);
|
||||
|
||||
figure(1)
|
||||
plot(ts(2,:)-ts(4,:));
|
||||
|
|
Loading…
Reference in New Issue