/***********************************************************************************************************/ /***********************************************************************************************************/ *This do-file produces Figure 6 ("Loan Purposes") * *Input *- Master_Dealscan.dta /***********************************************************************************************************/ /***********************************************************************************************************/ /****************************************************************/ /********** 0. Intros ***************************************/ /****************************************************************/ set more off global path "C:\Users\tobia\Dropbox\6_WIP Papers\Trends in Corporate Borrowing" /****************************************************************/ /********** 1. Graph for the U.S. *****************************/ /****************************************************************/ use "$path/2_IntermediateFiles/Master_Dealscan.dta", clear keep if Country == "USA" keep if BaseRate == "LIBOR" keep if inlist(Currency, "United States Dollars") drop if LoanType3 == "Other" collapse (sum) FacilityAmt*, by(year LoanType3 PrimaryPurpose2) *No observations for 2017-2019 for CPBackup, replace with FacilityAmt = 0 local new = _N + 3 set obs `new' replace year = 2017 if _n == _N-2 replace year = 2018 if _n == _N-1 replace year = 2019 if _n == _N replace FacilityAmt = 0 if FacilityAmt == . replace LoanType3 = "Revolver" if LoanType3 == "" replace PrimaryPurpose2 = "CPBackup" if PrimaryPurpose2 == "" *Facility Amount from USD mn to USD bn replace FacilityAmt = FacilityAmt/1000 *Left-hand graph #d ; twoway (line FacilityAmt year if LoanType3 == "TermLoan" & PrimaryPurpose2 == "Corp. purposes", color (black)) (line FacilityAmt year if LoanType3 == "TermLoan" & PrimaryPurpose2 == "Transactions (e.g. M&A, LBO)", color (black) lpattern(dash)) (line FacilityAmt year if LoanType3 == "TermLoan" & PrimaryPurpose2 == "Other", color (gs12) lpattern(dash)) ,legend(col(1) order(1 "Corporate Purposes" 2 "Transactions (e.g. M&A, LBO)" 3 "Other")) title("Term Loans") xtitle("Year") ytitle("Facility Amount in USD bn") ylabel(0(100)800, labsize(small) angle(90) nogrid) xlabel(2002(1)2019, labsize(small) angle(vertical)) xmtick(2002(1)2019, nolabels ticks) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) name(A, replace); #d cr *Right-hand graph #d ; twoway (line FacilityAmt year if LoanType3 == "Revolver" & PrimaryPurpose2 == "Corp. purposes", color (black)) (line FacilityAmt year if LoanType3 == "Revolver" & PrimaryPurpose2 == "Transactions (e.g. M&A, LBO)", color (black) lpattern(dash)) (line FacilityAmt year if LoanType3 == "Revolver" & PrimaryPurpose2 == "CPBackup", color (gs12)) (line FacilityAmt year if LoanType3 == "Revolver" & PrimaryPurpose2 == "WC", color (gs12) lpattern(dash) ) (line FacilityAmt year if LoanType3 == "Revolver" & PrimaryPurpose2 == "Other", color (gs12) lpattern(dot)) ,legend(col(1) order(1 "Corporate Purposes" 2 "Transactions (e.g. M&A, LBO)" 3 "CP Backup" 4 "Working Capital" 5 "Other")) title("Revolver") xtitle("Year") ytitle("Facility Amount in USD bn") ylabel(0(100)800, labsize(small) angle(90) nogrid) xlabel(2002(1)2019, labsize(small) angle(vertical)) xmtick(2002(1)2019, nolabels ticks) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) name(B, replace); #d cr *Combine graphs into one figure graph combine A B, graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) graph export "$path/3_Results/Figure5.pdf", replace graph export "$path/3_Results/Figure5.png", replace /****************************************************************/ /********** 1. Graph for Europe *****************************/ /****************************************************************/ use "$path/2_IntermediateFiles/Master_Dealscan.dta", clear *Sample (similar as for US, but with additional restrictions on base rate and currency) keep if inlist(Country, "Austria", "Belgium", "Germany", "Finland", "France", "Greece", "Ireland", "Italy", "Luxembourg") | inlist(Country, "Netherlands", "Portugal", "Spain") *keep if inlist(BaseRate, "LIBOR", "Euribor") keep if inlist(Currency, "Euro", "United Kingdom Pounds", "United States Dollars") drop if LoanType3 == "Other" collapse (sum) FacilityAmt*, by(year LoanType3 PrimaryPurpose2) *No observations for 2017-2019 for CPBackup, replace with FacilityAmt = 0 local new = _N + 3 set obs `new' replace year = 2017 if _n == _N-2 replace year = 2018 if _n == _N-1 replace year = 2019 if _n == _N replace FacilityAmt = 0 if FacilityAmt == . replace LoanType3 = "Revolver" if LoanType3 == "" replace PrimaryPurpose2 = "CPBackup" if PrimaryPurpose2 == "" *Facility Amount from USD mn to USD bn replace FacilityAmt = FacilityAmt/1000 *Left-hand graph #d ; twoway (line FacilityAmt year if LoanType3 == "TermLoan" & PrimaryPurpose2 == "Corp. purposes", color (black)) (line FacilityAmt year if LoanType3 == "TermLoan" & PrimaryPurpose2 == "Transactions (e.g. M&A, LBO)", color (black) lpattern(dash)) (line FacilityAmt year if LoanType3 == "TermLoan" & PrimaryPurpose2 == "Other", color (gs12) lpattern(dash)) ,legend(col(1) order(1 "Corporate Purposes" 2 "Transactions (e.g. M&A, LBO)" 3 "Other")) title("Term Loans") xtitle("Year") ytitle("Facility Amount in USD bn") ylabel(0(100)400, labsize(small) angle(90) nogrid) xlabel(2002(1)2019, labsize(small) angle(vertical)) xmtick(2002(1)2019, nolabels ticks) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) name(A, replace); #d cr *Right-hand graph #d ; twoway (line FacilityAmt year if LoanType3 == "Revolver" & PrimaryPurpose2 == "Corp. purposes", color (black)) (line FacilityAmt year if LoanType3 == "Revolver" & PrimaryPurpose2 == "Transactions (e.g. M&A, LBO)", color (black) lpattern(dash)) (line FacilityAmt year if LoanType3 == "Revolver" & PrimaryPurpose2 == "CPBackup", color (gs12)) (line FacilityAmt year if LoanType3 == "Revolver" & PrimaryPurpose2 == "WC", color (gs12) lpattern(dash) ) (line FacilityAmt year if LoanType3 == "Revolver" & PrimaryPurpose2 == "Other", color (gs12) lpattern(dot)) ,legend(col(1) order(1 "Corporate Purposes" 2 "Transactions (e.g. M&A, LBO)" 3 "CP Backup" 4 "Working Capital" 5 "Other")) title("Revolver") xtitle("Year") ytitle("Facility Amount in USD bn") ylabel(0(100)400, labsize(small) angle(90) nogrid) xlabel(2002(1)2019, labsize(small) angle(vertical)) xmtick(2002(1)2019, nolabels ticks) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) name(B, replace); #d cr *Combine graphs into one figure graph combine A B, graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) graph export "$path/3_Results/Figure5 (Europe).pdf", replace graph export "$path/3_Results/Figure5 (Europe).png", replace