Monthly Archives: August 2015
How to remove duplicates GVKEY-DATADATE when extracting firm-quarters from Compustat Quarterly (FUNDQ)?
In the definition of datafqtr, WRDS notes that: Note: Companies that undergo a fiscal-year change may have multiple records with the same datadate. Compustat delivers those multiple records with the same datadate but each record relates to a different fiscal … Continue reading
Question: Suppose two companies A and B are connected in some years. Say, right now the data structure is the following: Company 1 Company 2 Starting Year Ending Year A B 2000 2006 A C 1998 2003 C D 1995 … Continue reading
SAS macro to get analysts EPS consensus for a given fiscal period end (DATADATE) by a selected date (DATE)
I write this macro to compute analysts’ quarterly EPS consensus on a selected date (DATE) for a given fiscal quarter end (DATADATE). This macro can be easily modified for other types of estimates (e.g., annual EPS). This macro currently extracts unadjusted quarterly EPS estimates (current … Continue reading
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
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