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

clear all
clear global
tic;
global M_ oo_ options_ ys0_ ex0_
options_ = [];
M_.fname = 'zxx';
%
% Some global variables initialization
%
global_initialization;
diary off;
logname_ = 'zxx.log';
if exist(logname_, 'file')
    delete(logname_)
end
diary(logname_)
M_.exo_names = 'etau';
M_.exo_names_tex = 'etau';
M_.exo_names = char(M_.exo_names, 'eu');
M_.exo_names_tex = char(M_.exo_names_tex, 'eu');
M_.exo_names = char(M_.exo_names, 'eda');
M_.exo_names_tex = char(M_.exo_names_tex, 'eda');
M_.exo_names = char(M_.exo_names, 'echi');
M_.exo_names_tex = char(M_.exo_names_tex, 'echi');
M_.exo_names = char(M_.exo_names, 'eg');
M_.exo_names_tex = char(M_.exo_names_tex, 'eg');
M_.exo_names = char(M_.exo_names, 'ej');
M_.exo_names_tex = char(M_.exo_names_tex, 'ej');
M_.endo_names = 'ra';
M_.endo_names_tex = 'ra';
M_.endo_names = char(M_.endo_names, 'r');
M_.endo_names_tex = char(M_.endo_names_tex, 'r');
M_.endo_names = char(M_.endo_names, 'n');
M_.endo_names_tex = char(M_.endo_names_tex, 'n');
M_.endo_names = char(M_.endo_names, 'm');
M_.endo_names_tex = char(M_.endo_names_tex, 'm');
M_.endo_names = char(M_.endo_names, 'pi');
M_.endo_names_tex = char(M_.endo_names_tex, 'pi');
M_.endo_names = char(M_.endo_names, 'c');
M_.endo_names_tex = char(M_.endo_names_tex, 'c');
M_.endo_names = char(M_.endo_names, 'y');
M_.endo_names_tex = char(M_.endo_names_tex, 'y');
M_.endo_names = char(M_.endo_names, 'k');
M_.endo_names_tex = char(M_.endo_names_tex, 'k');
M_.endo_names = char(M_.endo_names, 'qk');
M_.endo_names_tex = char(M_.endo_names_tex, 'qk');
M_.endo_names = char(M_.endo_names, 'qh');
M_.endo_names_tex = char(M_.endo_names_tex, 'qh');
M_.endo_names = char(M_.endo_names, 'he');
M_.endo_names_tex = char(M_.endo_names_tex, 'he');
M_.endo_names = char(M_.endo_names, 'me');
M_.endo_names_tex = char(M_.endo_names_tex, 'me');
M_.endo_names = char(M_.endo_names, 'ik');
M_.endo_names_tex = char(M_.endo_names_tex, 'ik');
M_.endo_names = char(M_.endo_names, 'ih');
M_.endo_names_tex = char(M_.endo_names_tex, 'ih');
M_.endo_names = char(M_.endo_names, 'h');
M_.endo_names_tex = char(M_.endo_names_tex, 'h');
M_.endo_names = char(M_.endo_names, 'hh');
M_.endo_names_tex = char(M_.endo_names_tex, 'hh');
M_.endo_names = char(M_.endo_names, 'l');
M_.endo_names_tex = char(M_.endo_names_tex, 'l');
M_.endo_names = char(M_.endo_names, 'w');
M_.endo_names_tex = char(M_.endo_names_tex, 'w');
M_.endo_names = char(M_.endo_names, 'z');
M_.endo_names_tex = char(M_.endo_names_tex, 'z');
M_.endo_names = char(M_.endo_names, 'x');
M_.endo_names_tex = char(M_.endo_names_tex, 'x');
M_.endo_names = char(M_.endo_names, 'u');
M_.endo_names_tex = char(M_.endo_names_tex, 'u');
M_.endo_names = char(M_.endo_names, 'da');
M_.endo_names_tex = char(M_.endo_names_tex, 'da');
M_.endo_names = char(M_.endo_names, 'chi');
M_.endo_names_tex = char(M_.endo_names_tex, 'chi');
M_.endo_names = char(M_.endo_names, 'g');
M_.endo_names_tex = char(M_.endo_names_tex, 'g');
M_.endo_names = char(M_.endo_names, 'j');
M_.endo_names_tex = char(M_.endo_names_tex, 'j');
M_.endo_names = char(M_.endo_names, 'gy');
M_.endo_names_tex = char(M_.endo_names_tex, 'gy');
M_.endo_names = char(M_.endo_names, 'gc');
M_.endo_names_tex = char(M_.endo_names_tex, 'gc');
M_.endo_names = char(M_.endo_names, 'gm');
M_.endo_names_tex = char(M_.endo_names_tex, 'gm');
M_.endo_names = char(M_.endo_names, 'gqh');
M_.endo_names_tex = char(M_.endo_names_tex, 'gqh');
M_.endo_names = char(M_.endo_names, 'gik');
M_.endo_names_tex = char(M_.endo_names_tex, 'gik');
M_.endo_names = char(M_.endo_names, 'gpi');
M_.endo_names_tex = char(M_.endo_names_tex, 'gpi');
M_.param_names = 'rau';
M_.param_names_tex = 'rau';
M_.param_names = char(M_.param_names, 'ru');
M_.param_names_tex = char(M_.param_names_tex, 'ru');
M_.param_names = char(M_.param_names, 'nu');
M_.param_names_tex = char(M_.param_names_tex, 'nu');
M_.param_names = char(M_.param_names, 'mu');
M_.param_names_tex = char(M_.param_names_tex, 'mu');
M_.param_names = char(M_.param_names, 'piu');
M_.param_names_tex = char(M_.param_names_tex, 'piu');
M_.param_names = char(M_.param_names, 'cu');
M_.param_names_tex = char(M_.param_names_tex, 'cu');
M_.param_names = char(M_.param_names, 'yu');
M_.param_names_tex = char(M_.param_names_tex, 'yu');
M_.param_names = char(M_.param_names, 'ku');
M_.param_names_tex = char(M_.param_names_tex, 'ku');
M_.param_names = char(M_.param_names, 'qku');
M_.param_names_tex = char(M_.param_names_tex, 'qku');
M_.param_names = char(M_.param_names, 'qhu');
M_.param_names_tex = char(M_.param_names_tex, 'qhu');
M_.param_names = char(M_.param_names, 'heu');
M_.param_names_tex = char(M_.param_names_tex, 'heu');
M_.param_names = char(M_.param_names, 'meu');
M_.param_names_tex = char(M_.param_names_tex, 'meu');
M_.param_names = char(M_.param_names, 'iku');
M_.param_names_tex = char(M_.param_names_tex, 'iku');
M_.param_names = char(M_.param_names, 'ihu');
M_.param_names_tex = char(M_.param_names_tex, 'ihu');
M_.param_names = char(M_.param_names, 'hu');
M_.param_names_tex = char(M_.param_names_tex, 'hu');
M_.param_names = char(M_.param_names, 'hhu');
M_.param_names_tex = char(M_.param_names_tex, 'hhu');
M_.param_names = char(M_.param_names, 'lu');
M_.param_names_tex = char(M_.param_names_tex, 'lu');
M_.param_names = char(M_.param_names, 'wu');
M_.param_names_tex = char(M_.param_names_tex, 'wu');
M_.param_names = char(M_.param_names, 'zu');
M_.param_names_tex = char(M_.param_names_tex, 'zu');
M_.param_names = char(M_.param_names, 'xu');
M_.param_names_tex = char(M_.param_names_tex, 'xu');
M_.param_names = char(M_.param_names, 'uu');
M_.param_names_tex = char(M_.param_names_tex, 'uu');
M_.param_names = char(M_.param_names, 'dau');
M_.param_names_tex = char(M_.param_names_tex, 'dau');
M_.param_names = char(M_.param_names, 'chiu');
M_.param_names_tex = char(M_.param_names_tex, 'chiu');
M_.param_names = char(M_.param_names, 'gu');
M_.param_names_tex = char(M_.param_names_tex, 'gu');
M_.param_names = char(M_.param_names, 'ju');
M_.param_names_tex = char(M_.param_names_tex, 'ju');
M_.param_names = char(M_.param_names, 'tauu');
M_.param_names_tex = char(M_.param_names_tex, 'tauu');
M_.param_names = char(M_.param_names, 'gamma');
M_.param_names_tex = char(M_.param_names_tex, 'gamma');
M_.param_names = char(M_.param_names, 'alpha');
M_.param_names_tex = char(M_.param_names_tex, 'alpha');
M_.param_names = char(M_.param_names, 'zeta');
M_.param_names_tex = char(M_.param_names_tex, 'zeta');
M_.param_names = char(M_.param_names, 'phi');
M_.param_names_tex = char(M_.param_names_tex, 'phi');
M_.param_names = char(M_.param_names, 'delta');
M_.param_names_tex = char(M_.param_names_tex, 'delta');
M_.param_names = char(M_.param_names, 'deltak');
M_.param_names_tex = char(M_.param_names_tex, 'deltak');
M_.param_names = char(M_.param_names, 'deltah');
M_.param_names_tex = char(M_.param_names_tex, 'deltah');
M_.param_names = char(M_.param_names, 'psik');
M_.param_names_tex = char(M_.param_names_tex, 'psik');
M_.param_names = char(M_.param_names, 'psih');
M_.param_names_tex = char(M_.param_names_tex, 'psih');
M_.param_names = char(M_.param_names, 'beta');
M_.param_names_tex = char(M_.param_names_tex, 'beta');
M_.param_names = char(M_.param_names, 'epsilon');
M_.param_names_tex = char(M_.param_names_tex, 'epsilon');
M_.param_names = char(M_.param_names, 'rhoda');
M_.param_names_tex = char(M_.param_names_tex, 'rhoda');
M_.param_names = char(M_.param_names, 'rhochi');
M_.param_names_tex = char(M_.param_names_tex, 'rhochi');
M_.param_names = char(M_.param_names, 'rhoj');
M_.param_names_tex = char(M_.param_names_tex, 'rhoj');
M_.param_names = char(M_.param_names, 'rhou');
M_.param_names_tex = char(M_.param_names_tex, 'rhou');
M_.param_names = char(M_.param_names, 'rhotau');
M_.param_names_tex = char(M_.param_names_tex, 'rhotau');
M_.param_names = char(M_.param_names, 'rhog');
M_.param_names_tex = char(M_.param_names_tex, 'rhog');
M_.exo_det_nbr = 0;
M_.exo_nbr = 6;
M_.endo_nbr = 31;
M_.param_nbr = 43;
M_.orig_endo_nbr = 31;
M_.aux_vars = [];
options_.varobs = [];
options_.varobs = 'gy';
options_.varobs = char(options_.varobs, 'gc');
options_.varobs = char(options_.varobs, 'gik');
options_.varobs = char(options_.varobs, 'gqh');
options_.varobs = char(options_.varobs, 'gpi');
options_.varobs = char(options_.varobs, 'gm');
options_.varobs_id = [ 26 27 30 29 31 28  ];
M_.Sigma_e = zeros(6, 6);
M_.H = 0;
options_.linear = 1;
options_.block=0;
options_.bytecode=0;
options_.use_dll=0;
erase_compiled_function('zxx_dynamic');
M_.lead_lag_incidence = [
 1 22 0;
 2 23 0;
 3 24 0;
 4 25 53;
 5 26 54;
 6 27 55;
 7 28 0;
 8 29 56;
 9 30 0;
 10 31 0;
 11 32 57;
 12 33 58;
 13 34 0;
 14 35 0;
 15 36 0;
 0 37 0;
 0 38 0;
 0 39 0;
 16 40 0;
 0 41 59;
 17 42 0;
 18 43 60;
 19 44 0;
 20 45 0;
 21 46 0;
 0 47 0;
 0 48 0;
 0 49 0;
 0 50 0;
 0 51 0;
 0 52 0;]';
