Categories
- Data (9)
- Learning Resources (9)
- Python (9)
- SAS (14)
- Stata (24)
- Uncategorized (1)
-
Recent Posts
Recent Comments
- Amy on Link FactSet and CRSP
- Kai Chen on Link FactSet and CRSP
- Amy on Link FactSet and CRSP
- Sylvia on Commonly used Stata commands to deal with potential outliers
- jianchen shi on Calculate delta (pay-performance sensitivity), vega (risktaking incentives), and firm-specific wealth (inside equity) for executives on Execucomp
Archives
- February 2022
- January 2022
- August 2021
- March 2021
- September 2019
- August 2019
- July 2019
- May 2019
- April 2019
- March 2019
- August 2018
- July 2018
- December 2017
- November 2017
- October 2017
- September 2017
- April 2017
- September 2016
- April 2016
- December 2015
- November 2015
- September 2015
- August 2015
- June 2015
- March 2015
- February 2015
Meta
Monthly Archives: August 2015
How to remove duplicate GVKEY-DATADATE when using Compustat Annual (FUNDA) and Quarterly (FUNDQ)?
The annual data (FUNDA) is easy to deal with, we just need to apply the following conditions: indfmt==”INDL” & datafmt==”STD” & popsrc==”D” & consol==”C” If we have converted FUNDA to Stata format, the uniqueness of GVKEY-DATADATE can be verified using … Continue reading
Posted in Data, Stata
16 Comments
If beginning year and ending year are known, how to fill in years in between?
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
Posted in SAS
3 Comments
SAS macro to get analysts EPS consensus for a given fiscal period end (DATADATE) by a selected date (DATE)
Update: contains error! will update later. 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 … Continue reading
Posted in SAS
Comments Off on SAS macro to get analysts EPS consensus for a given fiscal period end (DATADATE) by a selected date (DATE)
Link Audit Analytics, Compustat, CRSP and I/B/E/S
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
Posted in SAS
15 Comments
Regression with a large dummy-variable set (e.g., firm and year fixed effects) in Stata
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
Posted in Stata
Leave a comment