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

if isoctave || matlab_ver_less_than('8.6')
    clear all
else
    clearvars -global
    clear_persistent_variables(fileparts(which('dynare')), false)
end
tic0 = tic;
% Define global variables.
global M_ options_ oo_ estim_params_ bayestopt_ dataset_ dataset_info estimation_info ys0_ ex0_
options_ = [];
M_.fname = 'GK_financial';
M_.dynare_version = '4.6.1';
oo_.dynare_version = '4.6.1';
options_.dynare_version = '4.6.1';
%
% Some global variables initialization
%
global_initialization;
diary off;
diary('GK_financial.log');
M_.exo_names = cell(7,1);
M_.exo_names_tex = cell(7,1);
M_.exo_names_long = cell(7,1);
M_.exo_names(1) = {'epsA'};
M_.exo_names_tex(1) = {'epsA'};
M_.exo_names_long(1) = {'epsA'};
M_.exo_names(2) = {'epsG'};
M_.exo_names_tex(2) = {'epsG'};
M_.exo_names_long(2) = {'epsG'};
M_.exo_names(3) = {'epsMCS'};
M_.exo_names_tex(3) = {'epsMCS'};
M_.exo_names_long(3) = {'epsMCS'};
M_.exo_names(4) = {'epsMPS'};
M_.exo_names_tex(4) = {'epsMPS'};
M_.exo_names_long(4) = {'epsMPS'};
M_.exo_names(5) = {'epsIS'};
M_.exo_names_tex(5) = {'epsIS'};
M_.exo_names_long(5) = {'epsIS'};
M_.exo_names(6) = {'epsMRSS'};
M_.exo_names_tex(6) = {'epsMRSS'};
M_.exo_names_long(6) = {'epsMRSS'};
M_.exo_names(7) = {'epsRPS'};
M_.exo_names_tex(7) = {'epsRPS'};
M_.exo_names_long(7) = {'epsRPS'};
M_.endo_names = cell(71,1);
M_.endo_names_tex = cell(71,1);
M_.endo_names_long = cell(71,1);
M_.endo_names(1) = {'V'};
M_.endo_names_tex(1) = {'V'};
M_.endo_names_long(1) = {'V'};
M_.endo_names(2) = {'Vmodified'};
M_.endo_names_tex(2) = {'Vmodified'};
M_.endo_names_long(2) = {'Vmodified'};
M_.endo_names(3) = {'U'};
M_.endo_names_tex(3) = {'U'};
M_.endo_names_long(3) = {'U'};
M_.endo_names(4) = {'C'};
M_.endo_names_tex(4) = {'C'};
M_.endo_names_long(4) = {'C'};
M_.endo_names(5) = {'H'};
M_.endo_names_tex(5) = {'H'};
M_.endo_names_long(5) = {'H'};
M_.endo_names(6) = {'K'};
M_.endo_names_tex(6) = {'K'};
M_.endo_names_long(6) = {'K'};
M_.endo_names(7) = {'S'};
M_.endo_names_tex(7) = {'S'};
M_.endo_names_long(7) = {'S'};
M_.endo_names(8) = {'X'};
M_.endo_names_tex(8) = {'X'};
M_.endo_names_long(8) = {'X'};
M_.endo_names(9) = {'I'};
M_.endo_names_tex(9) = {'I'};
M_.endo_names_long(9) = {'I'};
M_.endo_names(10) = {'IS'};
M_.endo_names_tex(10) = {'IS'};
M_.endo_names_long(10) = {'IS'};
M_.endo_names(11) = {'Sdash'};
M_.endo_names_tex(11) = {'Sdash'};
M_.endo_names_long(11) = {'Sdash'};
M_.endo_names(12) = {'lambda'};
M_.endo_names_tex(12) = {'lambda'};
M_.endo_names_long(12) = {'lambda'};
M_.endo_names(13) = {'Wh'};
M_.endo_names_tex(13) = {'Wh'};
M_.endo_names_long(13) = {'Wh'};
M_.endo_names(14) = {'rK'};
M_.endo_names_tex(14) = {'rK'};
M_.endo_names_long(14) = {'rK'};
M_.endo_names(15) = {'RPS'};
M_.endo_names_tex(15) = {'RPS'};
M_.endo_names_long(15) = {'RPS'};
M_.endo_names(16) = {'R'};
M_.endo_names_tex(16) = {'R'};
M_.endo_names_long(16) = {'R'};
M_.endo_names(17) = {'Q'};
M_.endo_names_tex(17) = {'Q'};
M_.endo_names_long(17) = {'Q'};
M_.endo_names(18) = {'Rn'};
M_.endo_names_tex(18) = {'Rn'};
M_.endo_names_long(18) = {'Rn'};
M_.endo_names(19) = {'PIE'};
M_.endo_names_tex(19) = {'PIE'};
M_.endo_names_long(19) = {'PIE'};
M_.endo_names(20) = {'PIEw'};
M_.endo_names_tex(20) = {'PIEw'};
M_.endo_names_long(20) = {'PIEw'};
M_.endo_names(21) = {'W'};
M_.endo_names_tex(21) = {'W'};
M_.endo_names_long(21) = {'W'};
M_.endo_names(22) = {'Jw'};
M_.endo_names_tex(22) = {'Jw'};
M_.endo_names_long(22) = {'Jw'};
M_.endo_names(23) = {'Hd'};
M_.endo_names_tex(23) = {'Hd'};
M_.endo_names_long(23) = {'Hd'};
M_.endo_names(24) = {'MRSS'};
M_.endo_names_tex(24) = {'MRSS'};
M_.endo_names_long(24) = {'MRSS'};
M_.endo_names(25) = {'JJw'};
M_.endo_names_tex(25) = {'JJw'};
M_.endo_names_long(25) = {'JJw'};
M_.endo_names(26) = {'WO'};
M_.endo_names_tex(26) = {'WO'};
M_.endo_names_long(26) = {'WO'};
M_.endo_names(27) = {'Deltaw'};
M_.endo_names_tex(27) = {'Deltaw'};
M_.endo_names_long(27) = {'Deltaw'};
M_.endo_names(28) = {'YW'};
M_.endo_names_tex(28) = {'YW'};
M_.endo_names_long(28) = {'YW'};
M_.endo_names(29) = {'A'};
M_.endo_names_tex(29) = {'A'};
M_.endo_names_long(29) = {'A'};
M_.endo_names(30) = {'PWP'};
M_.endo_names_tex(30) = {'PWP'};
M_.endo_names_long(30) = {'PWP'};
M_.endo_names(31) = {'MC'};
M_.endo_names_tex(31) = {'MC'};
M_.endo_names_long(31) = {'MC'};
M_.endo_names(32) = {'Jp'};
M_.endo_names_tex(32) = {'Jp'};
M_.endo_names_long(32) = {'Jp'};
M_.endo_names(33) = {'Y'};
M_.endo_names_tex(33) = {'Y'};
M_.endo_names_long(33) = {'Y'};
M_.endo_names(34) = {'MCS'};
M_.endo_names_tex(34) = {'MCS'};
M_.endo_names_long(34) = {'MCS'};
M_.endo_names(35) = {'JJp'};
M_.endo_names_tex(35) = {'JJp'};
M_.endo_names_long(35) = {'JJp'};
M_.endo_names(36) = {'PO'};
M_.endo_names_tex(36) = {'PO'};
M_.endo_names_long(36) = {'PO'};
M_.endo_names(37) = {'Deltap'};
M_.endo_names_tex(37) = {'Deltap'};
M_.endo_names_long(37) = {'Deltap'};
M_.endo_names(38) = {'MPS'};
M_.endo_names_tex(38) = {'MPS'};
M_.endo_names_long(38) = {'MPS'};
M_.endo_names(39) = {'G'};
M_.endo_names_tex(39) = {'G'};
M_.endo_names_long(39) = {'G'};
M_.endo_names(40) = {'RK'};
M_.endo_names_tex(40) = {'RK'};
M_.endo_names_long(40) = {'RK'};
M_.endo_names(41) = {'spread'};
M_.endo_names_tex(41) = {'spread'};
M_.endo_names_long(41) = {'spread'};
M_.endo_names(42) = {'CEquiv'};
M_.endo_names_tex(42) = {'CEquiv'};
M_.endo_names_long(42) = {'CEquiv'};
M_.endo_names(43) = {'q'};
M_.endo_names_tex(43) = {'q'};
M_.endo_names_long(43) = {'q'};
M_.endo_names(44) = {'Sasset'};
M_.endo_names_tex(44) = {'Sasset'};
M_.endo_names_long(44) = {'Sasset'};
M_.endo_names(45) = {'E'};
M_.endo_names_tex(45) = {'E'};
M_.endo_names_long(45) = {'E'};
M_.endo_names(46) = {'D'};
M_.endo_names_tex(46) = {'D'};
M_.endo_names_long(46) = {'D'};
M_.endo_names(47) = {'Re'};
M_.endo_names_tex(47) = {'Re'};
M_.endo_names_long(47) = {'Re'};
M_.endo_names(48) = {'xequity'};
M_.endo_names_tex(48) = {'xequity'};
M_.endo_names_long(48) = {'xequity'};
M_.endo_names(49) = {'lambdaFF'};
M_.endo_names_tex(49) = {'lambdaFF'};
M_.endo_names_long(49) = {'lambdaFF'};
M_.endo_names(50) = {'Thetax'};
M_.endo_names_tex(50) = {'Thetax'};
M_.endo_names_long(50) = {'Thetax'};
M_.endo_names(51) = {'mus'};
M_.endo_names_tex(51) = {'mus'};
M_.endo_names_long(51) = {'mus'};
M_.endo_names(52) = {'mue'};
M_.endo_names_tex(52) = {'mue'};
M_.endo_names_long(52) = {'mue'};
M_.endo_names(53) = {'DThetax'};
M_.endo_names_tex(53) = {'DThetax'};
M_.endo_names_long(53) = {'DThetax'};
M_.endo_names(54) = {'phiB'};
M_.endo_names_tex(54) = {'phiB'};
M_.endo_names_long(54) = {'phiB'};
M_.endo_names(55) = {'nud'};
M_.endo_names_tex(55) = {'nud'};
M_.endo_names_long(55) = {'nud'};
M_.endo_names(56) = {'omega'};
M_.endo_names_tex(56) = {'omega'};
M_.endo_names_long(56) = {'omega'};
M_.endo_names(57) = {'N'};
M_.endo_names_tex(57) = {'N'};
M_.endo_names_long(57) = {'N'};
M_.endo_names(58) = {'No'};
M_.endo_names_tex(58) = {'No'};
M_.endo_names_long(58) = {'No'};
M_.endo_names(59) = {'Nn'};
M_.endo_names_tex(59) = {'Nn'};
M_.endo_names_long(59) = {'Nn'};
M_.endo_names(60) = {'xiB'};
M_.endo_names_tex(60) = {'xiB'};
M_.endo_names_long(60) = {'xiB'};
M_.endo_names(61) = {'thetaFF'};
M_.endo_names_tex(61) = {'thetaFF'};
M_.endo_names_long(61) = {'thetaFF'};
M_.endo_names(62) = {'kappaFF'};
M_.endo_names_tex(62) = {'kappaFF'};
M_.endo_names_long(62) = {'kappaFF'};
M_.endo_names(63) = {'dyobs'};
M_.endo_names_tex(63) = {'dyobs'};
M_.endo_names_long(63) = {'dyobs'};
M_.endo_names(64) = {'dcobs'};
M_.endo_names_tex(64) = {'dcobs'};
M_.endo_names_long(64) = {'dcobs'};
M_.endo_names(65) = {'pinfobs'};
M_.endo_names_tex(65) = {'pinfobs'};
M_.endo_names_long(65) = {'pinfobs'};
M_.endo_names(66) = {'robs'};
M_.endo_names_tex(66) = {'robs'};
M_.endo_names_long(66) = {'robs'};
M_.endo_names(67) = {'labobs'};
M_.endo_names_tex(67) = {'labobs'};
M_.endo_names_long(67) = {'labobs'};
M_.endo_names(68) = {'spreadobs'};
M_.endo_names_tex(68) = {'spreadobs'};
M_.endo_names_long(68) = {'spreadobs'};
M_.endo_names(69) = {'dinvobs'};
M_.endo_names_tex(69) = {'dinvobs'};
M_.endo_names_long(69) = {'dinvobs'};
M_.endo_names(70) = {'dwobs'};
M_.endo_names_tex(70) = {'dwobs'};
M_.endo_names_long(70) = {'dwobs'};
M_.endo_names(71) = {'UH'};
M_.endo_names_tex(71) = {'UH'};
M_.endo_names_long(71) = {'UH'};
M_.endo_partitions = struct();
M_.param_names = cell(35,1);
M_.param_names_tex = cell(35,1);
M_.param_names_long = cell(35,1);
M_.param_names(1) = {'gy'};
M_.param_names_tex(1) = {'gy'};
M_.param_names_long(1) = {'gy'};
M_.param_names(2) = {'alp'};
M_.param_names_tex(2) = {'alp'};
M_.param_names_long(2) = {'alp'};
M_.param_names(3) = {'delta'};
M_.param_names_tex(3) = {'delta'};
M_.param_names_long(3) = {'delta'};
M_.param_names(4) = {'zzetap'};
M_.param_names_tex(4) = {'zzetap'};
M_.param_names_long(4) = {'zzetap'};
M_.param_names(5) = {'zzetaw'};
M_.param_names_tex(5) = {'zzetaw'};
M_.param_names_long(5) = {'zzetaw'};
M_.param_names(6) = {'sigma_c'};
M_.param_names_tex(6) = {'sigma\_c'};
M_.param_names_long(6) = {'sigma_c'};
M_.param_names(7) = {'chi'};
M_.param_names_tex(7) = {'chi'};
M_.param_names_long(7) = {'chi'};
M_.param_names(8) = {'gam'};
M_.param_names_tex(8) = {'gam'};
M_.param_names_long(8) = {'gam'};
M_.param_names(9) = {'phiX'};
M_.param_names_tex(9) = {'phiX'};
M_.param_names_long(9) = {'phiX'};
M_.param_names(10) = {'xip'};
M_.param_names_tex(10) = {'xip'};
M_.param_names_long(10) = {'xip'};
M_.param_names(11) = {'xiw'};
M_.param_names_tex(11) = {'xiw'};
M_.param_names_long(11) = {'xiw'};
M_.param_names(12) = {'gammap'};
M_.param_names_tex(12) = {'gammap'};
M_.param_names_long(12) = {'gammap'};
M_.param_names(13) = {'gammaw'};
M_.param_names_tex(13) = {'gammaw'};
M_.param_names_long(13) = {'gammaw'};
M_.param_names(14) = {'PIE_bar'};
M_.param_names_tex(14) = {'PIE\_bar'};
M_.param_names_long(14) = {'PIE_bar'};
M_.param_names(15) = {'g_bar'};
M_.param_names_tex(15) = {'g\_bar'};
M_.param_names_long(15) = {'g_bar'};
M_.param_names(16) = {'Rn_bar'};
M_.param_names_tex(16) = {'Rn\_bar'};
M_.param_names_long(16) = {'Rn_bar'};
M_.param_names(17) = {'rho_r'};
M_.param_names_tex(17) = {'rho\_r'};
M_.param_names_long(17) = {'rho_r'};
M_.param_names(18) = {'theta_pie'};
M_.param_names_tex(18) = {'theta\_pie'};
M_.param_names_long(18) = {'theta_pie'};
M_.param_names(19) = {'theta_y'};
M_.param_names_tex(19) = {'theta\_y'};
M_.param_names_long(19) = {'theta_y'};
M_.param_names(20) = {'theta_dy'};
M_.param_names_tex(20) = {'theta\_dy'};
M_.param_names_long(20) = {'theta_dy'};
M_.param_names(21) = {'rhoA'};
M_.param_names_tex(21) = {'rhoA'};
M_.param_names_long(21) = {'rhoA'};
M_.param_names(22) = {'rhoG'};
M_.param_names_tex(22) = {'rhoG'};
M_.param_names_long(22) = {'rhoG'};
M_.param_names(23) = {'rhoMCS'};
M_.param_names_tex(23) = {'rhoMCS'};
M_.param_names_long(23) = {'rhoMCS'};
M_.param_names(24) = {'rhoMRSS'};
M_.param_names_tex(24) = {'rhoMRSS'};
M_.param_names_long(24) = {'rhoMRSS'};
M_.param_names(25) = {'rhoMPS'};
M_.param_names_tex(25) = {'rhoMPS'};
M_.param_names_long(25) = {'rhoMPS'};
M_.param_names(26) = {'rhoRPS'};
M_.param_names_tex(26) = {'rhoRPS'};
M_.param_names_long(26) = {'rhoRPS'};
M_.param_names(27) = {'rhoIS'};
M_.param_names_tex(27) = {'rhoIS'};
M_.param_names_long(27) = {'rhoIS'};
M_.param_names(28) = {'sigmaB'};
M_.param_names_tex(28) = {'sigmaB'};
M_.param_names_long(28) = {'sigmaB'};
M_.param_names(29) = {'spreadtarg'};
M_.param_names_tex(29) = {'spreadtarg'};
M_.param_names_long(29) = {'spreadtarg'};
M_.param_names(30) = {'levtarg'};
M_.param_names_tex(30) = {'levtarg'};
M_.param_names_long(30) = {'levtarg'};
M_.param_names(31) = {'epsilon'};
M_.param_names_tex(31) = {'epsilon'};
M_.param_names_long(31) = {'epsilon'};
M_.param_names(32) = {'xequitytarg'};
M_.param_names_tex(32) = {'xequitytarg'};
M_.param_names_long(32) = {'xequitytarg'};
M_.param_names(33) = {'sigma_s'};
M_.param_names_tex(33) = {'sigma\_s'};
M_.param_names_long(33) = {'sigma_s'};
M_.param_names(34) = {'wr'};
M_.param_names_tex(34) = {'wr'};
M_.param_names_long(34) = {'wr'};
M_.param_names(35) = {'psi'};
M_.param_names_tex(35) = {'psi'};
M_.param_names_long(35) = {'psi'};
M_.param_partitions = struct();
M_.exo_det_nbr = 0;
M_.exo_nbr = 7;
M_.endo_nbr = 71;
M_.param_nbr = 35;
M_.orig_endo_nbr = 71;
M_.aux_vars = [];
options_.varobs = cell(7, 1);
options_.varobs(1)  = {'dyobs'};
options_.varobs(2)  = {'dcobs'};
options_.varobs(3)  = {'dinvobs'};
options_.varobs(4)  = {'dwobs'};
options_.varobs(5)  = {'robs'};
options_.varobs(6)  = {'pinfobs'};
options_.varobs(7)  = {'labobs'};
options_.varobs_id = [ 63 64 69 70 66 65 67  ];
M_.Sigma_e = zeros(7, 7);
M_.Correlation_matrix = eye(7, 7);
M_.H = 0;
M_.Correlation_matrix_ME = 1;
M_.sigma_e_is_diagonal = true;
M_.det_shocks = [];
options_.linear = false;
options_.block = false;
options_.bytecode = false;
options_.use_dll = false;
options_.linear_decomposition = false;
M_.nonzero_hessian_eqs = [3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 26 27 28 29 30 32 33 34 36 37 38 39 40 41 42 43 44 45 47 48 49 50 52 53 54 55 56 57 58 59 60 61 62 63 64 67];
M_.hessian_eq_zero = isempty(M_.nonzero_hessian_eqs);
M_.orig_eq_nbr = 71;
M_.eq_nbr = 71;
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 22 93;
 0 23 94;
 0 24 95;
 1 25 96;
 0 26 0;
 2 27 0;
 0 28 0;
 0 29 97;
 3 30 0;
 4 31 98;
 0 32 99;
 0 33 100;
 0 34 0;
 0 35 0;
 5 36 0;
 0 37 101;
 6 38 102;
 7 39 0;
 8 40 103;
 0 41 104;
 9 42 0;
 0 43 105;
 0 44 0;
 10 45 0;
 0 46 106;
 0 47 0;
 11 48 0;
 0 49 0;
 12 50 0;
 0 51 0;
 0 52 0;
 0 53 107;
 13 54 0;
 14 55 0;
 0 56 108;
 0 57 0;
 15 58 0;
 16 59 0;
 17 60 0;
 0 61 109;
 0 62 0;
 0 63 110;
 18 64 0;
 19 65 0;
 20 66 0;
 21 67 0;
 0 68 111;
 0 69 0;
 0 70 0;
 0 71 0;
 0 72 0;
 0 73 0;
 0 74 0;
 0 75 0;
 0 76 0;
 0 77 112;
 0 78 0;
 0 79 0;
 0 80 0;
 0 81 0;
 0 82 0;
 0 83 0;
 0 84 0;
 0 85 0;
 0 86 0;
 0 87 0;
 0 88 0;
 0 89 0;
 0 90 0;
 0 91 0;
 0 92 0;]';