M_.equations_tags = {
};
M_.exo_names_orig_ord = [1:6];
M_.maximum_lag = 1;
M_.maximum_lead = 1;
M_.maximum_endo_lag = 1;
M_.maximum_endo_lead = 1;
oo_.steady_state = zeros(31, 1);
M_.maximum_exo_lag = 0;
M_.maximum_exo_lead = 0;
oo_.exo_steady_state = zeros(6, 1);
M_.params = NaN(43, 1);
M_.NNZDerivatives = zeros(3, 1);
M_.NNZDerivatives(1) = 151;
M_.NNZDerivatives(2) = 0;
M_.NNZDerivatives(3) = -1;
M_.params( 36 ) = 0.999;
beta = M_.params( 36 );
psi=1;
M_.params( 32 ) = 0.03;
deltak = M_.params( 32 );
M_.params( 33 ) = 0.005;
deltah = M_.params( 33 );
M_.params( 4 ) = 0.21;
mu = M_.params( 4 );
M_.params( 27 ) = 0.975;
gamma = M_.params( 27 );
M_.params( 34 ) = 4;
psik = M_.params( 34 );
M_.params( 35 ) = 7;
psih = M_.params( 35 );
M_.params( 37 ) = 0.73;
epsilon = M_.params( 37 );
M_.params( 28 ) = 0.4;
alpha = M_.params( 28 );
M_.params( 31 ) = 0.3047;
delta = M_.params( 31 );
M_.params( 30 ) = 0.7;
phi = M_.params( 30 );
M_.params( 22 ) = 1.0324;
dau = M_.params( 22 );
M_.params( 23 ) = 1.0329;
chiu = M_.params( 23 );
M_.params( 26 ) = 0;
tauu = M_.params( 26 );
M_.params( 24 ) = 0.0224;
gu = M_.params( 24 );
M_.params( 20 ) = M_.params(4);
xu = M_.params( 20 );
M_.params( 21 ) = 1;
uu = M_.params( 21 );
M_.params( 25 ) = 0.18;
ju = M_.params( 25 );
M_.params( 1 ) = 1.0743;
rau = M_.params( 1 );
M_.params( 2 ) = 1.0340;
ru = M_.params( 2 );
M_.params( 3 ) = 0.0013;
nu = M_.params( 3 );
M_.params( 4 ) = 0.6987;
mu = M_.params( 4 );
M_.params( 5 ) = 1.0005;
piu = M_.params( 5 );
M_.params( 6 ) = 0.0860;
cu = M_.params( 6 );
M_.params( 7 ) = 0.1000;
yu = M_.params( 7 );
M_.params( 8 ) = 0.0217;
ku = M_.params( 8 );
M_.params( 9 ) = 1.0000;
qku = M_.params( 9 );
M_.params( 10 ) = 1.0000;
qhu = M_.params( 10 );
M_.params( 11 ) = 0.0093;
heu = M_.params( 11 );
M_.params( 12 ) = 0.0310;
meu = M_.params( 12 );
M_.params( 13 ) = 0.0006;
iku = M_.params( 13 );
M_.params( 14 ) = 0.0005;
ihu = M_.params( 14 );
M_.params( 15 ) = 0.0129;
hu = M_.params( 15 );
M_.params( 16 ) = 0.0035;
hhu = M_.params( 16 );
M_.params( 17 ) = 0.4109;
lu = M_.params( 17 );
M_.params( 18 ) = 0.1217;
wu = M_.params( 18 );
M_.params( 19 ) = 0.0043;
zu = M_.params( 19 );
M_.params( 20 ) = 1.2000;
xu = M_.params( 20 );
vu= 0.0220;
gyu=1.031944862;
gmu=1.274053692;
gcu=1.034859905;
giku=1.37555871;
gpiu=1.000497906;
gqhu=1.020269475;
M_.params( 38 ) = 0.95;
rhoda = M_.params( 38 );
M_.params( 39 ) = 0.5;
rhochi = M_.params( 39 );
M_.params( 43 ) = 0.9;
rhog = M_.params( 43 );
M_.params( 40 ) = 0.95;
rhoj = M_.params( 40 );
M_.params( 41 ) = 0.5;
rhou = M_.params( 41 );
M_.params( 29 ) = 1.1;
zeta = M_.params( 29 );
steady;
check;
%
% INITVAL instructions
%
options_.initval_file = 0;
oo_.steady_state( 20 ) = 0;
oo_.steady_state( 19 ) = 0;
oo_.steady_state( 5 ) = 0;
oo_.steady_state( 20 ) = 0;
oo_.steady_state( 2 ) = 0;
oo_.steady_state( 9 ) = 0;
oo_.steady_state( 10 ) = 0;
oo_.steady_state( 1 ) = 0;
oo_.steady_state( 7 ) = 0;
oo_.steady_state( 3 ) = 0;
oo_.steady_state( 11 ) = 0;
oo_.steady_state( 8 ) = 0;
oo_.steady_state( 17 ) = 0;
oo_.steady_state( 18 ) = 0;
oo_.steady_state( 6 ) = 0;
oo_.steady_state( 16 ) = 0;
oo_.steady_state( 15 ) = 0;
oo_.steady_state( 14 ) = 0;
oo_.steady_state( 13 ) = 0;
oo_.steady_state( 4 ) = 0;
oo_.steady_state( 12 ) = 0;
oo_.steady_state( 21 ) = 0;
oo_.steady_state( 25 ) = 0;
oo_.steady_state( 22 ) = 0;
oo_.steady_state( 23 ) = 0;
oo_.steady_state( 24 ) = 0;
oo_.steady_state( 26 ) = 0;
oo_.steady_state( 28 ) = 0;
oo_.steady_state( 27 ) = 0;
oo_.steady_state( 30 ) = 0;
oo_.steady_state( 31 ) = 0;
oo_.steady_state( 29 ) = 0;
oo_.endo_simul=[oo_.steady_state*ones(1,M_.maximum_lag)];
if M_.exo_nbr > 0;
	oo_.exo_simul = [ones(M_.maximum_lag,1)*oo_.exo_steady_state'];
end;
if M_.exo_det_nbr > 0;
	oo_.exo_det_simul = [ones(M_.maximum_lag,1)*oo_.exo_det_steady_state'];
end;
resid(1);
%
% SHOCKS instructions
%
make_ex_;
M_.exo_det_length = 0;
M_.Sigma_e(1, 1) = 0.01;
M_.Sigma_e(2, 2) = 0.01;
M_.Sigma_e(3, 3) = 0.01;
M_.Sigma_e(4, 4) = 0.01;
M_.Sigma_e(5, 5) = 0.01;
M_.Sigma_e(6, 6) = 0.01;
M_.sigma_e_is_diagonal = 1;
global estim_params_
estim_params_.var_exo = [];
estim_params_.var_endo = [];
estim_params_.corrx = [];
estim_params_.corrn = [];
estim_params_.param_vals = [];
estim_params_.param_vals = [estim_params_.param_vals; 38, NaN, (-Inf), Inf, 1, 0.5, 0.1, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 39, NaN, (-Inf), Inf, 1, 0.5, 0.2, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 40, NaN, (-Inf), Inf, 1, 0.5, 0.2, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 43, NaN, (-Inf), Inf, 1, 0.5, 0.2, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 41, NaN, (-Inf), Inf, 1, 0.5, 0.2, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 3, NaN, (-Inf), Inf, 4, 0.1, Inf, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 4, NaN, (-Inf), Inf, 4, 0.1, Inf, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 6, NaN, (-Inf), Inf, 4, 0.1, Inf, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 5, NaN, (-Inf), Inf, 4, 0.1, Inf, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 1, NaN, (-Inf), Inf, 4, 0.1, Inf, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 2, NaN, (-Inf), Inf, 4, 0.1, Inf, NaN, NaN, NaN ];
options_.mode_check = 1;
options_.smoother = 1;
options_.datafile = 'zhongjiebanshuju';
var_list_=[];
dynare_estimation(var_list_);
save('zxx_results.mat', 'oo_', 'M_', 'options_');
diary off

disp(['Total computing time : ' dynsec2hms(toc) ]);
