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

tic;
global M_ oo_ options_ ys0_ ex0_ estimation_info
options_ = [];
M_.fname = 'dynrbc';
%
% Some global variables initialization
%
global_initialization;
diary off;
M_.exo_names = 'erra';
M_.exo_names_tex = 'erra';
M_.exo_names_long = 'erra';
M_.endo_names = 'a';
M_.endo_names_tex = 'a';
M_.endo_names_long = 'a';
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, '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, '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, 'lambdak');
M_.endo_names_tex = char(M_.endo_names_tex, 'lambdak');
M_.endo_names_long = char(M_.endo_names_long, 'lambdak');
M_.param_names = 'ALPHA';
M_.param_names_tex = 'ALPHA';
M_.param_names_long = 'ALPHA';
M_.param_names = char(M_.param_names, 'DELTAK');
M_.param_names_tex = char(M_.param_names_tex, 'DELTAK');
M_.param_names_long = char(M_.param_names_long, 'DELTAK');
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, 'GAMMAC');
M_.param_names_tex = char(M_.param_names_tex, 'GAMMAC');
M_.param_names_long = char(M_.param_names_long, 'GAMMAC');
M_.param_names = char(M_.param_names, 'RHOA');
M_.param_names_tex = char(M_.param_names_tex, 'RHOA');
M_.param_names_long = char(M_.param_names_long, 'RHOA');
M_.param_names = char(M_.param_names, 'PHI');
M_.param_names_tex = char(M_.param_names_tex, 'PHI');
M_.param_names_long = char(M_.param_names_long, 'PHI');
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, 'PSINEG');
M_.param_names_tex = char(M_.param_names_tex, 'PSINEG');
M_.param_names_long = char(M_.param_names_long, 'PSINEG');
M_.exo_det_nbr = 0;
M_.exo_nbr = 1;
M_.endo_nbr = 5;
M_.param_nbr = 8;
M_.orig_endo_nbr = 5;
M_.aux_vars = [];
M_.Sigma_e = zeros(1, 1);
M_.Correlation_matrix = eye(1, 1);
M_.H = 0;
M_.Correlation_matrix_ME = 1;
options_.block=0;
options_.bytecode=0;
options_.use_dll=0;
erase_compiled_function('dynrbc_static');
erase_compiled_function('dynrbc_dynamic');
M_.lead_lag_incidence = [
 1 3 8;
 0 4 9;
 0 5 0;
 2 6 10;
 0 7 11;]';
M_.nstatic = 1;
M_.nfwrd   = 2;
M_.npred   = 0;
M_.nboth   = 2;
M_.nsfwrd   = 4;
M_.nspred   = 2;
M_.ndynamic   = 4;
M_.equations_tags = {
};
M_.static_and_dynamic_models_differ = 0;
M_.exo_names_orig_ord = [1:1];
M_.maximum_lag = 1;
M_.maximum_lead = 1;
M_.maximum_endo_lag = 1;
M_.maximum_endo_lead = 1;
oo_.steady_state = zeros(5, 1);
M_.maximum_exo_lag = 0;
M_.maximum_exo_lead = 0;
oo_.exo_steady_state = zeros(1, 1);
M_.params = NaN(8, 1);
M_.NNZDerivatives = zeros(3, 1);
M_.NNZDerivatives(1) = 19;
M_.NNZDerivatives(2) = -1;
M_.NNZDerivatives(3) = -1;
%
% SHOCKS instructions
%
make_ex_;
M_.exo_det_length = 0;
M_.Sigma_e(1, 1) = (0.015)^2;
M_.sigma_e_is_diagonal = 1;
steady;
options_.irf = 0;
options_.nocorr = 1;
options_.nomoments = 1;
options_.noprint = 1;
options_.order = 1;
var_list_=[];
info = stoch_simul(var_list_);
save('dynrbc_results.mat', 'oo_', 'M_', 'options_');
if exist('estim_params_', 'var') == 1
  save('dynrbc_results.mat', 'estim_params_', '-append');
end
if exist('bayestopt_', 'var') == 1
  save('dynrbc_results.mat', 'bayestopt_', '-append');
end
if exist('dataset_', 'var') == 1
  save('dynrbc_results.mat', 'dataset_', '-append');
end
if exist('estimation_info', 'var') == 1
  save('dynrbc_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
