Delistings

The code on this page is used to ensure the maximum sample size is obtained in analysis using Compustat and CRSP data. There are two issues: changing firm identifiers, and delisting returns.

Code to merge Compustat and CRSP

First, changing firm identifiers (GVKEY in Compustat, PERMNO in CRSP) can lead to difficulties in matching. Using the _mycstlink.sas macro below will ensure a maximum sample size. The macro is extensively documented. The macro creates a dataset that is helpful in merging Compustat and CRSP. It addresses the issues discussed in Beaver, McNichols and Price (2007). This sample program shows how to use the program.

Here is a legacy version of _mycstlink.sas and the sample program based on the old FTP format of Compustat.

Code to incorporate delistings in monthly returns

Second, delisting returns may be excluded from analysis if care is not taken. Using the sample code below, you can be sure to include them.

This macro (_dlret_rv.sas) can be used to calculate the replacement values for delisting returns. Here is a fairly simple sample program, delistings.sas, that incorporates delisting returns in monthly return data following Beaver, McNichols and Price (2007). Used in connection with the _mycstlink macro above will ensure that delistings are properly included for Compustat firms. The code replaces missing delisting returns with the average delisting return of similar delistings, rather than a single replacement value. Beware that missing monthly (not daily) delisting returns in CRSP generally contain partial-month returns, so the value of dlret will not be missing. The macro takes this into account. Sample usage of the _dlret_rv.sas macro can also be seen in the _portret.sas macro.