README.md

cran version Downloads rstudio mirror downloads

EventStudyTools (EST) API R Wrapper

Get Started

Purpose of this Package

Further Information & Help

Installation

Developer Version

library(devtools)
install_github("EventStudyTools/api-wrapper.r")

CRAN Version

install.packages("EventStudy")

Simple Example of an Abnormal Returns Calculator (ARC) launch

apiKey <- "Insert API key"

# Generate Example Data
EventStudy::getSP500ExampleFiles()

library(EventStudy)
# Setup API Connection
estSetup <- EventStudyAPI$new()
estSetup$authentication(apiKey)

# Type of Analysis
estType <- "arc"

# CSV files
dataFiles <- c("request_file" = "01_RequestFile.csv", 
               "firm_data"    = "02_FirmData.csv", 
               "market_data"  = "03_MarketData.csv")

# Path of result files
resultPath <- "results"

# Perform standard Event Study
estSetup$performDefaultEventStudy(estType   = estType,
                                  dataFiles = dataFiles, 
                                  destDir   = resultPath)

# Parse Results                        
estParser <- ResultParser$new()
request_data = estParser$get_request_file("01_RequestFile.csv")
analysis_report = estParser$get_analysis_report("results/analysis_report.csv")


ar_result = estParser$get_ar("results/ar_results.csv", analysis_report, request_data)
ar_result$plot()

aar_result = estParser$get_aar("results/aar_results.csv", analysis_report)
aar_result$plot(ci_statistics = "Generalized Sign Z")
aar_result$plot_cumulative()
aar_result$plot_test_statistics(p=.99)

car_result = estParser$get_car("results/car_results.csv", analysis_report)
car_result$car_tbl

caar_result = estParser$get_caar("results/caar_results.csv")
caar_result$caar_tbl
caar_result$statistics_tbl

Visit Our App on ShinyApp

Diesel Gate App

Details can be found in our vignettes



Try the EventStudy package in your browser

Any scripts or data that you put into this service are public.

EventStudy documentation built on March 31, 2023, 5:43 p.m.