You can manually adjust all parameters in your R environment. Save this object and use it in all your Event Studies. This vignette gives you an overview on how to set the correct parameters in R.
You are able to set some general options in the R option object. This enables you to setup your API credentials for all R sessions.
The options can be changed by the options
function in R, e.g.
options(EventStudy.URL = "http://api.eventstudytools.com")
The options can be retained by the
getOption("EventStudy.tryAttempts")
After you have set your paramaeters, you can easily perform your Event Study:
<- "http://api.eventstudytools.com"
apiUrl <- "Please insert your key here"
apiKey
# Setup API Connection
<- EventStudyAPI$new(apiUrl)
estSetup $authentication(apiKey)
estSetup
# Perform Event Study
<- estSetup$performEventStudy(estParams = volatilityEstParams,
estResults dataFiles = c("request_file" = "01_RequestFile.csv",
"firm_data" = "02_firmData.csv",
"market_data" = "03_marketData.csv"),
downloadFiles = T, # download result files
checkFiles = T) # check input files
When you set your url or api key by EventStudy.URL and EventStudy.KEY then just leave input parameters in .\(new()* and *.\)authentication() empty. A default key and url can be set by:
options(EventStudy.KEY = apiKey)
There are several parameters that are valid for all type of Event Studies (Return, Volatility, and Volume Event Study). Each type of Event Study has its own R6
object that has to be initialized before you want to perform an Event Study.
ARCApplicationInput
: Return Event StudyAVCApplicationInput
: Volume Event StudyAVyCApplicationInput
: Volatility Event StudyFor the rest of this paragraph, we are working with a Return Event Study object. All parameters in this section can also applied to the other two objects.
<- ARCApplicationInput$new() returnEstParams
The return type defines the type of the result file. Possible options are
;
as delimiter,Usage:
$setResultFileType("xlsx") returnEstParams
Usage:
$setReturnType("simple") returnEstParams
Usage:
$setNonTradingDays("earlier") returnEstParams
For performing Return Event Studies you need to initialize an ARCApplicationInput
R6 object.
<- ARCApplicationInput$new() returnEstParams
Usage:
$setBenchmarkModel("mm-sw") returnEstParams
Per default all test statistics are activated. A detailed description can be found on our website.
Parametric Test Statistics:
Non-Parametric Test Statistics:
Usage:
$setTestStatistics(c("aarptlz", "aarrankz")) returnEstParams
For performing Return Event Studies you need to initialize an AVCApplicationInput
R6 object.
<- AVCApplicationInput$new() volumeEstParams
Usage:
$setBenchmarkModel("mm-sw") volumeEstParams
Per default all test statistics are activated. A detailed description can be found on our website.
Parametric Test Statistics:
Non-Parametric Test Statistics:
Usage:
$setTestStatistics(c("aarptlz", "aarrankz")) volumeEstParams
For performing Return Event Studies you need to initialize an AVyCApplicationInput
R6 object.
<- AVyCApplicationInput$new() volatilityEstParams
Per default all test statistics are activated. A detailed description can be found on our website.
Volatility Test Statistics:
Abnormal Return Test Statistics:
Usage:
$setTestStatistics(c("aarptlz", "aarrankz")) volatilityEstParams
Please cite our work in your publication.