Author Archives: Kai Chen

Link Audit Analytics, Compustat, CRSP and I/B/E/S

The following program is used to link each financial restatement in Audit Analytics to Compustat, CRSP, and I/B/E/S. The resultant dataset aa contains unique identifiers of Audit Analytics (res_notify_key), Compustat (gvkey), CRSP (permno), and I/B/E/S (ibtic). Please note this program … Continue reading

Posted in SAS | 15 Comments

Regression with a large dummy-variable set (e.g., firm and year fixed effects) in Stata

I run a regression in Stata with a Compustat dataset that contains fyear and gvkey. I want to add firm and year fixed effects, so I type the following command: regress DV IV i.fyear i.gvkey But Stata returns the error … Continue reading

Posted in Stata | Leave a comment

Stata command to create Fama-French industry classifications based on SIC codes

[Update on January 18, 2023] I was advised that the installation command in the original post didn’t work anymore. The author now instructed users, on his website, to find packages here. You can download a package, as well as its help … Continue reading

Posted in Stata | 30 Comments

Fuzzy match in Stata

Nice article. http://ebp-projects.isr.umich.edu/NCRN/papers/wasi_flaaen_statarecordlinkageutilities.pdf Author’s website: http://www-personal.umich.edu/~nwasi/programs.html For installation, type the following command in Stata: net from http://www-personal.umich.edu/~nwasi/programs net install stnd_compname.pkg Update on August 30, 2018—The foregoing URLs seem broken. Please use the following command to install the package: net from http://www.stata-journal.com/software/sj15-3 net … Continue reading

Posted in Stata | 2 Comments

Calculate CFO tenure with Execucomp in Stata

Nice article and nice blog! Happy to find that someone built a similar blog. https://robsonglasscock.wordpress.com/2014/04/01/determining-cfo-tenure-with-execucomp-data/

Posted in Stata | 1 Comment

Calculate market value of equity: use CRSP or Compustat?

I encountered a problem today: I had to calculate market value of equity. On Compustat Quarterly I found three variables that seemed to be what I need: PRCCQ, CSHOQ, and MKVALTQ. On CRSP, I found two variables: PRC and SHROUT. So … Continue reading

Posted in Learning Resources | 9 Comments

Calculate delta (pay-performance sensitivity), vega (risktaking incentives), and firm-specific wealth (inside equity) for executives on Execucomp

Several papers use measures of delta (pay-performance sensitivity), vega (risktaking incentives), and firm-specific wealth (inside equity) for executives on Execucomp. For example, 1.  Core, J., Guay, W., 2002. Estimate the value of employee stock option portfolios and their sensitivities to price … Continue reading

Posted in SAS | 49 Comments

Look into CRSP/Compustat link table

The link history table (CCMXPF_LNKHIST) is the primary table used for WRDS CCM web queries. In this post, I explain this table in detail. Background We know that a company may issue multiple securities, one of which is considered primary … Continue reading

Posted in Learning Resources, SAS | 45 Comments

Errors in CRSP, Compustat and other popular data source

I find a web page providing references for articles that study specific aspects of CRSP, Compustat and other popular sources of data used in academic research. https://www.kellogg.northwestern.edu/researchcomputing/crsp-cstat-references.htm Some interesting topics include: error rates in CRSP and COMPUSTAT, differences between COMPUSTAT and CRSP … Continue reading

Posted in Learning Resources | 2 Comments

EDGAR index files in Stata dataset (from 1993 Q1 to March 2, 2017)

SEC makes all EDGAR filings publicly available. We can download all 10-Ks, 10-Qs, 8-Ks filed since 1993. However, SEC makes this far away from just a few mouse clicks (in order to reduce the server load and avoid the possible abuse … Continue reading

Posted in Data | 16 Comments