-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviolation_vars.do
38 lines (26 loc) · 1.1 KB
/
violation_vars.do
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
*/
cap cd "C:/Users/lmostrom/Dropbox/Abnormal_Returns/"
import delimited "wrds_extraction.csv", clear //--------------------------------
replace covenanttype = strtrim(covenanttype)
replace covenanttype = "Max. Debt to Tangible Net Worth" ///
if covenanttype == "Max. Debt to Tangible Net"
replace covenanttype = "Max. Total Debt to Tangible Net Worth" ///
if inlist(covenanttype, "Max. Total Debt (including Contingent", ///
"Max. Total Debt (including Contingent Liabilities) to Tangible Net Worth")
replace covenanttype = "Min. Net Worth to Total Asset" ///
if covenanttype == "Min. Net Worth to Total"
tempfile covenants
save `covenants', replace
keep packageid
duplicates drop
export delimited "dealscan_packageids.txt", replace
import delimited "dealscan-facilities.csv", clear //----------------------------
tempfile facilities
save `facilities', replace
import delimited "dealscan-packages.csv", clear //----------------------------
tempfile packages
save `packages', replace
joinby packageid using `covenants'
joinby packageid using `facilities'
duplicates drop