Select Git revision
set_default_options.m
Forked from
Dynare / dynare
Source project has a limited visibility.
set_default_options.m 11.03 KiB
function options_occbin_ = set_default_options(options_occbin_,M_,flag)
% function options_occbin_ = set_default_options(options_occbin_,M_,flag)
% Sets default options for Occbin
%
% INPUTS
% - options_occbin_ [structure] Matlab's structure describing the current options
% - M_ [structure] Matlab's structure describing the model
% - flag [cell] govern what/how much to initialize
%
% OUTPUTS
% - options_occbin_ [structure] Matlab's structure describing the current options
% Copyright © 2021 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <https://www.gnu.org/licenses/>.
if nargin<3
flag='all';
end
if ismember(flag,{'all'})
options_occbin_.solver.solve_algo=3; %solver for match_function: csolve
options_occbin_.solver.solve_tolx=1e-10;
options_occbin_.solver.solve_tolf=1e-5;
options_occbin_.solver.maxit=10;
options_occbin_.write_regimes.periods=[];
options_occbin_.write_regimes.type='simul';
options_occbin_.write_regimes.filename=[M_.fname '_occbin_regimes'];
end
if ismember(flag,{'filter','all'})
options_occbin_.filter.state_covariance = false;
options_occbin_.filter.guess_regime = false;
options_occbin_.filter.periodic_solution = true;
options_occbin_.filter.use_relaxation = false;
end
if ismember(flag,{'forecast','all'})
options_occbin_.forecast.check_ahead_periods=30;
options_occbin_.forecast.debug_flag=false;
options_occbin_.forecast.frcst_regimes=[];
options_occbin_.forecast.maxit=30;
options_occbin_.forecast.qmc=0;
options_occbin_.forecast.replic=0;
options_occbin_.forecast.sepath=0;
options_occbin_.forecast.SHOCKS0=[];
options_occbin_.forecast.treepath=1; % number of branches
end
if ismember(flag,{'irf','all'})
options_occbin_.irf.check_ahead_periods=30;
options_occbin_.irf.exo_names=M_.exo_names;
options_occbin_.irf.init_regime=[];
options_occbin_.irf.maxit=30;
% options_occbin_.irf.periods=options_.irf;
options_occbin_.irf.shocksize=[];
options_occbin_.irf.shocksigns = {'pos','neg'};