%
% Status : main Dynare file 
%
% Warning : this file is generated automatically by Dynare
%           from model file (.mod)

clear all
tic;
global M_ oo_ options_ ys0_ ex0_ estimation_info
options_ = [];
M_.fname = 'BBCDLmodelcomp';
%
% Some global variables initialization
%
global_initialization;
diary off;
diary('BBCDLmodelcomp.log');
M_.exo_names = 'c1shockgyerr';
M_.exo_names_tex = 'c1shockgyerr';
M_.exo_names_long = 'c1shockgyerr';
M_.exo_names = char(M_.exo_names, 'c1zerr');
M_.exo_names_tex = char(M_.exo_names_tex, 'c1zerr');
M_.exo_names_long = char(M_.exo_names_long, 'c1zerr');
M_.exo_names = char(M_.exo_names, 'c2shockgyerr');
M_.exo_names_tex = char(M_.exo_names_tex, 'c2shockgyerr');
M_.exo_names_long = char(M_.exo_names_long, 'c2shockgyerr');
M_.exo_names = char(M_.exo_names, 'c2zerr');
M_.exo_names_tex = char(M_.exo_names_tex, 'c2zerr');
M_.exo_names_long = char(M_.exo_names_long, 'c2zerr');
M_.exo_names = char(M_.exo_names, 'c2taupvarerr');
M_.exo_names_tex = char(M_.exo_names_tex, 'c2taupvarerr');
M_.exo_names_long = char(M_.exo_names_long, 'c2taupvarerr');
M_.exo_names = char(M_.exo_names, 'c1taupvarerr');
M_.exo_names_tex = char(M_.exo_names_tex, 'c1taupvarerr');
M_.exo_names_long = char(M_.exo_names_long, 'c1taupvarerr');
M_.exo_names = char(M_.exo_names, 'c1monerr');
M_.exo_names_tex = char(M_.exo_names_tex, 'c1monerr');
M_.exo_names_long = char(M_.exo_names_long, 'c1monerr');
M_.exo_names = char(M_.exo_names, 'c2monerr');
M_.exo_names_tex = char(M_.exo_names_tex, 'c2monerr');
M_.exo_names_long = char(M_.exo_names_long, 'c2monerr');
M_.endo_names = 'Util1';
M_.endo_names_tex = 'Util1';
M_.endo_names_long = 'Util1';
M_.endo_names = char(M_.endo_names, 'Util2');
M_.endo_names_tex = char(M_.endo_names_tex, 'Util2');
M_.endo_names_long = char(M_.endo_names_long, 'Util2');
M_.endo_names = char(M_.endo_names, 'c1c');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1c');
M_.endo_names_long = char(M_.endo_names_long, 'c1c');
M_.endo_names = char(M_.endo_names, 'c1cd');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1cd');
M_.endo_names_long = char(M_.endo_names_long, 'c1cd');
M_.endo_names = char(M_.endo_names, 'c1mc');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1mc');
M_.endo_names_long = char(M_.endo_names_long, 'c1mc');
M_.endo_names = char(M_.endo_names, 'c1y');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1y');
M_.endo_names_long = char(M_.endo_names_long, 'c1y');
M_.endo_names = char(M_.endo_names, 'c1g');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1g');
M_.endo_names_long = char(M_.endo_names_long, 'c1g');
M_.endo_names = char(M_.endo_names, 'c1rpcpd');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1rpcpd');
M_.endo_names_long = char(M_.endo_names_long, 'c1rpcpd');
M_.endo_names = char(M_.endo_names, 'c1pid');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1pid');
M_.endo_names_long = char(M_.endo_names_long, 'c1pid');
M_.endo_names = char(M_.endo_names, 'c1hp');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1hp');
M_.endo_names_long = char(M_.endo_names_long, 'c1hp');
M_.endo_names = char(M_.endo_names, 'c1gp');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1gp');
M_.endo_names_long = char(M_.endo_names_long, 'c1gp');
M_.endo_names = char(M_.endo_names, 'c1pstar');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1pstar');
M_.endo_names_long = char(M_.endo_names_long, 'c1pstar');
M_.endo_names = char(M_.endo_names, 'c1deltad');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1deltad');
M_.endo_names_long = char(M_.endo_names_long, 'c1deltad');
M_.endo_names = char(M_.endo_names, 'c1rn');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1rn');
M_.endo_names_long = char(M_.endo_names_long, 'c1rn');
M_.endo_names = char(M_.endo_names, 'c1rer');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1rer');
M_.endo_names_long = char(M_.endo_names_long, 'c1rer');
M_.endo_names = char(M_.endo_names, 'c1dcore');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1dcore');
M_.endo_names_long = char(M_.endo_names_long, 'c1dcore');
M_.endo_names = char(M_.endo_names, 'c2c');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2c');
M_.endo_names_long = char(M_.endo_names_long, 'c2c');
M_.endo_names = char(M_.endo_names, 'c2cd');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2cd');
M_.endo_names_long = char(M_.endo_names_long, 'c2cd');
M_.endo_names = char(M_.endo_names, 'c2mc');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2mc');
M_.endo_names_long = char(M_.endo_names_long, 'c2mc');
M_.endo_names = char(M_.endo_names, 'c2y');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2y');
M_.endo_names_long = char(M_.endo_names_long, 'c2y');
M_.endo_names = char(M_.endo_names, 'c2g');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2g');
M_.endo_names_long = char(M_.endo_names_long, 'c2g');
M_.endo_names = char(M_.endo_names, 'c2rpcpd');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2rpcpd');
M_.endo_names_long = char(M_.endo_names_long, 'c2rpcpd');
M_.endo_names = char(M_.endo_names, 'c2pid');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2pid');
M_.endo_names_long = char(M_.endo_names_long, 'c2pid');
M_.endo_names = char(M_.endo_names, 'c2hp');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2hp');
M_.endo_names_long = char(M_.endo_names_long, 'c2hp');
M_.endo_names = char(M_.endo_names, 'c2gp');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2gp');
M_.endo_names_long = char(M_.endo_names_long, 'c2gp');
M_.endo_names = char(M_.endo_names, 'c2pstar');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2pstar');
M_.endo_names_long = char(M_.endo_names_long, 'c2pstar');
M_.endo_names = char(M_.endo_names, 'c2deltad');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2deltad');
M_.endo_names_long = char(M_.endo_names_long, 'c2deltad');
M_.endo_names = char(M_.endo_names, 'c2rn');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2rn');
M_.endo_names_long = char(M_.endo_names_long, 'c2rn');
M_.endo_names = char(M_.endo_names, 'c2dcore');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2dcore');
M_.endo_names_long = char(M_.endo_names_long, 'c2dcore');
M_.endo_names = char(M_.endo_names, 'Welfcon1');
M_.endo_names_tex = char(M_.endo_names_tex, 'Welfcon1');
M_.endo_names_long = char(M_.endo_names_long, 'Welfcon1');
M_.endo_names = char(M_.endo_names, 'c1shockgy');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1shockgy');
M_.endo_names_long = char(M_.endo_names_long, 'c1shockgy');
M_.endo_names = char(M_.endo_names, 'c1z');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1z');
M_.endo_names_long = char(M_.endo_names_long, 'c1z');
M_.endo_names = char(M_.endo_names, 'c1taupvar');
M_.endo_names_tex = char(M_.endo_names_tex, 'c1taupvar');
M_.endo_names_long = char(M_.endo_names_long, 'c1taupvar');
M_.endo_names = char(M_.endo_names, 'c2shockgy');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2shockgy');
M_.endo_names_long = char(M_.endo_names_long, 'c2shockgy');
M_.endo_names = char(M_.endo_names, 'c2z');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2z');
M_.endo_names_long = char(M_.endo_names_long, 'c2z');
M_.endo_names = char(M_.endo_names, 'c2taupvar');
M_.endo_names_tex = char(M_.endo_names_tex, 'c2taupvar');
M_.endo_names_long = char(M_.endo_names_long, 'c2taupvar');
M_.param_names = 'c1sigma';
M_.param_names_tex = 'c1sigma';
M_.param_names_long = 'c1sigma';
M_.param_names = char(M_.param_names, 'c1beta');
M_.param_names_tex = char(M_.param_names_tex, 'c1beta');
M_.param_names_long = char(M_.param_names_long, 'c1beta');
M_.param_names = char(M_.param_names, 'c1rhoc');
M_.param_names_tex = char(M_.param_names_tex, 'c1rhoc');
M_.param_names_long = char(M_.param_names_long, 'c1rhoc');
M_.param_names = char(M_.param_names, 'c1sharegy');
M_.param_names_tex = char(M_.param_names_tex, 'c1sharegy');
M_.param_names_long = char(M_.param_names_long, 'c1sharegy');
M_.param_names = char(M_.param_names, 'c1rhogy');
M_.param_names_tex = char(M_.param_names_tex, 'c1rhogy');
M_.param_names_long = char(M_.param_names_long, 'c1rhogy');
M_.param_names = char(M_.param_names, 'c1sigmagy');
M_.param_names_tex = char(M_.param_names_tex, 'c1sigmagy');
M_.param_names_long = char(M_.param_names_long, 'c1sigmagy');
M_.param_names = char(M_.param_names, 'c1rhoz');
M_.param_names_tex = char(M_.param_names_tex, 'c1rhoz');
M_.param_names_long = char(M_.param_names_long, 'c1rhoz');
M_.param_names = char(M_.param_names, 'c1sigmaz');
M_.param_names_tex = char(M_.param_names_tex, 'c1sigmaz');
M_.param_names_long = char(M_.param_names_long, 'c1sigmaz');
M_.param_names = char(M_.param_names, 'c2sigma');
M_.param_names_tex = char(M_.param_names_tex, 'c2sigma');
M_.param_names_long = char(M_.param_names_long, 'c2sigma');
M_.param_names = char(M_.param_names, 'c2beta');
M_.param_names_tex = char(M_.param_names_tex, 'c2beta');
M_.param_names_long = char(M_.param_names_long, 'c2beta');
M_.param_names = char(M_.param_names, 'c2rhoc');
M_.param_names_tex = char(M_.param_names_tex, 'c2rhoc');
M_.param_names_long = char(M_.param_names_long, 'c2rhoc');
M_.param_names = char(M_.param_names, 'c2sharegy');
M_.param_names_tex = char(M_.param_names_tex, 'c2sharegy');
M_.param_names_long = char(M_.param_names_long, 'c2sharegy');
M_.param_names = char(M_.param_names, 'c2rhogy');
M_.param_names_tex = char(M_.param_names_tex, 'c2rhogy');
M_.param_names_long = char(M_.param_names_long, 'c2rhogy');
M_.param_names = char(M_.param_names, 'c2sigmagy');
M_.param_names_tex = char(M_.param_names_tex, 'c2sigmagy');
M_.param_names_long = char(M_.param_names_long, 'c2sigmagy');
M_.param_names = char(M_.param_names, 'c2rhoz');
M_.param_names_tex = char(M_.param_names_tex, 'c2rhoz');
M_.param_names_long = char(M_.param_names_long, 'c2rhoz');
M_.param_names = char(M_.param_names, 'c2sigmaz');
M_.param_names_tex = char(M_.param_names_tex, 'c2sigmaz');
M_.param_names_long = char(M_.param_names_long, 'c2sigmaz');
M_.param_names = char(M_.param_names, 'c2rhotaupvar');
M_.param_names_tex = char(M_.param_names_tex, 'c2rhotaupvar');
M_.param_names_long = char(M_.param_names_long, 'c2rhotaupvar');
M_.param_names = char(M_.param_names, 'c2sigmataupvarerr');
M_.param_names_tex = char(M_.param_names_tex, 'c2sigmataupvarerr');
M_.param_names_long = char(M_.param_names_long, 'c2sigmataupvarerr');
M_.param_names = char(M_.param_names, 'c1rhotaupvar');
M_.param_names_tex = char(M_.param_names_tex, 'c1rhotaupvar');
M_.param_names_long = char(M_.param_names_long, 'c1rhotaupvar');
M_.param_names = char(M_.param_names, 'c1sigmataupvarerr');
M_.param_names_tex = char(M_.param_names_tex, 'c1sigmataupvarerr');
M_.param_names_long = char(M_.param_names_long, 'c1sigmataupvarerr');
M_.param_names = char(M_.param_names, 'c2chi');
M_.param_names_tex = char(M_.param_names_tex, 'c2chi');
M_.param_names_long = char(M_.param_names_long, 'c2chi');
M_.param_names = char(M_.param_names, 'c1chi');
M_.param_names_tex = char(M_.param_names_tex, 'c1chi');
M_.param_names_long = char(M_.param_names_long, 'c1chi');
M_.param_names = char(M_.param_names, 'c2nup');
M_.param_names_tex = char(M_.param_names_tex, 'c2nup');
M_.param_names_long = char(M_.param_names_long, 'c2nup');
M_.param_names = char(M_.param_names, 'c1nup');
M_.param_names_tex = char(M_.param_names_tex, 'c1nup');
M_.param_names_long = char(M_.param_names_long, 'c1nup');
M_.param_names = char(M_.param_names, 'c2xip');
M_.param_names_tex = char(M_.param_names_tex, 'c2xip');
M_.param_names_long = char(M_.param_names_long, 'c2xip');
M_.param_names = char(M_.param_names, 'c1xip');
M_.param_names_tex = char(M_.param_names_tex, 'c1xip');
M_.param_names_long = char(M_.param_names_long, 'c1xip');
M_.param_names = char(M_.param_names, 'c1chi0');
M_.param_names_tex = char(M_.param_names_tex, 'c1chi0');
M_.param_names_long = char(M_.param_names_long, 'c1chi0');
M_.param_names = char(M_.param_names, 'c1omegac');
M_.param_names_tex = char(M_.param_names_tex, 'c1omegac');
M_.param_names_long = char(M_.param_names_long, 'c1omegac');
M_.param_names = char(M_.param_names, 'c1omegamc');
M_.param_names_tex = char(M_.param_names_tex, 'c1omegamc');
M_.param_names_long = char(M_.param_names_long, 'c1omegamc');
M_.param_names = char(M_.param_names, 'c1relc2');
M_.param_names_tex = char(M_.param_names_tex, 'c1relc2');
M_.param_names_long = char(M_.param_names_long, 'c1relc2');
M_.param_names = char(M_.param_names, 'c1pistar');
M_.param_names_tex = char(M_.param_names_tex, 'c1pistar');
M_.param_names_long = char(M_.param_names_long, 'c1pistar');
M_.param_names = char(M_.param_names, 'c1taup');
M_.param_names_tex = char(M_.param_names_tex, 'c1taup');
M_.param_names_long = char(M_.param_names_long, 'c1taup');
M_.param_names = char(M_.param_names, 'c2chi0');
M_.param_names_tex = char(M_.param_names_tex, 'c2chi0');
M_.param_names_long = char(M_.param_names_long, 'c2chi0');
M_.param_names = char(M_.param_names, 'c2omegac');
M_.param_names_tex = char(M_.param_names_tex, 'c2omegac');
M_.param_names_long = char(M_.param_names_long, 'c2omegac');
M_.param_names = char(M_.param_names, 'c2omegamc');
M_.param_names_tex = char(M_.param_names_tex, 'c2omegamc');
M_.param_names_long = char(M_.param_names_long, 'c2omegamc');
M_.param_names = char(M_.param_names, 'c2pistar');
M_.param_names_tex = char(M_.param_names_tex, 'c2pistar');
M_.param_names_long = char(M_.param_names_long, 'c2pistar');
M_.param_names = char(M_.param_names, 'c2taup');
M_.param_names_tex = char(M_.param_names_tex, 'c2taup');
M_.param_names_long = char(M_.param_names_long, 'c2taup');
M_.param_names = char(M_.param_names, 'c1rnss');
M_.param_names_tex = char(M_.param_names_tex, 'c1rnss');
M_.param_names_long = char(M_.param_names_long, 'c1rnss');
M_.param_names = char(M_.param_names, 'c2rnss');
M_.param_names_tex = char(M_.param_names_tex, 'c2rnss');
M_.param_names_long = char(M_.param_names_long, 'c2rnss');
M_.param_names = char(M_.param_names, 'c1gamrn');
M_.param_names_tex = char(M_.param_names_tex, 'c1gamrn');
M_.param_names_long = char(M_.param_names_long, 'c1gamrn');
M_.param_names = char(M_.param_names, 'c1gamdpc');
M_.param_names_tex = char(M_.param_names_tex, 'c1gamdpc');
M_.param_names_long = char(M_.param_names_long, 'c1gamdpc');
M_.param_names = char(M_.param_names, 'c2gamrn');
M_.param_names_tex = char(M_.param_names_tex, 'c2gamrn');
M_.param_names_long = char(M_.param_names_long, 'c2gamrn');
M_.param_names = char(M_.param_names, 'c2gamdpc');
M_.param_names_tex = char(M_.param_names_tex, 'c2gamdpc');
M_.param_names_long = char(M_.param_names_long, 'c2gamdpc');
M_.param_names = char(M_.param_names, 'c2lambdaqss');
M_.param_names_tex = char(M_.param_names_tex, 'c2lambdaqss');
M_.param_names_long = char(M_.param_names_long, 'c2lambdaqss');
M_.param_names = char(M_.param_names, 'c2rpcpdss');
M_.param_names_tex = char(M_.param_names_tex, 'c2rpcpdss');
M_.param_names_long = char(M_.param_names_long, 'c2rpcpdss');
M_.param_names = char(M_.param_names, 'c1rerss');
M_.param_names_tex = char(M_.param_names_tex, 'c1rerss');
M_.param_names_long = char(M_.param_names_long, 'c1rerss');
M_.param_names = char(M_.param_names, 'c1lambdaqss');
M_.param_names_tex = char(M_.param_names_tex, 'c1lambdaqss');
M_.param_names_long = char(M_.param_names_long, 'c1lambdaqss');
M_.param_names = char(M_.param_names, 'c1rpcpdss');
M_.param_names_tex = char(M_.param_names_tex, 'c1rpcpdss');
M_.param_names_long = char(M_.param_names_long, 'c1rpcpdss');
M_.exo_det_nbr = 0;
M_.exo_nbr = 8;
M_.endo_nbr = 36;
M_.param_nbr = 48;
M_.orig_endo_nbr = 36;
M_.aux_vars = [];
M_.Sigma_e = zeros(8, 8);
M_.Correlation_matrix = eye(8, 8);
M_.H = 0;
M_.Correlation_matrix_ME = 1;
options_.block=0;
options_.bytecode=0;
options_.use_dll=0;
erase_compiled_function('BBCDLmodelcomp_static');
erase_compiled_function('BBCDLmodelcomp_dynamic');
M_.lead_lag_incidence = [
 0 13 0;
 0 14 0;
 0 15 49;
 0 16 0;
 0 17 0;
 0 18 0;
 0 19 0;
 1 20 50;
 0 21 51;
 0 22 52;
 0 23 53;
 0 24 0;
 2 25 0;
 3 26 0;
 0 27 0;
 0 28 0;
 0 29 54;
 0 30 0;
 0 31 0;
 0 32 0;
 0 33 0;
 4 34 55;
 0 35 56;
 0 36 57;
 0 37 58;
 0 38 0;
 5 39 0;
 6 40 0;
 0 41 0;
 0 42 59;
 7 43 0;
 8 44 0;
 9 45 0;
 10 46 0;
 11 47 0;
 12 48 0;]';
