Matching accounting fundamentals from Compustat to CSRP monthly prices using STATA
Posted: 05 November 2013 03:22 PM   [ Ignore ]
Total Posts:  1
Joined  2013-11-05

Dear all,
I want to merge monthly stock price data from CRSP with accounting variables from Compustat using STATA. I use CCM that provides Compustat data with each permno linked to Gvkey, in order to link with permno in CRSP. It is clear for me how to do the merge using the firm identifier which is permno is this case, however I am not sure if I do it correctly for time identifier. The problem is that CRSP dates are calender years, and Compustat dates are fiscal years. In Compustat (or CCM), any fiscal year that ends in June through December in calendar year Y is said to be fiscal year Y , and any fiscal year that ends in Jan through May of calendar year Y is labelled as fiscal year Y-1.
My inquiries are:
1- Does this mean that if the date in Compustat is May 2010 ,all accounting data in this row will correspond to year 2010 though fyear in Compustat will be 2009?
2- Let’s assume that I want to link stock prices with accounting variables at the fiscal year end, then do I need to create a time identifier in both databases that is =group(year month) to be matched in the two datasets? the problem is that the criterion for years are different here!! what if I want to link stock prices observed three months after fiscal year end ??


Posted: 08 November 2013 04:20 PM   [ Ignore ]   [ # 1 ]
Total Posts:  901
Joined  2011-09-19

hi Ahmed,

The most straightforward date variable to use from Compustat is ‘datadate’, this is basically a ‘rounded’ date of the period in question (so, end of year of May 2, 2012 is April 30, 2012). This variable doesn’t have the issues that fiscal year has (the ‘jump’ in fiscal year for end-of-year May vs June). (fiscal years ending Jan-May will be the fiscal year of the previous year, e.g. fiscal year ending May 2012 is fiscal 2011; end of years of June-Dec is the year of ending, e.g. fiscal year ending June 2012 is fiscal 2012).

So, if you want to measure stock returns over the three month-period after fiscal year, these are the steps:
- join Compustat with CCM to get permno
- construct date variables to indicate the ‘start’ and ‘end’ dates to measure return data (use INTNX function with datadate;
- join dataset with CRSP msf/dsf to get the stock returns

Best regards,



To reply/post new questions: Please use the group WRDS/SAS on Google Groups!