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

tic0 = tic;
% Define global variables.
global M_ options_ oo_ estim_params_ bayestopt_ dataset_ dataset_info estimation_info ys0_ ex0_
options_ = [];
M_.fname = 'IRF_as_policy';
M_.dynare_version = '5.2';
oo_.dynare_version = '5.2';
options_.dynare_version = '5.2';
%
% Some global variables initialization
%
global_initialization;
M_.exo_names = cell(4,1);
M_.exo_names_tex = cell(4,1);
M_.exo_names_long = cell(4,1);
M_.exo_names(1) = {'eA'};
M_.exo_names_tex(1) = {'eA'};
M_.exo_names_long(1) = {'eA'};
M_.exo_names(2) = {'eP'};
M_.exo_names_tex(2) = {'eP'};
M_.exo_names_long(2) = {'eP'};
M_.exo_names(3) = {'eO'};
M_.exo_names_tex(3) = {'eO'};
M_.exo_names_long(3) = {'eO'};
M_.exo_names(4) = {'eB'};
M_.exo_names_tex(4) = {'eB'};
M_.exo_names_long(4) = {'eB'};
M_.endo_names = cell(30,1);
M_.endo_names_tex = cell(30,1);
M_.endo_names_long = cell(30,1);
M_.endo_names(1) = {'qk'};
M_.endo_names_tex(1) = {'qk'};
M_.endo_names_long(1) = {'qk'};
M_.endo_names(2) = {'Phi_k'};
M_.endo_names_tex(2) = {'Phi\_k'};
M_.endo_names_long(2) = {'Phi_k'};
M_.endo_names(3) = {'eps1'};
M_.endo_names_tex(3) = {'eps1'};
M_.endo_names_long(3) = {'eps1'};
M_.endo_names(4) = {'eps2'};
M_.endo_names_tex(4) = {'eps2'};
M_.endo_names_long(4) = {'eps2'};
M_.endo_names(5) = {'theta'};
M_.endo_names_tex(5) = {'theta'};
M_.endo_names_long(5) = {'theta'};
M_.endo_names(6) = {'qb'};
M_.endo_names_tex(6) = {'qb'};
M_.endo_names_long(6) = {'qb'};
M_.endo_names(7) = {'Y'};
M_.endo_names_tex(7) = {'Y'};
M_.endo_names_long(7) = {'Y'};
M_.endo_names(8) = {'K'};
M_.endo_names_tex(8) = {'K'};
M_.endo_names_long(8) = {'K'};
M_.endo_names(9) = {'N'};
M_.endo_names_tex(9) = {'N'};
M_.endo_names_long(9) = {'N'};
M_.endo_names(10) = {'rk'};
M_.endo_names_tex(10) = {'rk'};
M_.endo_names_long(10) = {'rk'};
M_.endo_names(11) = {'w'};
M_.endo_names_tex(11) = {'w'};
M_.endo_names_long(11) = {'w'};
M_.endo_names(12) = {'Rb'};
M_.endo_names_tex(12) = {'Rb'};
M_.endo_names_long(12) = {'Rb'};
M_.endo_names(13) = {'I'};
M_.endo_names_tex(13) = {'I'};
M_.endo_names_long(13) = {'I'};
M_.endo_names(14) = {'C'};
M_.endo_names_tex(14) = {'C'};
M_.endo_names_long(14) = {'C'};
M_.endo_names(15) = {'BY'};
M_.endo_names_tex(15) = {'BY'};
M_.endo_names_long(15) = {'BY'};
M_.endo_names(16) = {'Lambda'};
M_.endo_names_tex(16) = {'Lambda'};
M_.endo_names_long(16) = {'Lambda'};
M_.endo_names(17) = {'Rk'};
M_.endo_names_tex(17) = {'Rk'};
M_.endo_names_long(17) = {'Rk'};
M_.endo_names(18) = {'spread'};
M_.endo_names_tex(18) = {'spread'};
M_.endo_names_long(18) = {'spread'};
M_.endo_names(19) = {'Bt'};
M_.endo_names_tex(19) = {'Bt'};
M_.endo_names_long(19) = {'Bt'};
M_.endo_names(20) = {'omegat'};
M_.endo_names_tex(20) = {'omegat'};
M_.endo_names_long(20) = {'omegat'};
M_.endo_names(21) = {'At'};
M_.endo_names_tex(21) = {'At'};
M_.endo_names_long(21) = {'At'};
M_.endo_names(22) = {'L'};
M_.endo_names_tex(22) = {'L'};
M_.endo_names_long(22) = {'L'};
M_.endo_names(23) = {'S'};
M_.endo_names_tex(23) = {'S'};
M_.endo_names_long(23) = {'S'};
M_.endo_names(24) = {'ppit'};
M_.endo_names_tex(24) = {'ppit'};
M_.endo_names_long(24) = {'ppit'};
M_.endo_names(25) = {'omgt'};
M_.endo_names_tex(25) = {'omgt'};
M_.endo_names_long(25) = {'omgt'};
M_.endo_names(26) = {'bbt'};
M_.endo_names_tex(26) = {'bbt'};
M_.endo_names_long(26) = {'bbt'};
M_.endo_names(27) = {'haircut'};
M_.endo_names_tex(27) = {'haircut'};
M_.endo_names_long(27) = {'haircut'};
M_.endo_names(28) = {'theta_original'};
M_.endo_names_tex(28) = {'theta\_original'};
M_.endo_names_long(28) = {'theta_original'};
M_.endo_names(29) = {'lambda'};
M_.endo_names_tex(29) = {'lambda'};
M_.endo_names_long(29) = {'lambda'};
M_.endo_names(30) = {'V'};
M_.endo_names_tex(30) = {'V'};
M_.endo_names_long(30) = {'V'};
M_.endo_partitions = struct();
M_.param_names = cell(39,1);
M_.param_names_tex = cell(39,1);
M_.param_names_long = cell(39,1);
M_.param_names(1) = {'beta'};
M_.param_names_tex(1) = {'beta'};
M_.param_names_long(1) = {'beta'};
M_.param_names(2) = {'alpha'};
M_.param_names_tex(2) = {'alpha'};
M_.param_names_long(2) = {'alpha'};
M_.param_names(3) = {'A_ss'};
M_.param_names_tex(3) = {'A\_ss'};
M_.param_names_long(3) = {'A_ss'};
M_.param_names(4) = {'chi'};
M_.param_names_tex(4) = {'chi'};
M_.param_names_long(4) = {'chi'};
M_.param_names(5) = {'ksi'};
M_.param_names_tex(5) = {'ksi'};
M_.param_names_long(5) = {'ksi'};
M_.param_names(6) = {'ppi'};
M_.param_names_tex(6) = {'ppi'};
M_.param_names_long(6) = {'ppi'};
M_.param_names(7) = {'gamma'};
M_.param_names_tex(7) = {'gamma'};
M_.param_names_long(7) = {'gamma'};
M_.param_names(8) = {'delta'};
M_.param_names_tex(8) = {'delta'};
M_.param_names_long(8) = {'delta'};
M_.param_names(9) = {'eta'};
M_.param_names_tex(9) = {'eta'};
M_.param_names_long(9) = {'eta'};
M_.param_names(10) = {'eps_min'};
M_.param_names_tex(10) = {'eps\_min'};
M_.param_names_long(10) = {'eps_min'};
M_.param_names(11) = {'S_ss'};
M_.param_names_tex(11) = {'S\_ss'};
M_.param_names_long(11) = {'S_ss'};
M_.param_names(12) = {'pphi'};
M_.param_names_tex(12) = {'pphi'};
M_.param_names_long(12) = {'pphi'};
M_.param_names(13) = {'theta_ss'};
M_.param_names_tex(13) = {'theta\_ss'};
M_.param_names_long(13) = {'theta_ss'};
M_.param_names(14) = {'B_ss'};
M_.param_names_tex(14) = {'B\_ss'};
M_.param_names_long(14) = {'B_ss'};
M_.param_names(15) = {'eps1_ss'};
M_.param_names_tex(15) = {'eps1\_ss'};
M_.param_names_long(15) = {'eps1_ss'};
M_.param_names(16) = {'qk_ss'};
M_.param_names_tex(16) = {'qk\_ss'};
M_.param_names_long(16) = {'qk_ss'};
M_.param_names(17) = {'qb_ss'};
M_.param_names_tex(17) = {'qb\_ss'};
M_.param_names_long(17) = {'qb_ss'};
M_.param_names(18) = {'L_ss'};
M_.param_names_tex(18) = {'L\_ss'};
M_.param_names_long(18) = {'L_ss'};
M_.param_names(19) = {'Rb_ss'};
M_.param_names_tex(19) = {'Rb\_ss'};
M_.param_names_long(19) = {'Rb_ss'};
M_.param_names(20) = {'rk_ss'};
M_.param_names_tex(20) = {'rk\_ss'};
M_.param_names_long(20) = {'rk_ss'};
M_.param_names(21) = {'K_ss'};
M_.param_names_tex(21) = {'K\_ss'};
M_.param_names_long(21) = {'K_ss'};
M_.param_names(22) = {'N_ss'};
M_.param_names_tex(22) = {'N\_ss'};
M_.param_names_long(22) = {'N_ss'};
M_.param_names(23) = {'Y_ss'};
M_.param_names_tex(23) = {'Y\_ss'};
M_.param_names_long(23) = {'Y_ss'};
M_.param_names(24) = {'w_ss'};
M_.param_names_tex(24) = {'w\_ss'};
M_.param_names_long(24) = {'w_ss'};
M_.param_names(25) = {'I_ss'};
M_.param_names_tex(25) = {'I\_ss'};
M_.param_names_long(25) = {'I_ss'};
M_.param_names(26) = {'C_ss'};
M_.param_names_tex(26) = {'C\_ss'};
M_.param_names_long(26) = {'C_ss'};
M_.param_names(27) = {'Rk_ss'};
M_.param_names_tex(27) = {'Rk\_ss'};
M_.param_names_long(27) = {'Rk_ss'};
M_.param_names(28) = {'Lambda_ss'};
M_.param_names_tex(28) = {'Lambda\_ss'};
M_.param_names_long(28) = {'Lambda_ss'};
M_.param_names(29) = {'omega_ss'};
M_.param_names_tex(29) = {'omega\_ss'};
M_.param_names_long(29) = {'omega_ss'};
M_.param_names(30) = {'omega_bar'};
M_.param_names_tex(30) = {'omega\_bar'};
M_.param_names_long(30) = {'omega_bar'};
M_.param_names(31) = {'rho_a'};
M_.param_names_tex(31) = {'rho\_a'};
M_.param_names_long(31) = {'rho_a'};
M_.param_names(32) = {'rho_ppi'};
M_.param_names_tex(32) = {'rho\_ppi'};
M_.param_names_long(32) = {'rho_ppi'};
M_.param_names(33) = {'rho_omega'};
M_.param_names_tex(33) = {'rho\_omega'};
M_.param_names_long(33) = {'rho_omega'};
M_.param_names(34) = {'rho_b'};
M_.param_names_tex(34) = {'rho\_b'};
M_.param_names_long(34) = {'rho_b'};
M_.param_names(35) = {'phi'};
M_.param_names_tex(35) = {'phi'};
M_.param_names_long(35) = {'phi'};
M_.param_names(36) = {'stdA'};
M_.param_names_tex(36) = {'stdA'};
M_.param_names_long(36) = {'stdA'};
M_.param_names(37) = {'stdP'};
M_.param_names_tex(37) = {'stdP'};
M_.param_names_long(37) = {'stdP'};
M_.param_names(38) = {'stdO'};
M_.param_names_tex(38) = {'stdO'};
M_.param_names_long(38) = {'stdO'};
M_.param_names(39) = {'stdB'};
M_.param_names_tex(39) = {'stdB'};
M_.param_names_long(39) = {'stdB'};
M_.param_partitions = struct();
M_.exo_det_nbr = 0;
M_.exo_nbr = 4;
M_.endo_nbr = 30;
M_.param_nbr = 39;
M_.orig_endo_nbr = 30;
M_.aux_vars = [];
M_ = setup_solvers(M_);
M_.Sigma_e = zeros(4, 4);
M_.Correlation_matrix = eye(4, 4);
M_.H = 0;
M_.Correlation_matrix_ME = 1;
M_.sigma_e_is_diagonal = true;
M_.det_shocks = [];
M_.surprise_shocks = [];
M_.heteroskedastic_shocks.Qvalue_orig = [];
M_.heteroskedastic_shocks.Qscale_orig = [];
options_.linear = false;
options_.block = false;
options_.bytecode = false;
options_.use_dll = false;
M_.nonzero_hessian_eqs = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 21 22 23 24 26];
M_.hessian_eq_zero = isempty(M_.nonzero_hessian_eqs);
M_.orig_eq_nbr = 30;
M_.eq_nbr = 30;
M_.ramsey_eq_nbr = 0;
M_.set_auxiliary_variables = exist(['./+' M_.fname '/set_auxiliary_variables.m'], 'file') == 2;
M_.epilogue_names = {};
M_.epilogue_var_list_ = {};
M_.orig_maximum_endo_lag = 1;
M_.orig_maximum_endo_lead = 1;
M_.orig_maximum_exo_lag = 0;
M_.orig_maximum_exo_lead = 0;
M_.orig_maximum_exo_det_lag = 0;
M_.orig_maximum_exo_det_lead = 0;
M_.orig_maximum_lag = 1;
M_.orig_maximum_lead = 1;
M_.orig_maximum_lag_with_diffs_expanded = 1;
M_.lead_lag_incidence = [
 0 7 37;
 0 8 38;
 0 9 39;
 0 10 40;
 0 11 0;
 0 12 0;
 0 13 0;
 1 14 0;
 0 15 0;
 0 16 41;
 0 17 0;
 0 18 0;
 0 19 0;
 0 20 0;
 0 21 0;
 0 22 42;
 0 23 0;
 0 24 0;
 2 25 0;
 0 26 0;
 3 27 0;
 0 28 0;
 0 29 0;
 4 30 43;
 5 31 44;
 6 32 0;
 0 33 0;
 0 34 0;
 0 35 0;
 0 36 45;]';
