Skip to main content

Graduate Accounting Empirical Research: CRSP via WRDS


The Center for Research in Security Prices (CRSP) maintains the most comprehensive collection of security price, return, and volume data for the NYSE, AMEX and NASDAQ stock markets. Additional CRSP files provide stock indices, beta-based and cap-based portfolios, treasury bond and risk-free rates, mutual funds, and real estate data. Read more

Once logged in be sure to view the CRSP tools available under the Analytics tab.


Merging CRSP and Compustat Data: Selected Resources

Q: How can we merge CRSP and Compustat if we do not subscribe to CRSP/Compustat merged?
A: In this case you need to extract data from Compustat and from CRSP and cross-merge using a common variable, for instance, the CUSIP identifier. Note that CRSP CUSIP’s identifier has 8 digits because it contains the 2-digit issuer code as well. Compustat CUSIP identifiers have 9 digits.
In the following program we will use PROC SQL to obtain information for three firms both from Compustat and CRSP.

title ‘Merge compustat and CRSP by CUSIP’; option sources; libname comp ‘/wrds/comp/sasdata/na’; libname crsp ‘/wrds/crsp/sasdata/sm’; data compu1 (keep = cusip8 tic conm); set comp.names; where tic in (“DELL” “T” “IBM”); cusip8 = substr(cusip,1,8); /* create 8-digit CUSIP */ run; proc sql; create table total as select compu1.cusip8, compu1.tic, stocknames.* from compu1, crsp.stocknames where compu1.cusip8 = stocknames.cusip; quit;

The SQL statement creates a table named “total” that contains all the variables from msfnames file together with the variables “cusip8” and “tic” from compu1 file. The table will only contain those observations that have the same CUSIP identifier in comp1 and stocknames files.

Merging CRSP and Audit Analytics Data: Selected Resources