Categories
 Data (7)
 Learning Resources (8)
 Python (7)
 SAS (11)
 Stata (14)
 Uncategorized (2)

Recent Posts
 The calculation of average credit rating using ratings from three rating agencies
 Stata commands to test equality of mean and median
 Handy Stata command to display combined Pearson and Spearman correlation matrix
 Stata command to convert string GVKEY to numerical GVKEY or vice versa
 Stata command to calculate the area under ROC curve
Recent Comments
 Joe on Calculate idiosyncratic stock return volatility
 Sabrina on About Me
 Jixun on Calculate market value of equity: use CRSP or Compustat?
 Hui on A loop of crosssectional regressions for calculating abnormal accruals in Stata
 Shuo Wang on The calculation of average credit rating using ratings from three rating agencies
Archives
Meta
Category Archives: Learning Resources
The impact of WRDS transition to the new WRDS Cloud server
WRDS has quietly started the transition from the old server to the new Cloud server. This move makes a lot of support documentation on the WRDS website outdated and misleading. That is why I think WRDS should direct its resources on continuously … Continue reading
Posted in Learning Resources, SAS
1 Comment
Rollingwindow computation in SAS and Stata
SASers often find proc expand plus transformout very useful for rollingwindow (or movingwindow) computation. Stataers may wonder if there is a counter party in Stata. The answer is “yes”. The command in Stata is rolling. See the manual below: http://www.stata.com/manuals13/tsrolling.pdf The … Continue reading
Posted in Learning Resources, SAS, Stata
Leave a comment
How to remove duplicate GVKEYDATADATE when using Compustat Annual (FUNDA) and Quarterly (FUNDQ)?
The annual data (FUNDA) is easy to deal with, you just need to apply the following conditions: indfmt==”INDL” & datafmt==”STD” & popsrc==”D” & consol==”C” If you have downloaded FUNDA and converted it to Stata format, the uniqueness of GVKEYDATADATE can … Continue reading
Posted in Learning Resources
4 Comments
Calculate market value of equity: use CRSP or Compustat?
I encountered a problem today: I had to calculate market value of equity. On Compustat Quarterly I found three variables that seemed to be what I need: PRCCQ, CSHOQ, and MKVALTQ. On CRSP, I found two variables: PRC and SHROUT. So … Continue reading
Posted in Learning Resources
4 Comments
Look into CRSP/Compustat link table
The link history table (CCMXPF_LNKHIST) is the primary table used for WRDS CCM web queries. In this post, I explain this table in detail. Background We know that a company may issue multiple securities, one of which is considered primary … Continue reading
Posted in Learning Resources, SAS
13 Comments
Errors in CRSP, Compustat and other popular data source
I find a web page providing references for articles that study specific aspects of CRSP, Compustat and other popular sources of data used in academic research. https://www.kellogg.northwestern.edu/researchcomputing/crspcstatreferences.htm Some interesting topics include: error rates in CRSP and COMPUSTAT, differences between COMPUSTAT and CRSP … Continue reading
Posted in Learning Resources
2 Comments
My favorite econometrics textbook
The website http://www.econometricsbooks.com discusses popular econometrics textbooks. I find the information very useful. My favorite textbook is Introductory Econometrics: A Modern Approach. I would call it an intermediate level textbook which discusses almost every topic we will use in accounting research. I also … Continue reading
Posted in Learning Resources
Leave a comment
SAS and Stata—Which is better for archival accounting research?
The short answer is: we need both. When we do archival accounting research, we often need to merge data across various databases, such as COMPUSTAT, CRSP, and EXECUCOMP. Stata can by no means beat SAS in this regard. SAS supports … Continue reading
Posted in Learning Resources, SAS, Stata
1 Comment