%
% 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 = 'dynarewp036';
%
% Some global variables initialization
%
global_initialization;
diary off;
diary('dynarewp036.log');
M_.exo_names = 'e_sc';
M_.exo_names_tex = 'e\_sc';
M_.exo_names_long = 'e_sc';
M_.exo_names = char(M_.exo_names, 'e_sl');
M_.exo_names_tex = char(M_.exo_names_tex, 'e\_sl');
M_.exo_names_long = char(M_.exo_names_long, 'e_sl');
M_.exo_names = char(M_.exo_names, 'e_l');
M_.exo_names_tex = char(M_.exo_names_tex, 'e\_l');
M_.exo_names_long = char(M_.exo_names_long, 'e_l');
M_.exo_names = char(M_.exo_names, 'e_k');
M_.exo_names_tex = char(M_.exo_names_tex, 'e\_k');
M_.exo_names_long = char(M_.exo_names_long, 'e_k');
M_.exo_names = char(M_.exo_names, 'e_a');
M_.exo_names_tex = char(M_.exo_names_tex, 'e\_a');
M_.exo_names_long = char(M_.exo_names_long, 'e_a');
M_.endo_names = 'Y';
M_.endo_names_tex = 'Y';
M_.endo_names_long = 'Y';
M_.endo_names = char(M_.endo_names, 'C');
M_.endo_names_tex = char(M_.endo_names_tex, 'C');
M_.endo_names_long = char(M_.endo_names_long, 'C');
M_.endo_names = char(M_.endo_names, 'CR');
M_.endo_names_tex = char(M_.endo_names_tex, 'CR');
M_.endo_names_long = char(M_.endo_names_long, 'CR');
M_.endo_names = char(M_.endo_names, 'CNR');
M_.endo_names_tex = char(M_.endo_names_tex, 'CNR');
M_.endo_names_long = char(M_.endo_names_long, 'CNR');
M_.endo_names = char(M_.endo_names, 'I');
M_.endo_names_tex = char(M_.endo_names_tex, 'I');
M_.endo_names_long = char(M_.endo_names_long, 'I');
M_.endo_names = char(M_.endo_names, 'G');
M_.endo_names_tex = char(M_.endo_names_tex, 'G');
M_.endo_names_long = char(M_.endo_names_long, 'G');
M_.endo_names = char(M_.endo_names, 'K');
M_.endo_names_tex = char(M_.endo_names_tex, 'K');
M_.endo_names_long = char(M_.endo_names_long, 'K');
M_.endo_names = char(M_.endo_names, 'L');
M_.endo_names_tex = char(M_.endo_names_tex, 'L');
M_.endo_names_long = char(M_.endo_names_long, 'L');
M_.endo_names = char(M_.endo_names, 'R');
M_.endo_names_tex = char(M_.endo_names_tex, 'R');
M_.endo_names_long = char(M_.endo_names_long, 'R');
M_.endo_names = char(M_.endo_names, 'R_b');
M_.endo_names_tex = char(M_.endo_names_tex, 'R\_b');
M_.endo_names_long = char(M_.endo_names_long, 'R_b');
M_.endo_names = char(M_.endo_names, 'W');
M_.endo_names_tex = char(M_.endo_names_tex, 'W');
M_.endo_names_long = char(M_.endo_names_long, 'W');
M_.endo_names = char(M_.endo_names, 'B');
M_.endo_names_tex = char(M_.endo_names_tex, 'B');
M_.endo_names_long = char(M_.endo_names_long, 'B');
M_.endo_names = char(M_.endo_names, 'TAX');
M_.endo_names_tex = char(M_.endo_names_tex, 'TAX');
M_.endo_names_long = char(M_.endo_names_long, 'TAX');
M_.endo_names = char(M_.endo_names, 'BAL');
M_.endo_names_tex = char(M_.endo_names_tex, 'BAL');
M_.endo_names_long = char(M_.endo_names_long, 'BAL');
M_.endo_names = char(M_.endo_names, 'P');
M_.endo_names_tex = char(M_.endo_names_tex, 'P');
M_.endo_names_long = char(M_.endo_names_long, 'P');
M_.endo_names = char(M_.endo_names, 'PI');
M_.endo_names_tex = char(M_.endo_names_tex, 'PI');
M_.endo_names_long = char(M_.endo_names_long, 'PI');
M_.endo_names = char(M_.endo_names, 'Welfare');
M_.endo_names_tex = char(M_.endo_names_tex, 'Welfare');
M_.endo_names_long = char(M_.endo_names_long, 'Welfare');
M_.endo_names = char(M_.endo_names, 'S_c');
M_.endo_names_tex = char(M_.endo_names_tex, 'S\_c');
M_.endo_names_long = char(M_.endo_names_long, 'S_c');
M_.endo_names = char(M_.endo_names, 'S_l');
M_.endo_names_tex = char(M_.endo_names_tex, 'S\_l');
M_.endo_names_long = char(M_.endo_names_long, 'S_l');
M_.endo_names = char(M_.endo_names, 'FI_l');
M_.endo_names_tex = char(M_.endo_names_tex, 'FI\_l');
M_.endo_names_long = char(M_.endo_names_long, 'FI_l');
M_.endo_names = char(M_.endo_names, 'FI_k');
M_.endo_names_tex = char(M_.endo_names_tex, 'FI\_k');
M_.endo_names_long = char(M_.endo_names_long, 'FI_k');
M_.endo_names = char(M_.endo_names, 'A');
M_.endo_names_tex = char(M_.endo_names_tex, 'A');
M_.endo_names_long = char(M_.endo_names_long, 'A');
M_.param_names = 'a';
M_.param_names_tex = 'a';
M_.param_names_long = 'a';
M_.param_names = char(M_.param_names, 'b');
M_.param_names_tex = char(M_.param_names_tex, 'b');
M_.param_names_long = char(M_.param_names_long, 'b');
M_.param_names = char(M_.param_names, 'varfi');
M_.param_names_tex = char(M_.param_names_tex, 'varfi');
M_.param_names_long = char(M_.param_names_long, 'varfi');
M_.param_names = char(M_.param_names, 'alfa');
M_.param_names_tex = char(M_.param_names_tex, 'alfa');
M_.param_names_long = char(M_.param_names_long, 'alfa');
M_.param_names = char(M_.param_names, 'beta');
M_.param_names_tex = char(M_.param_names_tex, 'beta');
M_.param_names_long = char(M_.param_names_long, 'beta');
M_.param_names = char(M_.param_names, 'delta');
M_.param_names_tex = char(M_.param_names_tex, 'delta');
M_.param_names_long = char(M_.param_names_long, 'delta');
M_.param_names = char(M_.param_names, 'tau_c');
M_.param_names_tex = char(M_.param_names_tex, 'tau\_c');
M_.param_names_long = char(M_.param_names_long, 'tau_c');
M_.param_names = char(M_.param_names, 'tau_k');
M_.param_names_tex = char(M_.param_names_tex, 'tau\_k');
M_.param_names_long = char(M_.param_names_long, 'tau_k');
M_.param_names = char(M_.param_names, 'tau_l');
M_.param_names_tex = char(M_.param_names_tex, 'tau\_l');
M_.param_names_long = char(M_.param_names_long, 'tau_l');
M_.param_names = char(M_.param_names, 'tau_p');
M_.param_names_tex = char(M_.param_names_tex, 'tau\_p');
M_.param_names_long = char(M_.param_names_long, 'tau_p');
M_.param_names = char(M_.param_names, 'sigma');
M_.param_names_tex = char(M_.param_names_tex, 'sigma');
M_.param_names_long = char(M_.param_names_long, 'sigma');
M_.param_names = char(M_.param_names, 'psi');
M_.param_names_tex = char(M_.param_names_tex, 'psi');
M_.param_names_long = char(M_.param_names_long, 'psi');
M_.param_names = char(M_.param_names, 'omega');
M_.param_names_tex = char(M_.param_names_tex, 'omega');
M_.param_names_long = char(M_.param_names_long, 'omega');
M_.param_names = char(M_.param_names, 'ro_sc');
M_.param_names_tex = char(M_.param_names_tex, 'ro\_sc');
M_.param_names_long = char(M_.param_names_long, 'ro_sc');
M_.param_names = char(M_.param_names, 'ro_sl');
M_.param_names_tex = char(M_.param_names_tex, 'ro\_sl');
M_.param_names_long = char(M_.param_names_long, 'ro_sl');
M_.param_names = char(M_.param_names, 'ro_l');
M_.param_names_tex = char(M_.param_names_tex, 'ro\_l');
M_.param_names_long = char(M_.param_names_long, 'ro_l');
M_.param_names = char(M_.param_names, 'ro_k');
M_.param_names_tex = char(M_.param_names_tex, 'ro\_k');
M_.param_names_long = char(M_.param_names_long, 'ro_k');
M_.param_names = char(M_.param_names, 'ro_a');
M_.param_names_tex = char(M_.param_names_tex, 'ro\_a');
M_.param_names_long = char(M_.param_names_long, 'ro_a');
M_.param_names = char(M_.param_names, 'teta');
M_.param_names_tex = char(M_.param_names_tex, 'teta');
M_.param_names_long = char(M_.param_names_long, 'teta');
M_.param_names = char(M_.param_names, 'qui');
M_.param_names_tex = char(M_.param_names_tex, 'qui');
M_.param_names_long = char(M_.param_names_long, 'qui');
M_.param_names = char(M_.param_names, 'PEN');
M_.param_names_tex = char(M_.param_names_tex, 'PEN');
M_.param_names_long = char(M_.param_names_long, 'PEN');
M_.exo_det_nbr = 0;
M_.exo_nbr = 5;
M_.endo_nbr = 22;
M_.param_nbr = 21;
M_.orig_endo_nbr = 22;
M_.aux_vars = [];
M_.Sigma_e = zeros(5, 5);
M_.Correlation_matrix = eye(5, 5);
M_.H = 0;
M_.Correlation_matrix_ME = 1;
M_.sigma_e_is_diagonal = 1;
options_.linear = 1;
options_.block=0;
options_.bytecode=0;
options_.use_dll=0;
erase_compiled_function('dynarewp036_static');
erase_compiled_function('dynarewp036_dynamic');
M_.lead_lag_incidence = [
 0 8 0;
 0 9 0;
 0 10 30;
 0 11 0;
 0 12 0;
 0 13 0;
 1 14 0;
 0 15 0;
 0 16 31;
 0 17 0;
 0 18 0;
 2 19 0;
 0 20 0;
 0 21 0;
 0 22 32;
 0 23 33;
 0 24 0;
 3 25 34;
 4 26 0;
 5 27 0;
 6 28 35;
 7 29 0;]';