M_.nstatic = 34;
M_.nfwrd   = 16;
M_.npred   = 17;
M_.nboth   = 4;
M_.nsfwrd   = 20;
M_.nspred   = 21;
M_.ndynamic   = 37;
M_.dynamic_tmp_nbr = [52; 55; 9; 0; ];
M_.equations_tags = {
  1 , 'name' , '(226) Consumption equivalent variation' ;
  2 , 'name' , '(185) Intertemporal welfare' ;
  3 , 'name' , '(185b) Modified intertemporal welfare' ;
  4 , 'name' , '(186) Flow utility' ;
  5 , 'name' , '(187) Law of motion for capital' ;
  6 , 'name' , '(188) Investment' ;
  7 , 'name' , '(189) Capital adjustment cost' ;
  8 , 'name' , '(190) Capital adjustment cost' ;
  9 , 'name' , '(191) MUC' ;
  10 , 'name' , '(192) Household foc for hours' ;
  11 , 'name' , '(193) Euler equation' ;
  12 , 'name' , '(195) Household foc for investment' ;
  13 , 'name' , '(197) Fischer equation' ;
  14 , 'name' , 'UH' ;
  15 , 'name' , '(198) Wage inflation' ;
  16 , 'name' , '(199) Wage setting condition I' ;
  17 , 'name' , '(200) Wage setting condition II' ;
  18 , 'name' , '(201) Wage setting condition III' ;
  19 , 'name' , '(202) Law of motion for wage level' ;
  20 , 'name' , '(203) Law of motion for wage dispersion' ;
  21 , 'name' , '(204) Production function' ;
  22 , 'name' , '(205) Firm for for labour' ;
  23 , 'name' , '(206) Firm foc: return on capital' ;
  24 , 'name' , '(207) Marginal cost' ;
  25 , 'name' , '(208) Price setting condition' ;
  26 , 'name' , '(209) Price setting condition' ;
  27 , 'name' , '(210) Price setting condition' ;
  28 , 'name' , '(211) Law of motion for price level' ;
  29 , 'name' , '(212) Law of motion for price dispersion' ;
  30 , 'name' , '(213) Taylor rule' ;
  31 , 'name' , '(214) Resource constraint' ;
  32 , 'name' , '(215) Market clearing for labour)' ;
  33 , 'name' , '(216) Market clearing for goods' ;
  34 , 'name' , '(217) Gross real return on capital' ;
  35 , 'name' , '(218)' ;
  36 , 'name' , '(314)' ;
  37 , 'name' , '(315)' ;
  38 , 'name' , '(316)' ;
  39 , 'name' , '(317)' ;
  40 , 'name' , '(318)' ;
  41 , 'name' , '(319)' ;
  42 , 'name' , '(320)' ;
  43 , 'name' , '(321)' ;
  44 , 'name' , '(322)' ;
  45 , 'name' , '(323)' ;
  46 , 'name' , '(324)' ;
  47 , 'name' , '(325)' ;
  48 , 'name' , '(326)' ;
  49 , 'name' , '(327)' ;
  50 , 'name' , '(328)' ;
  51 , 'name' , '(329)' ;
  52 , 'name' , '(330)' ;
  53 , 'name' , '(331)' ;
  54 , 'name' , '(219) Law of motion for productivity' ;
  55 , 'name' , '(220) Law of motion for government expenditure' ;
  56 , 'name' , '(221) Law of motion for price markup shock' ;
  57 , 'name' , '(232) Law of motion for wage markup shock' ;
  58 , 'name' , '(233) Law of motion for capital quality shock' ;
  59 , 'name' , '(234) Law of motion for monetary policy shock' ;
  60 , 'name' , '(235) Law of motion for risk premium shock' ;
  61 , 'name' , '(264) Measurement equation for output growth' ;
  62 , 'name' , '(265) Measurement equation for consumption growth' ;
  63 , 'name' , '(266) Measurement equation for investment growth' ;
  64 , 'name' , '(267) Measurement equation for real wage growth' ;
  65 , 'name' , '(268) Measurement equation for hours' ;
  66 , 'name' , '(269) Measurement equation for policy rate' ;
  67 , 'name' , '(270) Measurement equation for inflation' ;
  68 , 'name' , '(271) Measurement equation for spread' ;
  69 , 'name' , 'thetaFF' ;
  70 , 'name' , 'xiB' ;
  71 , 'name' , 'kappaFF' ;
};
M_.mapping.V.eqidx = [2 ];
M_.mapping.Vmodified.eqidx = [3 ];
M_.mapping.U.eqidx = [1 2 3 4 9 14 ];
M_.mapping.C.eqidx = [4 9 31 62 ];
M_.mapping.H.eqidx = [4 14 32 ];
M_.mapping.K.eqidx = [5 21 23 51 ];
M_.mapping.S.eqidx = [5 7 12 ];
M_.mapping.X.eqidx = [6 7 8 12 ];
M_.mapping.I.eqidx = [5 6 31 63 ];
M_.mapping.IS.eqidx = [5 12 58 ];
M_.mapping.Sdash.eqidx = [8 12 ];
M_.mapping.lambda.eqidx = [9 10 11 12 16 17 25 26 41 42 43 50 ];
M_.mapping.Wh.eqidx = [10 16 ];
M_.mapping.rK.eqidx = [23 34 36 47 48 ];
M_.mapping.RPS.eqidx = [11 60 ];
M_.mapping.R.eqidx = [11 13 35 41 42 43 47 ];
M_.mapping.Q.eqidx = [12 34 37 45 47 48 49 ];
M_.mapping.Rn.eqidx = [3 13 30 66 ];
M_.mapping.PIE.eqidx = [13 15 16 17 19 20 25 26 28 29 30 67 ];
M_.mapping.PIEw.eqidx = [15 16 17 19 20 ];
M_.mapping.W.eqidx = [15 18 22 64 ];
M_.mapping.Jw.eqidx = [16 18 ];
M_.mapping.Hd.eqidx = [16 17 21 22 32 65 ];
M_.mapping.MRSS.eqidx = [16 57 ];
M_.mapping.JJw.eqidx = [17 18 ];
M_.mapping.WO.eqidx = [18 19 20 ];
M_.mapping.Deltaw.eqidx = [20 32 ];
M_.mapping.YW.eqidx = [21 22 23 33 ];
M_.mapping.A.eqidx = [21 54 ];
M_.mapping.PWP.eqidx = [22 23 24 ];
M_.mapping.MC.eqidx = [24 25 ];
M_.mapping.Jp.eqidx = [25 27 ];
M_.mapping.Y.eqidx = [25 26 30 31 33 61 ];
M_.mapping.MCS.eqidx = [25 56 ];
M_.mapping.JJp.eqidx = [26 27 ];
M_.mapping.PO.eqidx = [27 28 29 ];
M_.mapping.Deltap.eqidx = [29 33 ];
M_.mapping.MPS.eqidx = [30 59 ];
M_.mapping.G.eqidx = [31 55 ];
M_.mapping.RK.eqidx = [34 35 42 ];
M_.mapping.spread.eqidx = [35 68 ];
M_.mapping.CEquiv.eqidx = [1 ];
M_.mapping.q.eqidx = [36 37 45 47 ];
M_.mapping.Sasset.eqidx = [37 45 47 48 49 51 ];
M_.mapping.E.eqidx = [37 45 47 ];
M_.mapping.D.eqidx = [45 47 ];
M_.mapping.Re.eqidx = [36 43 50 ];
M_.mapping.xequity.eqidx = [37 38 40 52 53 ];
M_.mapping.lambdaFF.eqidx = [38 39 ];
M_.mapping.Thetax.eqidx = [38 40 44 52 ];
M_.mapping.mus.eqidx = [38 40 42 ];
M_.mapping.mue.eqidx = [38 39 40 43 ];
M_.mapping.DThetax.eqidx = [39 53 ];
M_.mapping.phiB.eqidx = [40 44 49 ];
M_.mapping.nud.eqidx = [40 41 ];
M_.mapping.omega.eqidx = [41 42 43 44 ];
M_.mapping.N.eqidx = [45 46 49 ];
M_.mapping.No.eqidx = [46 47 ];
M_.mapping.Nn.eqidx = [46 48 ];
M_.mapping.xiB.eqidx = [48 70 ];
M_.mapping.thetaFF.eqidx = [52 53 69 ];
M_.mapping.kappaFF.eqidx = [52 53 71 ];
M_.mapping.dyobs.eqidx = [61 ];
M_.mapping.dcobs.eqidx = [62 ];
M_.mapping.pinfobs.eqidx = [67 ];
M_.mapping.robs.eqidx = [66 ];
M_.mapping.labobs.eqidx = [65 ];
M_.mapping.spreadobs.eqidx = [68 ];
M_.mapping.dinvobs.eqidx = [63 ];
M_.mapping.dwobs.eqidx = [64 ];
M_.mapping.UH.eqidx = [10 14 ];
M_.mapping.epsA.eqidx = [54 ];
M_.mapping.epsG.eqidx = [55 ];
M_.mapping.epsMCS.eqidx = [56 ];
M_.mapping.epsMPS.eqidx = [59 ];
M_.mapping.epsIS.eqidx = [58 ];
M_.mapping.epsMRSS.eqidx = [57 ];
M_.mapping.epsRPS.eqidx = [60 ];
M_.static_and_dynamic_models_differ = false;
M_.has_external_function = false;
M_.state_var = [4 6 9 10 15 17 18 19 21 24 27 29 33 34 37 38 39 43 44 45 46 ];
M_.exo_names_orig_ord = [1:7];
M_.maximum_lag = 1;
M_.maximum_lead = 1;
M_.maximum_endo_lag = 1;
M_.maximum_endo_lead = 1;
oo_.steady_state = zeros(71, 1);
M_.maximum_exo_lag = 0;
M_.maximum_exo_lead = 0;
oo_.exo_steady_state = zeros(7, 1);
M_.params = NaN(35, 1);
M_.endo_trends = struct('deflator', cell(71, 1), 'log_deflator', cell(71, 1), 'growth_factor', cell(71, 1), 'log_growth_factor', cell(71, 1));
M_.NNZDerivatives = [279; 498; -1; ];
M_.static_tmp_nbr = [30; 13; 0; 0; ];
M_.params(1) = 0.18;
gy = M_.params(1);
M_.params(2) = 0.67;
alp = M_.params(2);
M_.params(3) = 0.0250;
delta = M_.params(3);
M_.params(4) = 7.0;
zzetap = M_.params(4);
M_.params(5) = 3.0;
zzetaw = M_.params(5);
H_bar        = 0.33;
A_bar        = 1;
Frischtarget = 2.5;
M_.params(14) = 0.8662984461054001;
PIE_bar = M_.params(14);
M_.params(15) = 0.3550693291143;
g_bar = M_.params(15);
M_.params(16) = 1.3318469551282;
Rn_bar = M_.params(16);
M_.params(35) = 2;
psi = M_.params(35);
M_.params(6) = 1.5;
sigma_c = M_.params(6);
M_.params(7) = 0.7;
chi = M_.params(7);
M_.params(8) = 0.5;
gam = M_.params(8);
M_.params(9) = 2.0;
phiX = M_.params(9);
M_.params(10) = 0.7;
xip = M_.params(10);
M_.params(11) = 0.7;
xiw = M_.params(11);
M_.params(12) = 0.5;
gammap = M_.params(12);
M_.params(13) = 0.5;
gammaw = M_.params(13);
M_.params(17) = 0.7;
rho_r = M_.params(17);
M_.params(18) = 1.5;
theta_pie = M_.params(18);
M_.params(19) = 0.3;
theta_y = M_.params(19);
M_.params(20) = 0.3;
theta_dy = M_.params(20);
M_.params(21) = 0.7;
rhoA = M_.params(21);
M_.params(22) = 0.7;
rhoG = M_.params(22);
M_.params(23) = 0.7;
rhoMCS = M_.params(23);
M_.params(24) = 0.7;
rhoMRSS = M_.params(24);
M_.params(25) = 0.7;
rhoMPS = M_.params(25);
M_.params(26) = 0.7;
rhoRPS = M_.params(26);
M_.params(27) = 0.7;
rhoIS = M_.params(27);
M_.params(31) = (-2.0);
epsilon = M_.params(31);
M_.params(28) = 0.942;
sigmaB = M_.params(28);
M_.params(29) = 0.0069;
spreadtarg = M_.params(29);
M_.params(30) = 4;
levtarg = M_.params(30);
M_.params(32) = 0.1;
xequitytarg = M_.params(32);
M_.params(33) = 0.01;
sigma_s = M_.params(33);
M_.params(34) = 0.0;
wr = M_.params(34);
oo_.dr.eigval = check(M_,options_,oo_);
steady;
%
% SHOCKS instructions
%
M_.exo_det_length = 0;
M_.Sigma_e(1, 1) = (M_.params(33))^2;
M_.Sigma_e(2, 2) = (M_.params(33))^2;
M_.Sigma_e(3, 3) = (M_.params(33))^2;
M_.Sigma_e(4, 4) = (M_.params(33))^2;
M_.Sigma_e(5, 5) = (M_.params(33))^2;
M_.Sigma_e(6, 6) = (M_.params(33))^2;
M_.Sigma_e(7, 7) = (M_.params(33))^2;
estim_params_.var_exo = zeros(0, 10);
estim_params_.var_endo = zeros(0, 10);
estim_params_.corrx = zeros(0, 11);
estim_params_.corrn = zeros(0, 11);
estim_params_.param_vals = zeros(0, 10);
estim_params_.param_vals = [estim_params_.param_vals; 6, NaN, (-Inf), Inf, 3, 1.50, 0.375, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 35, NaN, (-Inf), Inf, 3, 2.00, 0.75, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 7, NaN, (-Inf), Inf, 1, 0.50, 0.10, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 9, NaN, (-Inf), Inf, 3, 2.00, 0.75, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 10, NaN, (-Inf), Inf, 1, 0.50, 0.10, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 11, NaN, (-Inf), Inf, 1, 0.50, 0.10, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 12, NaN, (-Inf), Inf, 1, 0.50, 0.10, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 13, NaN, (-Inf), Inf, 1, 0.50, 0.10, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 17, NaN, (-Inf), Inf, 1, 0.75, 0.10, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 18, NaN, (-Inf), Inf, 3, 1.50, 0.25, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 19, NaN, (-Inf), Inf, 3, 0.12, 0.05, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 20, NaN, (-Inf), Inf, 3, 0.12, 0.05, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 21, NaN, (-Inf), Inf, 1, 0.50, 0.20, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 22, NaN, (-Inf), Inf, 1, 0.50, 0.20, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 23, NaN, (-Inf), Inf, 1, 0.50, 0.20, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 24, NaN, (-Inf), Inf, 1, 0.50, 0.20, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 25, NaN, (-Inf), Inf, 1, 0.50, 0.20, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 26, NaN, (-Inf), Inf, 1, 0.50, 0.20, NaN, NaN, NaN ];
estim_params_.param_vals = [estim_params_.param_vals; 27, NaN, (-Inf), Inf, 1, 0.50, 0.20, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 1, NaN, (-Inf), Inf, 4, 0.001, 0.020, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 2, NaN, (-Inf), Inf, 4, 0.001, 0.020, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 3, NaN, (-Inf), Inf, 4, 0.001, 0.020, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 6, NaN, (-Inf), Inf, 4, 0.001, 0.020, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 4, NaN, (-Inf), Inf, 4, 0.001, 0.020, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 7, NaN, (-Inf), Inf, 4, 0.001, 0.020, NaN, NaN, NaN ];
estim_params_.var_exo = [estim_params_.var_exo; 5, NaN, (-Inf), Inf, 4, 0.001, 0.020, NaN, NaN, NaN ];
options_.lik_init = 1;
options_.mh_drop = 0.25;
options_.mh_jscale = 0.4;
options_.mh_nblck = 2;
options_.mh_replic = 5000;
options_.mode_check.status = true;
options_.mode_compute = 9;
options_.plot_priors = 0;
options_.prefilter = 0;
options_.presample = 0;
options_.datafile = 'usdata_47q1_17q4_unscaled';
options_.first_obs = 75;
options_.nobs = 208;
options_.order = 1;
var_list_ = {};
oo_recursive_=dynare_estimation(var_list_);
options_.ar = 10;
options_.irf = 20;
var_list_ = {};
[info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, var_list_);
save('GK_financial_results.mat', 'oo_', 'M_', 'options_');
if exist('estim_params_', 'var') == 1
  save('GK_financial_results.mat', 'estim_params_', '-append');
end
if exist('bayestopt_', 'var') == 1
  save('GK_financial_results.mat', 'bayestopt_', '-append');
end
if exist('dataset_', 'var') == 1
  save('GK_financial_results.mat', 'dataset_', '-append');
end
if exist('estimation_info', 'var') == 1
  save('GK_financial_results.mat', 'estimation_info', '-append');
end
if exist('dataset_info', 'var') == 1
  save('GK_financial_results.mat', 'dataset_info', '-append');
end
if exist('oo_recursive_', 'var') == 1
  save('GK_financial_results.mat', 'oo_recursive_', '-append');
end


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