% README.M contains hints on how to use the programs in this directory.
% Start MATLAB and type readme.
% Alternatively, inspect this file with any text editor.
disp('The files in this directory perform the calculations described');
disp('in the paper "Corporate debt structure and the financial crisis", JMCB 2015 and ECB WP No. 1759.'); 
disp(' ');
disp('The file needed to calibrate the steady state of the model are '); 
disp('estimation_quarterly_ea.m sets the free parameters s_aggr, sigma_eps1, sigma_eps2, sigma_eps3, xi, and tau');
disp('to minimize the squared log deviation of the model predictions in steady state from the data.');
disp('steadystate_search.m computes the steady state of the model using the parameter values selected from the estimation procedure.'); 
disp(' ');
disp('The files needed to compute the responses to transitory shocks under the various scenarios, '); 
disp('i.e. full flexibility, no bond issuance, no bond issuance and no bank flexibility, are:'); 
disp('dynamics_risk_ea_BOTH.m       :   does it all, after setting DUMMYB,DUMMYC,DUMMYD on lines 54-56, such that');
disp('                                  1) DUMMYB = DUMMYC = DUMMYD = 1, if full flexibility;');
disp('                                  2) DUMMYB = 0, if endogeneity of epsilon-b is to be turned off, = 1 otherw are:');
disp('                                  3) DUMMYC = 0, if endogeneity of epsilon-c is to be turned off, = 1 otherw');
disp('                                  4) DUMMYD = 0, if endogeneity of epsilon-d is to be turned off, = 1 otherw');
disp(' ');
disp('                                  dynamics_risk_ea_BOTH calls the following files (note the "if"s, though):');
disp('steadystate_search.m          :   computes the steady state under the chosen calibration');
disp('coefficients_risk_BOTH.m      :   computes the coefficients appearing in the matrices of the dynamic system,');
disp('do_it.m                       :   called at the end of dynamics_risk_ea_BOTH.m, in the last if-else.');
disp('                                  It invokes the toolkit programs developed in Uhlig (1998) to compute the IRFs.');
disp('                                  The toolkit programs are available here: no need to download them elsewhere.');
disp('                                  do_it.m has been modified, to call impresp_cs.m for plotting joint impulse responses.');
disp('impresp_cs.m                  :   manually sets the size of the shocks on lines 79, ');
disp('                                  taking into consideration the choice of DUMMYB,DUMMYC and DUMMYD. ');
disp(' ');
disp('All files with "% VERSION 4.0, November 2002, COPYRIGHT H. UHLIG" on the first line (or with previous dates) belong to the toolkit (Uhlig, 1998)');


