Commit ebf93d67 authored by MichelJuillard's avatar MichelJuillard
Browse files

stochastic extended path: additional changes

parent dd75baa9
......@@ -123,6 +123,17 @@ t = 0;
hh = dyn_waitbar(0,'Please wait. Extended Path simulations...');
set(hh,'Name','EP simulations.');
% hybrid correction
pfm.hybrid_order = options_.ep.stochastic.hybrid_order;
if pfm.hybrid_order
oo_.dr = set_state_space(oo_.dr,M_,options_);
options = options_;
options.order = pfm.hybrid_order;
pfm.dr = resol(0,M_,options,oo_);
else
pfm.dr = [];
end
% Main loop.
while (t<sample_size)
if ~mod(t,10)
......@@ -164,7 +175,14 @@ while (t<sample_size)
if options_.ep.stochastic.order == 0
[flag,tmp,err] = solve_perfect_foresight_model(endo_simul_1,exo_simul_1,pfm1);
else
[flag,tmp] = solve_stochastic_perfect_foresight_model(endo_simul_1,exo_simul_1,pfm1,options_.ep.stochastic.quadrature.nodes,options_.ep.stochastic.order);
switch(options_.ep.stochastic.algo)
case 0
[flag,tmp] = ...
solve_stochastic_perfect_foresight_model(endo_simul_1,exo_simul_1,pfm1,options_.ep.stochastic.quadrature.nodes,options_.ep.stochastic.order);
case 1
[flag,tmp] = ...
solve_stochastic_perfect_foresight_model_1(endo_simul_1,exo_simul_1,pfm1,options_.ep.stochastic.quadrature.nodes,options_.ep.stochastic.order);
end
end
end
info_convergence = ~flag;
......
......@@ -177,12 +177,14 @@ ep.set_dynare_seed_to_default = 1;
ep.stack_solve_algo = 4;
% Stochastic extended path related options.
ep.stochastic.method = '';
ep.stochastic.algo = 0;
ep.stochastic.quadrature.ortpol = 'hermite';
ep.stochastic.order = 0;
ep.stochastic.quadrature.nodes = 5;
ep.stochastic.quadrature.pruned.status = 0;
ep.stochastic.quadrature.pruned.relative = 1e-5;
ep.stochastic.quadrature.pruned.level = 1e-5;
ep.stochastic.hybrid_order = 0;
% Copy ep structure in options_ global structure
options_.ep = ep;
......@@ -345,6 +347,7 @@ options_.filter_step_ahead = [];
options_.filtered_vars = 0;
options_.first_obs = 1;
options_.kalman_algo = 0;
options_.fast_kalman = 0;
options_.kalman_tol = 1e-10;
options_.use_univariate_filters_if_singularity_is_detected = 1;
options_.riccati_tol = 1e-6;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment