Category Archives: Learning Resources

Unlocking the black box: how to calculate book-to-market?

The book-to-market ratio (BM) is one of the most frequently calculated variables in accounting research and is usually used as a control variable in regressions. However, how to calculate it is a question I often asked when I started my … Continue reading

Posted in Learning Resources | Tagged | Leave a comment

My thoughts on Python for accounting research

There is a temptation for accounting PhD students to invest in learning Python. However, I would recommend that accounting PhD students focus more on SAS + Stata than on Python in their first year for a few practical and technical … Continue reading

Posted in Learning Resources, Python | Tagged , | 1 Comment

TAR-Style Word Template

I create a Word template that complies with The Accounting Review editorial style. My design philosophy is “simple but sufficient”. I do not like those templates that are heavy and fancy (e.g., macros everywhere). This is just version 1. It … Continue reading

Posted in Learning Resources | 2 Comments

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 | 2 Comments

Rolling-window computation in SAS and Stata

SASers often find proc expand plus transformout very useful for rolling-window (or moving-window) 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 GVKEY-DATADATE when using Compustat Annual (FUNDA) and Quarterly (FUNDQ) data?

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 Learning Resources, Stata | Tagged , | 18 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 | 9 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 | 45 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/crsp-cstat-references.htm Some interesting topics include: error rates in CRSP and COMPUSTAT, differences between COMPUSTAT and CRSP … Continue reading

Posted in Learning Resources | 3 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. It discusses almost every topic that we will use in accounting research. I … Continue reading

Posted in Learning Resources | Leave a comment