ResultParser: Parses request and results files returned from our Event...

ResultParserR Documentation

Parses request and results files returned from our Event Study API interface.

Description

This result file parser works currently only with csv files. Please read the vignette for further details (coming soon). We will restructure our result reports soon. So, this function may change dramatically. This object can be used for plotting your results.

Format

R6Class object.

Methods

new(dir)

This method is used to create object of this class with dir as the directory of result files.

parseReport(path = "analysis_report.csv")

This method parses the analysis report file (analysis_report.csv).

parseAR(path = "ar_results.csv")

This method parses the abnormal return file (ar_results.csv). Furthermore, it triggers parseReport and join firm and index name.

parseCAR(path = "car_results.csv")

This method parses the cumulative abnormal return file (ar_results.csv). Furthermore, it triggers parseReport and join firm and index name.

Public fields

destDir

Result dir.

Methods

Public methods


Method get_request_file()

Parse request file

Usage
ResultParser$get_request_file(path = "01_RequestFile.csv")
Arguments
path

path to request file.


Method get_analysis_report()

Parse request file

Usage
ResultParser$get_analysis_report(path = "analysis_report.csv")
Arguments
path

path to request file.


Method get_ar()

Parse request file

Usage
ResultParser$get_ar(
  path = "ar_results.csv",
  analysis_report_tbl = NULL,
  request_tbl = NULL
)
Arguments
path

path to request file.

analysis_report_tbl

PArsed analysis report

request_tbl

parsed request file


Method get_car()

Parse Cumulative Abnormal Return

Usage
ResultParser$get_car(path = "car_results.csv", analysis_report_tbl = NULL)
Arguments
path

The path to the CAR result CSV file.

analysis_report_tbl

The analyis report table. It will be used for extracting the group.


Method get_aar()

Parse AAR results

Usage
ResultParser$get_aar(path = "aar_results.csv", analysis_report = NULL)
Arguments
path

path to aar result file.

analysis_report

Extracted analysis report


Method get_caar()

Parse caar results

Usage
ResultParser$get_caar(path = "caar_results.csv")
Arguments
path

path to caar result file.


Method clone()

The objects of this class are cloneable with this method.

Usage
ResultParser$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

## Not run: 
# Assume you already performed an Event Study and result files are saved in 
# the actual working directory.
estParser <- ResultParser$new()

# parse request file
estParser$parseRequestFile("01_RequestFile.csv")

# parse result files
estParser$parseReport("Analysis report.csv")
estParser$parseAR("AR results.csv")
estParser$parseAAR("AAR results.csv")

## End(Not run)


EventStudy documentation built on Sept. 21, 2022, 9:10 a.m.