You are here

Conducting Event Studies in R

Please make use of our EventStudy R-package for conducting event studies in R. It is an API-wrapper and thereby draws on the very same server-side capabilities as our website-accessible apps. Similarly, it continues to evolve with these and also requires the same three CSV input files: one for stock returns, one for market returns, and the third one with the events of interests. 

The analysis is structured in five steps:

  1. Load the data with correct measurement scale
  2. Filtering firm and market data by the information from the event file, calculate returns
  3. Get the estimation and event window for firm and market data
  4. Fit the linear model on the estimation window
  5. Calculate the abnormal return, t-statistics and two-sided p-value for each abnormal return in the event window

Based on the results, you will be able to plot the abnormal return with 95%-confidence interval.

You can download our R-package from the CRAN repository (https://cran.r-project.org/web/packages/EventStudy/index.html) or from our github account (R-package github). Your installation command from github is as follows:

# you need to install devtools first
install.packages("devtools")
devtools::install_github("EventStudyTools/api-wrapper.r")