clear all

*** This is the main replication file for 
* Cecchetti, Feroli, Kashyap, Mann and Schoenholtz (September 2020)
* 
* You can run all files from here using stata and find the output in the results
* folder. Please look at the read_me file for a description. 
*
* Julien Weber (julien.weber@chicagobooth.edu) 2020-09-14
***



*** replication folder
* Please manually change this folder to where you have unzipped the replication files: 
cd "C:/Users/julienweber/Dropbox (Chicago Booth)/newmonetarypolicies/replication_main"
***

*** package dependencies
* Please make sure that you installed the below packages for all the code to 
* run properly. Installing is done by ssc install or net install: 
*
* ssc install winsor
* net install dm79.pkg //this includes svmat2 for matrix manipulation
* ssc install estout
***




*STEP 1
*FINANCIAL CONDITIONS INDICES
*Output for Figure 1, 2, 3, 4, 5 and Table A4, A5 saved in "results/step1"
*Saves a cleaned dta-file with all financial and activity variables and 
*conditions indices in "results/cleandata"
do "code/1_financial_conditions.do"


*STEP 2
*MAIN REGRESSION
*Estimates Table 1 saved in "results/step2"
do "code/2_estimate_table1.do"


*STEP 3
*CALCULATE AVERAGE DFCI1's and DFCI1 percentiles
*Output for Figure 6, 7, 8 and Table 2 saved in "results/step3"
do "code/3_avg_dfci1.do"

*STEP 4
*APPENDIX REGRESSIONS
* Estimate Table A1, A2, A3 saved in "results/step4"
do "code/4_estimate_tablea1.do"
do "code/4_estimate_tablea2.do"
do "code/4_estimate_tablea3.do"