M_.nstatic = 15;
M_.nfwrd   = 9;
M_.npred   = 10;
M_.nboth   = 2;
M_.nsfwrd   = 11;
M_.nspred   = 12;
M_.ndynamic   = 21;
M_.equations_tags = {
};
M_.static_and_dynamic_models_differ = 0;
M_.exo_names_orig_ord = [1:8];
M_.maximum_lag = 1;
M_.maximum_lead = 1;
M_.maximum_endo_lag = 1;
M_.maximum_endo_lead = 1;
oo_.steady_state = zeros(36, 1);
M_.maximum_exo_lag = 0;
M_.maximum_exo_lead = 0;
oo_.exo_steady_state = zeros(8, 1);
M_.params = NaN(48, 1);
M_.NNZDerivatives = zeros(3, 1);
M_.NNZDerivatives(1) = 150;
M_.NNZDerivatives(2) = 378;
M_.NNZDerivatives(3) = -1;
steady;
oo_.dr.eigval = check(M_,options_,oo_);
options_.irf = 0;
options_.nocorr = 1;
options_.noprint = 1;
options_.order = 2;
var_list_=[];
info = stoch_simul(var_list_);
save('BBCDLmodelcomp_results.mat', 'oo_', 'M_', 'options_');
if exist('estim_params_', 'var') == 1
  save('BBCDLmodelcomp_results.mat', 'estim_params_', '-append');
end
if exist('bayestopt_', 'var') == 1
  save('BBCDLmodelcomp_results.mat', 'bayestopt_', '-append');
end
if exist('dataset_', 'var') == 1
  save('BBCDLmodelcomp_results.mat', 'dataset_', '-append');
end
if exist('estimation_info', 'var') == 1
  save('BBCDLmodelcomp_results.mat', 'estimation_info', '-append');
end


disp(['Total computing time : ' dynsec2hms(toc) ]);
if ~isempty(lastwarn)
  disp('Note: warning(s) encountered in MATLAB/Octave code')
end
diary off