M_.nstatic = 17;
M_.nfwrd   = 7;
M_.npred   = 4;
M_.nboth   = 2;
M_.nsfwrd   = 9;
M_.nspred   = 6;
M_.ndynamic   = 13;
M_.dynamic_tmp_nbr = [28; 35; 6; 0; ];
M_.model_local_variables_dynamic_tt_idxs = {
};
M_.equations_tags = {
  1 , 'name' , 'V' ;
  2 , 'name' , '2' ;
  3 , 'name' , '3' ;
  4 , 'name' , 'theta_original' ;
  5 , 'name' , 'eps1' ;
  6 , 'name' , 'eps2' ;
  7 , 'name' , '7' ;
  8 , 'name' , '8' ;
  9 , 'name' , 'rk' ;
  10 , 'name' , 'w' ;
  11 , 'name' , 'Rb' ;
  12 , 'name' , '12' ;
  13 , 'name' , '13' ;
  14 , 'name' , '14' ;
  15 , 'name' , '15' ;
  16 , 'name' , 'Lambda' ;
  17 , 'name' , 'BY' ;
  18 , 'name' , 'Rk' ;
  19 , 'name' , 'spread' ;
  20 , 'name' , 'omegat' ;
  21 , 'name' , '21' ;
  22 , 'name' , '22' ;
  23 , 'name' , '23' ;
  24 , 'name' , 'lambda' ;
  25 , 'name' , 'haircut' ;
  26 , 'name' , 'theta' ;
  27 , 'name' , 'At' ;
  28 , 'name' , 'ppit' ;
  29 , 'name' , 'omgt' ;
  30 , 'name' , 'bbt' ;
};
M_.mapping.qk.eqidx = [2 3 6 12 13 18 22 ];
M_.mapping.Phi_k.eqidx = [2 3 5 18 ];
M_.mapping.eps1.eqidx = [2 5 7 12 13 ];
M_.mapping.eps2.eqidx = [2 4 6 12 13 18 21 ];
M_.mapping.theta.eqidx = [3 15 20 25 26 ];
M_.mapping.qb.eqidx = [7 11 15 18 ];
M_.mapping.Y.eqidx = [8 9 10 15 17 ];
M_.mapping.K.eqidx = [8 9 12 13 21 ];
M_.mapping.N.eqidx = [1 8 10 14 ];
M_.mapping.rk.eqidx = [2 9 12 13 18 ];
M_.mapping.w.eqidx = [10 14 ];
M_.mapping.Rb.eqidx = [11 19 ];
M_.mapping.I.eqidx = [12 15 ];
M_.mapping.C.eqidx = [1 14 15 16 ];
M_.mapping.BY.eqidx = [17 ];
M_.mapping.Lambda.eqidx = [2 7 16 ];
M_.mapping.Rk.eqidx = [18 19 ];
M_.mapping.spread.eqidx = [19 ];
M_.mapping.Bt.eqidx = [12 13 15 17 23 ];
M_.mapping.omegat.eqidx = [20 ];
M_.mapping.At.eqidx = [8 27 ];
M_.mapping.L.eqidx = [15 22 23 24 ];
M_.mapping.S.eqidx = [21 22 ];
M_.mapping.ppit.eqidx = [2 4 12 13 18 20 21 28 ];
M_.mapping.omgt.eqidx = [2 12 13 18 20 21 29 ];
M_.mapping.bbt.eqidx = [23 30 ];
M_.mapping.haircut.eqidx = [25 ];
M_.mapping.theta_original.eqidx = [4 26 ];
M_.mapping.lambda.eqidx = [15 24 26 ];
M_.mapping.V.eqidx = [1 ];
M_.mapping.eA.eqidx = [27 ];
M_.mapping.eP.eqidx = [28 ];
M_.mapping.eO.eqidx = [29 ];
M_.mapping.eB.eqidx = [30 ];
M_.static_and_dynamic_models_differ = false;
M_.has_external_function = false;
M_.state_var = [8 19 21 24 25 26 ];
M_.exo_names_orig_ord = [1:4];
M_.maximum_lag = 1;
M_.maximum_lead = 1;
M_.maximum_endo_lag = 1;
M_.maximum_endo_lead = 1;
oo_.steady_state = zeros(30, 1);
M_.maximum_exo_lag = 0;
M_.maximum_exo_lead = 0;
oo_.exo_steady_state = zeros(4, 1);
M_.params = NaN(39, 1);
M_.endo_trends = struct('deflator', cell(30, 1), 'log_deflator', cell(30, 1), 'growth_factor', cell(30, 1), 'log_growth_factor', cell(30, 1));
M_.NNZDerivatives = [121; 265; -1; ];
M_.static_tmp_nbr = [20; 3; 0; 0; ];
M_.model_local_variables_static_tt_idxs = {
};
load data_pam_policy
M_.params(1) = pam_policy(1);
beta = M_.params(1);
M_.params(8) = pam_policy(2);
delta = M_.params(8);
M_.params(2) = pam_policy(3);
alpha = M_.params(2);
M_.params(3) = log(pam_policy(4));
A_ss = M_.params(3);
M_.params(30) = pam_policy(5);
omega_bar = M_.params(30);
M_.params(4) = pam_policy(6);
chi = M_.params(4);
M_.params(5) = pam_policy(7);
ksi = M_.params(5);
M_.params(9) = pam_policy(8);
eta = M_.params(9);
sigma = pam_policy(9);
M_.params(10) = pam_policy(10);
eps_min = M_.params(10);
M_.params(6) = pam_policy(11);
ppi = M_.params(6);
M_.params(7) = pam_policy(12);
gamma = M_.params(7);
M_.params(14) = log(pam_policy(13));
B_ss = M_.params(14);
M_.params(31) = pam_policy(14);
rho_a = M_.params(31);
M_.params(32) = pam_policy(15);
rho_ppi = M_.params(32);
M_.params(33) = pam_policy(16);
rho_omega = M_.params(33);
M_.params(34) = pam_policy(17);
rho_b = M_.params(34);
M_.params(35) = pam_policy(18);
phi = M_.params(35);
M_.params(36) = pam_policy(19);
stdA = M_.params(36);
M_.params(37) = pam_policy(20);
stdP = M_.params(37);
M_.params(38) = pam_policy(21);
stdO = M_.params(38);
M_.params(39) = pam_policy(22);
stdB = M_.params(39);
M_.params(12) = pam_policy(23);
pphi = M_.params(12);
load data_steady_state_as_policy
M_.params(16) = log(steady_state_as_policy(1));
qk_ss = M_.params(16);
Phi_k_ss = log(steady_state_as_policy(2));
M_.params(15) = steady_state_as_policy(3);
eps1_ss = M_.params(15);
eps2_ss = steady_state_as_policy(4);
M_.params(13) = steady_state_as_policy(5);
theta_ss = M_.params(13);
M_.params(17) = log(steady_state_as_policy(6));
qb_ss = M_.params(17);
M_.params(19) = steady_state_as_policy(7);
Rb_ss = M_.params(19);
M_.params(20) = steady_state_as_policy(8);
rk_ss = M_.params(20);
M_.params(21) = log(steady_state_as_policy(9));
K_ss = M_.params(21);
M_.params(22) = log(steady_state_as_policy(10));
N_ss = M_.params(22);
M_.params(23) = log(steady_state_as_policy(11));
Y_ss = M_.params(23);
M_.params(24) = steady_state_as_policy(12);
w_ss = M_.params(24);
M_.params(25) = log(steady_state_as_policy(13));
I_ss = M_.params(25);
M_.params(26) = log(steady_state_as_policy(14));
C_ss = M_.params(26);
M_.params(29) = steady_state_as_policy(15);
omega_ss = M_.params(29);
BY_ss = steady_state_as_policy(16);
M_.params(27) = steady_state_as_policy(17);
Rk_ss = M_.params(27);
M_.params(11) = (M_.params(6)+(1-M_.params(8))*(eps2_ss/M_.params(10))^((-1)/M_.params(9)))*exp(M_.params(21));
S_ss = M_.params(11);
M_.params(18) = M_.params(16)+log(M_.params(11));
L_ss = M_.params(18);
M_.params(28) = 1/exp(M_.params(26));
Lambda_ss = M_.params(28);
spread_ss = Rk_ss-Rb_ss;
V_ss = (C_ss-chi*((exp(N_ss))^(1+ksi))/(1+ksi))/(1-beta);
haircut_ss = 1-theta_ss;
%
% INITVAL instructions
%
options_.initval_file = false;
oo_.steady_state(1) = M_.params(16);
oo_.steady_state(2) = Phi_k_ss;
oo_.steady_state(3) = M_.params(15);
oo_.steady_state(4) = eps2_ss;
oo_.steady_state(5) = M_.params(13);
oo_.steady_state(6) = M_.params(17);
oo_.steady_state(7) = M_.params(23);
oo_.steady_state(8) = M_.params(21);
oo_.steady_state(9) = M_.params(22);
oo_.steady_state(10) = M_.params(20);
oo_.steady_state(11) = M_.params(24);
oo_.steady_state(12) = M_.params(19);
oo_.steady_state(13) = M_.params(25);
oo_.steady_state(14) = M_.params(26);
oo_.steady_state(15) = BY_ss;
oo_.steady_state(16) = M_.params(28);
oo_.steady_state(17) = M_.params(27);
oo_.steady_state(18) = spread_ss;
oo_.steady_state(19) = M_.params(14);
oo_.steady_state(20) = M_.params(29);
oo_.steady_state(21) = M_.params(3);
oo_.steady_state(30) = V_ss;
oo_.steady_state(22) = M_.params(18);
oo_.steady_state(23) = M_.params(11);
oo_.steady_state(24) = M_.params(6);
oo_.steady_state(25) = M_.params(30);
oo_.steady_state(27) = haircut_ss;
oo_.steady_state(28) = M_.params(13);
oo_.steady_state(29) = 0;
oo_.steady_state(26) = 0;
oo_.exo_steady_state(1) = 0;
oo_.exo_steady_state(2) = 0;
oo_.exo_steady_state(3) = 0;
oo_.exo_steady_state(4) = 0;
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
%
% SHOCKS instructions
%
M_.exo_det_length = 0;
M_.Sigma_e(1, 1) = (M_.params(36))^2;
M_.Sigma_e(2, 2) = (M_.params(37))^2;
M_.Sigma_e(3, 3) = (M_.params(38))^2;
M_.Sigma_e(4, 4) = (M_.params(39))^2;
options_.solve_algo = 2;
options_.steady.maxit = 100;
steady;
oo_.dr.eigval = check(M_,options_,oo_);
options_.nograph = true;
options_.noprint = true;
options_.order = 2;
options_.periods = 0;
var_list_ = {};
[info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, var_list_);
delete *variables.m
delete *static.m
delete *asv


