|Primary Billing=AccMcNair01
}}
=New Version=
==Introduction==
This is a clean reboot of the LBO project with clearer documentation. The purpose of the project is to analyze the innovative activity of firms after they undergo LBOs. For counterfactuals in the diff-in-diff framework, we match LBO firms to non-LBO using decade, industry, patenting history and propensity score.
See the SQL merges sections for the steps taken to build the dataset
==Key Tables==
'''In E:\McNair\Projects\LBO:'''
*'''''LBO_list_and_data.xlsx:''''' Dataset from Brian (Hand-cleaned list of LBOs from SDC)
**first sheet = main dataset
**second sheet = raw SDC data, dealnumb to GVkey linkage (all public LBOS, including divisional buyouts)
**third sheet = COMPUSTAT lookup (unused)
**fourth sheet = Private-to-private transactions
*'''''failedLBOs2.xlsx:''''' list of withdrawn LBOs from SDC
**first sheet = data
**second sheet = query specifications
'''In Z:\LBO\Clean:'''
*'''''compustatnames.txt:''''' List of distinct company names from COMPUSTAT pull. Used to generate stdcompnames.txt
*'''''LBO COMPUSTAT PULL 4.txt:''''' Result of COMPUSTAT pull
*'''''LBOdata_sheetX.txt:''''' See LBO_list_and_data.xlsx in E:\McNair\Projects\LBO
**'''''LBOdata_sheet1.txt:''''' First sheet of LBO_list_and_data.xlsx as tab-delimited txt (note: export from excel cancelled out the filter for excluded results)
**'''''LBOdata_sheet2.txt:''''' Third sheet of LBO_list_and_data.xlsx as tab-delimited txt
**'''''LBOdata_sheet3.txt:''''' Third sheet of LBO_list_and_data.xlsx as tab-delimited txt
**'''''LBOdata_sheet4.txt:''''' Fourth sheet of LBO_list_and_data.xlsx as tab-delimited txt
*'''''stdcompnames.txt:''''' Standardized COMPUSTAT company names. Used for matching to LBO and patent data.
'''In allpatentsprocessed database:'''
*'''''lbocompustat4:''''' See LBO COMPUSTAT PULL 4.txt
*'''''compustatnames:''''' See compustatnames.txt
*'''''stdcompnames:''''' See stdcompnames.txt
*'''''LBOdata:''''' First sheet of Brian's data; main dataset
*'''''LBOsheet2:''''' Second sheet of Brian's data; used to construct gvkey-to-dealnumb link
*'''''yearsbygvkeys:''''' Composite primary key (all years 1970 to 2015 cross-producted with unique gvkeys); all other data is joined onto this
==Data Pulls==
===COMPUSTAT===
(Query saved in WRDS as LBO COMPUSTAT PULL 4)
'''Criteria:'''
Date Range: 1970-01 to 2016-10
Selection: Entire Database
Output: Tab-delimited
Date Format: YYMMDDs10
Saved in: Z:\LBO\Clean\LBO COMPUSTAT PULL 4.txt
'''Variables:'''
Company Name
Ticker Symbol
CUSIP
Stock Exchange Code
Fiscal Year-End
ADDZIP -- Postal Code
CITY -- City
IPODATE -- Company Initial Public Offering Date
LOC -- Current ISO Country Code - Headquarters
NAICS -- North American Industry Classification Code
SIC -- Standard Industry Classification Code
STATE -- State/Province
FYEAR -- Data Year - Fiscal
ACT -- Current Assets - Total
ARTFS -- Accounts Receivable/Debtors - Total
AT -- Assets - Total
CEQ -- Common/Ordinary Equity - Total
CHE -- Cash and Short-Term Investments
DLC -- Debt in Current Liabilities - Total
DLTT -- Long-Term Debt - Total
INTAN -- Intangible Assets - Total
LCT -- Current Liabilities - Total
LT -- Liabilities - Total
RE -- Retained Earnings
TXDITC -- Deferred Taxes and Investment Tax Credit
DVC -- Dividends Common/Ordinary
DVP -- Dividends - Preferred/Preference
EBITDA -- Earnings Before Interest
NI -- Net Income (Loss)
OIBDP -- Operating Income Before Depreciation
OPITI -- Operating Income - Total
REVT -- Revenue - Total
SALE -- Sales/Turnover (Net)
TXT -- Income Taxes - Total
XINT -- Interest and Related Expense - Total
XRD -- Research and Development Expense
XSGA -- Selling, General and Administrative Expense
XSTFWS -- Staff Expense - Wages and Salaries
ESUBC -- Equity in Net Loss Earnings
IBC -- Income Before Extraordinary Items (Cash Flow)
XIDOC -- Extraordinary Items and Discontinued Operations (Cash Flow)
CSHO -- Common Shares Outstanding
DT -- Total Debt Including Current
EMP -- Employees
PRCC_F -- Price Close - Annual - Fiscal
===SDC===
There are three distinct pulls from SDC. Session details should be included as the second sheet of the respective Excel worksheets.
*Brian Ayash's hand-cleaned list of LBOs (with gvkeys). This exists as the list_and_data.xlsx table.
*List of failed LBOs. This exists as the failedLBOs2.xlsx table.
==SQL merges==
See documentation in <code>E:\McNair\Projects\LBO\Clean\LBO Innovation SQL Script.txt</code>
Basic outline is as follows:
*Imported COMPUSTAT Data
**Built composite primary key from unique gvkeys cross-producted with years 1970 to 2015 (all other datasets will be joined onto this)
**Stripped out list of unique company names from COMPUSTAT data
**Used matcher to construct standardized company names, with lookup table to original names
**Joined gvkeys back into lookup table
*Imported Brian's hand-cleaned SDC data on LBOs
**Sheet 1 contains main list of LBOs
**Sheet 2 contains gvkey to dealnumb link
**Sheet 3 contains COMPUSTAT output (unused)
**Sheet 4 contains private-to-private LBOs
*Use SDC data to flag LBO events for COMPUSTAT data
**Joined sheets 1 and 2 to link gvkey to each LBO deal
**Joined resulting table to composite key to flag for LBO occurrences in given year-gvkey combination
==STATA analysis==
=Old Version=
==Abstract==