M_.nstatic = 11;
M_.nfwrd   = 4;
M_.npred   = 5;
M_.nboth   = 2;
M_.nsfwrd   = 6;
M_.nspred   = 7;
M_.ndynamic   = 11;
M_.equations_tags = {
};
M_.static_and_dynamic_models_differ = 0;
M_.exo_names_orig_ord = [1:5];
M_.maximum_lag = 1;
M_.maximum_lead = 1;
M_.maximum_endo_lag = 1;
M_.maximum_endo_lead = 1;
oo_.steady_state = zeros(22, 1);
M_.maximum_exo_lag = 0;
M_.maximum_exo_lead = 0;
oo_.exo_steady_state = zeros(5, 1);
M_.params = NaN(21, 1);
M_.NNZDerivatives = zeros(3, 1);
M_.NNZDerivatives(1) = 91;
M_.NNZDerivatives(2) = -1;
M_.NNZDerivatives(3) = -1;
﻿
M_.params( 3 ) = 6;
varfi = M_.params( 3 );
M_.params( 4 ) = 0.39;
alfa = M_.params( 4 );
M_.params( 5 ) = 0.985;
beta = M_.params( 5 );
M_.params( 6 ) = 0.025;
delta = M_.params( 6 );
M_.params( 7 ) = 0.1594;
tau_c = M_.params( 7 );
M_.params( 8 ) = 0.0813;
tau_k = M_.params( 8 );
M_.params( 9 ) = 0.1730;
tau_l = M_.params( 9 );
M_.params( 10 ) = 0.105;
tau_p = M_.params( 10 );
M_.params( 13 ) = 0.39;
omega = M_.params( 13 );
M_.params( 11 ) = 2;
sigma = M_.params( 11 );
M_.params( 12 ) = 1.5;
psi = M_.params( 12 );
M_.params( 14 ) = 0.9;
ro_sc = M_.params( 14 );
M_.params( 15 ) = 0.9;
ro_sl = M_.params( 15 );
M_.params( 16 ) = 0.9;
ro_l = M_.params( 16 );
M_.params( 17 ) = 0.9;
ro_k = M_.params( 17 );
M_.params( 18 ) = 0.9;
ro_a = M_.params( 18 );
M_.params( 19 ) = 0.85;
teta = M_.params( 19 );
M_.params( 20 ) = 0.1;
qui = M_.params( 20 );
M_.params( 1 ) = 0.5;
a = M_.params( 1 );
M_.params( 2 ) = 1.5;
b = M_.params( 2 );
M_.params( 21 ) = 0.1;
PEN = M_.params( 21 );
steady;
oo_.dr.eigval = check(M_,options_,oo_);
model_info();
model_diagnostics(M_,options_,oo_);
oo_.dr.eigval = check(M_,options_,oo_);
%
% SHOCKS instructions
%
make_ex_;
M_.exo_det_length = 0;
M_.Sigma_e(3, 3) = (1)^2;
%
% SHOCKS instructions
%
make_ex_;
M_.exo_det_length = 0;
M_.Sigma_e(4, 4) = (1)^2;
%
% SHOCKS instructions
%
make_ex_;
M_.exo_det_length = 0;
M_.Sigma_e(5, 5) = (1)^2;
%
% SHOCKS instructions
%
make_ex_;
M_.exo_det_length = 0;
M_.Sigma_e(1, 1) = (1)^2;
%
% SHOCKS instructions
%
make_ex_;
M_.exo_det_length = 0;
M_.Sigma_e(2, 2) = (1)^2;
options_.irf = 48;
options_.order = 1;
options_.periods = 0;
options_.conditional_variance_decomposition = [1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39;40;41;42;43;44;45;46;47;48;];
var_list_=[];
info = stoch_simul(var_list_);
save('dynarewp036_results.mat', 'oo_', 'M_', 'options_');
if exist('estim_params_', 'var') == 1
  save('dynarewp036_results.mat', 'estim_params_', '-append');
end
if exist('bayestopt_', 'var') == 1
  save('dynarewp036_results.mat', 'bayestopt_', '-append');
end
if exist('dataset_', 'var') == 1
  save('dynarewp036_results.mat', 'dataset_', '-append');
end
if exist('estimation_info', 'var') == 1
  save('dynarewp036_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