oo_.time = toc(tic0);
disp(['Total computing time : ' dynsec2hms(oo_.time) ]);
if ~exist([M_.dname filesep 'Output'],'dir')
    mkdir(M_.dname,'Output');
end
save([M_.dname filesep 'Output' filesep 'IRF_as_policy_results.mat'], 'oo_', 'M_', 'options_');
if exist('estim_params_', 'var') == 1
  save([M_.dname filesep 'Output' filesep 'IRF_as_policy_results.mat'], 'estim_params_', '-append');
end
if exist('bayestopt_', 'var') == 1
  save([M_.dname filesep 'Output' filesep 'IRF_as_policy_results.mat'], 'bayestopt_', '-append');
end
if exist('dataset_', 'var') == 1
  save([M_.dname filesep 'Output' filesep 'IRF_as_policy_results.mat'], 'dataset_', '-append');
end
if exist('estimation_info', 'var') == 1
  save([M_.dname filesep 'Output' filesep 'IRF_as_policy_results.mat'], 'estimation_info', '-append');
end
if exist('dataset_info', 'var') == 1
  save([M_.dname filesep 'Output' filesep 'IRF_as_policy_results.mat'], 'dataset_info', '-append');
end
if exist('oo_recursive_', 'var') == 1
  save([M_.dname filesep 'Output' filesep 'IRF_as_policy_results.mat'], 'oo_recursive_', '-append');
end
disp('Note: 1 warning(s) encountered in the preprocessor')
if ~isempty(lastwarn)
  disp('Note: warning(s) encountered in MATLAB/Octave code')
end
