diff --git a/matlab/+occbin/DSGE_smoother.m b/matlab/+occbin/DSGE_smoother.m index 3b89353645c4af7809d455033d4c8a99c1f21bdf..93c5fe5f0d64c9803d5f78a44f6ac3e398d6763f 100644 --- a/matlab/+occbin/DSGE_smoother.m +++ b/matlab/+occbin/DSGE_smoother.m @@ -106,6 +106,7 @@ opts_simul.maxit = options_.occbin.smoother.maxit; opts_simul.waitbar = options_.occbin.smoother.waitbar; opts_simul.periods = options_.occbin.smoother.periods; opts_simul.check_ahead_periods = options_.occbin.smoother.check_ahead_periods; +opts_simul.periodic_solution = options_.occbin.smoother.periodic_solution; opts_simul.full_output = options_.occbin.smoother.full_output; opts_simul.piecewise_only = options_.occbin.smoother.piecewise_only; % init_mode = options_.occbin.smoother.init_mode; % 0 = standard; 1 = unconditional frcsts zero shocks+smoothed states in each period diff --git a/matlab/+occbin/set_default_options.m b/matlab/+occbin/set_default_options.m index 568fbc5418d0c38dafc60d78ac051ae52bf6c7cd..7f81b7e9acf8d5c534f3a8e7c356c7a9ed70e212 100644 --- a/matlab/+occbin/set_default_options.m +++ b/matlab/+occbin/set_default_options.m @@ -73,14 +73,14 @@ if ismember(flag,{'likelihood','all'}) options_occbin_.likelihood.init_binding_indicator = false(0); options_occbin_.likelihood.inversion_filter = false; options_occbin_.likelihood.IVF_shock_observable_mapping = []; - options_occbin_.likelihood.maxit = 50; % this is for occbin solver algo + options_occbin_.likelihood.maxit = 30; % this is for occbin solver algo options_occbin_.likelihood.max_number_of_iterations = 10; % this is for occbin_kalman_update loop options_occbin_.likelihood.periods = 100; options_occbin_.likelihood.check_ahead_periods=200; - options_occbin_.likelihood.periodic_solution=true; + options_occbin_.likelihood.periodic_solution=false; options_occbin_.likelihood.piecewise_only = true; options_occbin_.likelihood.restrict_state_space = true; - options_occbin_.likelihood.status=true; + options_occbin_.likelihood.status=true; %initialized to false in default_option_values options_occbin_.likelihood.use_updated_regime = true; options_occbin_.likelihood.waitbar=false; end @@ -168,12 +168,11 @@ if ismember(flag,{'simul','all'}) options_occbin_.simul.init_regime=[]; options_occbin_.simul.init_binding_indicator=false(0); options_occbin_.simul.exo_pos=1:M_.exo_nbr; - options_occbin_.simul.local=true; - options_occbin_.simul.maxit=10; + options_occbin_.simul.maxit=30; options_occbin_.simul.max_periods=inf; - options_occbin_.simul.periods=30; + options_occbin_.simul.periods=100; options_occbin_.simul.check_ahead_periods=200; - options_occbin_.simul.periodic_solution=true; + options_occbin_.simul.periodic_solution=false; options_occbin_.simul.piecewise_only = false; options_occbin_.simul.reset_regime_in_new_period = false; options_occbin_.simul.restrict_state_space=false; @@ -196,6 +195,7 @@ if ismember(flag,{'smoother','all'}) options_occbin_.smoother.max_number_of_iterations = 10; % this is for smoother loop options_occbin_.smoother.periods = 100; options_occbin_.smoother.check_ahead_periods=200; + options_occbin_.smoother.periodic_solution=false; options_occbin_.smoother.piecewise_only = true; options_occbin_.smoother.plot = true; options_occbin_.smoother.status=true; diff --git a/matlab/+occbin/setup.m b/matlab/+occbin/setup.m index 71d6b326d81bebaa97b93eb22bd87056d855cef8..f2dab58a4320900e9594b31d319a291291cd46cd 100644 --- a/matlab/+occbin/setup.m +++ b/matlab/+occbin/setup.m @@ -32,13 +32,23 @@ options_ = occbin.set_option(options_,options_occbin_,'simul.periods'); options_ = occbin.set_option(options_,options_occbin_,'simul.curb_retrench'); options_ = occbin.set_option(options_,options_occbin_,'simul.maxit'); options_ = occbin.set_option(options_,options_occbin_,'simul.check_ahead_periods'); +options_ = occbin.set_option(options_,options_occbin_,'simul.debug'); +options_ = occbin.set_option(options_,options_occbin_,'simul.periodic_solution'); options_ = occbin.set_option(options_,options_occbin_,'smoother.periods'); options_ = occbin.set_option(options_,options_occbin_,'smoother.curb_retrench'); options_ = occbin.set_option(options_,options_occbin_,'smoother.maxit'); options_ = occbin.set_option(options_,options_occbin_,'smoother.check_ahead_periods'); +options_ = occbin.set_option(options_,options_occbin_,'smoother.debug'); +options_ = occbin.set_option(options_,options_occbin_,'smoother.periodic_solution'); +options_ = occbin.set_option(options_,options_occbin_,'smoother.inversion_filter'); +options_ = occbin.set_option(options_,options_occbin_,'likelihood.periods'); +options_ = occbin.set_option(options_,options_occbin_,'likelihood.curb_retrench'); +options_ = occbin.set_option(options_,options_occbin_,'likelihood.maxit'); +options_ = occbin.set_option(options_,options_occbin_,'likelihood.check_ahead_periods'); +options_ = occbin.set_option(options_,options_occbin_,'likelihood.periodic_solution'); +options_ = occbin.set_option(options_,options_occbin_,'likelihood.max_number_of_iterations'); options_ = occbin.set_option(options_,options_occbin_,'filter.use_relaxation'); options_ = occbin.set_option(options_,options_occbin_,'likelihood.inversion_filter'); -options_ = occbin.set_option(options_,options_occbin_,'smoother.inversion_filter'); if isfield(M_,'surprise_shocks') && ~isempty(M_.surprise_shocks) temp=zeros(max(cat(2,M_.surprise_shocks.periods)),M_.exo_nbr); diff --git a/preprocessor b/preprocessor index f0c39b461e8307292ae73df702897424f07cea8d..6fb86522ea836e6dfcc9b39c0c8226168e0a2730 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit f0c39b461e8307292ae73df702897424f07cea8d +Subproject commit 6fb86522ea836e6dfcc9b39c0c8226168e0a2730 diff --git a/tests/occbin/model_irrcap_twoconstraints/dynrbc_common.inc b/tests/occbin/model_irrcap_twoconstraints/dynrbc_common.inc index 3379aebe5f8fafc1b191e593f03d2af75417d873..56855c0e084df09dedad40dc0b040246b1dffad8 100644 --- a/tests/occbin/model_irrcap_twoconstraints/dynrbc_common.inc +++ b/tests/occbin/model_irrcap_twoconstraints/dynrbc_common.inc @@ -58,9 +58,8 @@ end % set inputs -occbin_setup; -options_.occbin.smoother.debug=1; -occbin_solver(simul_periods=200,simul_maxit=200,simul_curb_retrench,simul_check_ahead_periods=200); +occbin_setup(smoother_debug); +occbin_solver(simul_debug,simul_periodic_solution,simul_periods=200,simul_maxit=200,simul_curb_retrench,simul_check_ahead_periods=200); occbin_write_regimes(filename='test',periods=[1:100]); %% Modify to plot IRFs