SAS macro for event study and beta

There are two macros on the List of WRDS Research Macros: EVTSTUDY and BETA, both of which may be commonly used.

I like the first one, authored by Denys Glushkov. Denys’ code is always elegant. I don’t like the second macro because I believe it contains more than minor mistakes and performs many unnecessary calculations.

Since event study and beta calculation are essentially two sides of the same coin, I developed the following macro to output both event study results (e.g., CAR) and beta estimates. My macro heavily borrows from Denys’ code but differs in the following ways:

  1. I add beta to the final output. This is the main difference.
  2. Denys’ macro overwrites original event dates if they are not trading dates, which may result in unintended data loss. I correct this issue.
  3. Deny uses CRSP.DSIY to generate the trading calendar and market returns, but not all institutions have subscription to it. Therefore, I use the more accessible CRSP.DSI instead (thanks to Michael Shen for bringing this to my attention).
  4. I enhance efficiency by de-duplicating event dates when generating estimation and events windows.
  5. Deny’s macro suppresses warnings or error messages, making debugging difficult. I change this setting.

All changes are commented with /* CHANGE HERE */. I compare the results (CAR and beta) from using my macro and those from using a commercial package, EVENTUS (with the help of my friend who has the license to EVENTUS). The accuracy of my macro is assured (Note: EVENTUS does not take delisting returns by default).

Update: WRDS rolled out the event study web inquiry (so-called Event Study by WRDS). I recently checked the accuracy of that product. To my surprise, the accuracy is unsatisfactory, if not terrible.

 

This entry was posted in SAS. Bookmark the permalink.

One Response to SAS macro for event study and beta

  1. Carolina says:

    Very good!

Comments are closed.