Linking Compustat Index Constituents with the CRSP Monthly Stock File
Posted: 03 February 2015 04:06 AM   [ Ignore ]
Newbie
Rank
Total Posts:  5
Joined  2015-01-14

I have identified constituents of the S&P1500; super composite index through the Compustat Index Constituents (CIS). I would like to find these constituents in the CRSP Monthly Stock File. I was initially thinking of mathing on gvkey and LPERMNO though the CRSP Linking Table, but I realized that gvkey is at the company level and PERMNO is security level. Which identifier from the CIS, chould I use to match with the CRSP monthly stock file? I apologize if this has already been answered, but I couldn’t find it. Thanks

Profile
 
 
Posted: 03 February 2015 07:55 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

hi Maagen,

I would think using the CCM linktable makes sense. You can select the ‘common shares’ and ignore the class B/preferent shares etc, so you have a one-on-one mapping.

best regards,

Joost

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile
 
 
Posted: 04 February 2015 08:12 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  5
Joined  2015-01-14

hi Joost,

Thanks for the fast reply! Just to clarify, you suggest that I 1) find the gvkey of the S&P1500; constituents in the CIS, 2) merge with LPERMNO though the CCM link table, and 3) find the share class in the CRSP Monthly file and exclude other classes than “A”, right?

best maagen

Profile
 
 
Posted: 04 February 2015 06:22 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

hi Maagen,

You would first need to get the gvkey of the constituents of the index for each year. Assuming you have a dataset with gvkey, fyear and datadate in work.mydata, then something like this:

/* match with compustat-crsp merged to retrieve PERMNO 
  
CC merged has a linkdt and linkenddt for which the record is valid 
linkdt: First Effective Date of Link 
linkenddt: Last Effective Date of Link 
  
announcement date (rdq) must be between linkdt and linkenddt: a.linkdt <= b.rdq <= linkenddt
usually linkdt and linkenddt is a date, but linkdt can be 'B' (beginning) and linkenddt 
can be 'E' (end).
  
linkprim: Primary issue marker for the link. Based on
Compustat Primary/Joiner flag (PRIMISS), indicating
whether this link is to Compustat?s marked primary
security during this range. ("C" and "P" indicate primarly links)
Not inlcuding "and a.linkprim IN ("C", "P") " will give some double observations (meaning, primary 
and secondary securities are included (for example,
class A and class B shares). This can be overcome by including a single security. 
On the other hand, including the line will prevent such double securities, but (somehow) some firms 
will not end up in the sample. 
*/
  
PROC SQL;
  
create table withpermno as
  
select a.*, b.lpermno
  from mydata
crsp.ccmxpf_linktable b
    where a
.gvkey b.gvkey
    
and b.lpermno ne .
    and 
b.linktype in ("LC" "LN" "LU" "LX" "LD" "LS")
    and 
b.linkprim IN ("C""P"
    and ((
a.datadata>= b.LINKDT) or b.LINKDT = .B) and 
       ((
a.datadate<= b.LINKENDDT) or b.LINKENDDT = .E)   ;
  
quit

This should give you one match for each firmyear.

best regards,

Joost

 

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile