Event Studies in Stata

An Event Study typically involves the following steps:

  1. Cleaning and Preparing the Data
  2. Setting Estimation and Event Windows
  3. Estimating Normal Performance
  4. Calculating Abnormal Returns
  5. Testing for Significance

You can implement all of these steps yourself in Stata (the walkthrough below shows how), or you can send your data to our hosted research apps directly from Stata and let them run the full calculation for you.

Run it via the API from Stata

The EventStudyTools Stata wrapper provides the est_arc command. It uploads your three input files to the Abnormal Return Calculator (ARC), runs the analysis on the EventStudyTools servers, and downloads the result files (abnormal returns, CARs, AARs, CAARs, and test statistics) into a local results directory. This saves you the regression bookkeeping described below and gives you the full set of significance tests out of the box.

Installation

Install the command directly from GitHub (Stata 14 or newer; the curl command-line tool must be available on your system):

net install est_arc, from("https://raw.githubusercontent.com/EventStudyTools/stata-wrapper/main")

Quickstart

est_arc, apikey("YOUR_API_KEY") ///
    requestfile("01_RequestFile.csv") ///
    firmdata("02_FirmData.csv") ///
    marketdata("03_MarketData.csv") ///
    destdir("results")

import delimited "results/caar_results.csv", delimiter(";") varnames(1) clear

You need an API key to use the command. Academic API keys are free, valid for one month, and can be requested with a university email address on our API access page. General (non-academic) key access is currently paused.

The three input files follow the same format as manual uploads to the ARC app: one file with the events of interest (including the estimation and event window choices), one with firm returns, and one with market returns. For the underlying request protocol and the full parameter reference, see the ARC API documentation.

Implementing an Event Study step by step in Stata

Please find the five steps implemented in these do-files (ARC, ARC w/ need for reworking ). As required by EventStudyTools' Abnormal Return Calculator (ARC), three input files are used: one for stock returns, one for market returns, and the other for the events of interest, also specifying the choice of estimation and event window lengths. The steps are detailed below:

Cleaning and Preparing the Data

  1. Assigning unique identifiers to firms and benchmark indices (useful if different indices are chosen for different companies)
  2. Converting date from a string to a numeric variable so as to be able to correctly sort the data on date
  3. Computing simple or logarithmic daily returns from unadjusted closing prices
  4. Creating a variable that counts the number of days within each company/index
  5. Combining firm, index and event datasets

Note: This is straightforward in the simple case of a single event per company. If instead there are multiple events per company, it becomes necessary to create multiple clusters, one for each event date.

Setting Estimation and Event Windows

It is likely that there are more observations for each company than required. It is also possible that there are not enough observations for some companies. Before continuing it must be ensured that we have the required minimum number of observations for the event window, as well as the required minimum number of observations before the event window for the estimation window.

The procedure for flagging the event and estimation windows is the same. In order to make sure that the analysis is conducted on the correct observations,

  1. Create a variable that will count the number of days from the event date for each observation on a company's stock
  2. Create a variable that takes the value 1 if an observation falls within the specified length of the event (estimation) window

Estimating Normal Performance

  1. Run a separate OLS regression for each company over the estimation window, and save the alphas (intercepts), betas (slope coefficients) and the RMSEs (root-mean-square errors)
  2. Based on the saved regression parameter estimates, predict normal performance for each day in the event window to arrive at expected returns for the company

Calculating Abnormal Returns

  1. Compute Abnormal Returns (ARs) for each day in the event window as the difference between actual and expected (that is, predicted normal) returns
  2. Compute Cumulative Abnormal Return (CAR) for a company/stock as the sum of the single-day abnormal returns over the event window
  3. Compute Average Abnormal Returns (AARs) for each day in the event window as the cross-sectional average (over firms)
  4. Compute Cumulative Average Abnormal Return (CAAR) as the sum of the AARs

Significance Testing

Finally, tests of significance are implemented to establish the statistical validity of the abnormal returns.

Further links

Manual about event studies in Stata of Princeton University