Learn R Programming

eventstudies (version 1.2.2)

eventstudy: Perform event study analysis

Description

‘eventstudy’ provides an easy interface that integrates all functionalities of package eventstudies to undertake event study analysis. It allows the user to specify the type of data adjustment to be done (using market model functionalities of the package) and then an inference strategy of choice.

Usage

eventstudy(firm.returns,
           event.list,
           event.window = 10,
           is.levels =  FALSE,
           type = "marketModel",
           to.remap = TRUE,
           remap = "cumsum",
           inference = TRUE,
           inference.strategy = "bootstrap",
           model.args = NULL)

Value

A list with class attribute “es” holding the following elements, or ‘NULL’ if output from a model function is ‘NULL’:

  • “eventstudy.output”: a ‘matrix’ containing mean (bootstrap) or median (with wilcox) estimate with confidence interval; ‘NULL’ if there are no “success” “outcomes”.

  • “outcomes”: a character vector that is the output from phys2eventtime containing details of the successful use of an event:

    • success: shows the successful use of event date.

    • wdatamissing: appears when width data is missing around the event. This will not appear when this function is used since the argument ‘width’ in phys2eventtime is set to 0.

    • wrongspan: if event date falls outside the range of physical date.

    • unitmissing: when the unit (firm name) is missing in the event list.

    • edatamissing: when there is insufficient data to do model estimation.

The returned object contains input information in other attributes:

  • “model.residuals”: a ‘list’ of residual series as returned by the selected model. For models which do not compute residuals, this attribute is not returned.

  • “CAR”: a ‘zoo’ object contaning Cumulative Abnormal Returns as returned by the function specified by “remap” argument.

  • “inference”: a ‘character’ providing information about which inference strategy was utilised to estimate the confidence intervals.

  • “inference.strategy”: a ‘character’ providing the name of the selected model.

  • “event.window”: a ‘numeric’ specifying the window width for event study output.

  • “remap”: a ‘character’ specifying the remapping technique used. Options are mentioned in “remap” argument description.

Function ‘print.es’ is provided to print the coefficients and exposures of the analysis. ‘plot.es’ is used to plot the model residuals and firm returns.

<b>Model arguments</b>

Each model can take extra arguments (supplied as ‘model.args’) apart from mandatory ones for finer control over the analysis. Check the respective function documentation for definitions. The arguments from the relevant functions are listed here:

  • “marketModel”: - market.returns

  • “excessReturn”: - market.returns

  • “lmAMM”: - market.returns - others - switch.to.innov - market.returns.purge - nlag.makeX - nlag.lmAMM - dates - verbose

    Note: arguments (except nlag.lmAMM) are directly passed to ‘makeX’, see lmAMM for more details.

Details

This function is used to conduct event study analysis acting as a wrapper over the functionality provided in the eventstudies package. It provides an interface to select and control the process of event study analysis. It includes choice of the statistical model for doing in-sample estimation and computing coefficients, choice of cumulative returns, and selection of inference procedure. Process used to conduct a study is detailed below:

  1. event.period: is defined as (-event.window, event.window].

  2. estimation.period: If “type” is specified, then estimation.period is calculated for each firm-event in “event.list”, starting from the start of the data span till the start of event period (inclusive).

  3. For each firm-event, firm returns and other returns (as applicable) are converted to event time using ‘phys2eventtime’. Data is merged using ‘merge.zoo’ to make sure the indexes are consistent before conversion to event time.

  4. The selected model “type” is run on the series indexed by event time and abnormal returns are computed.

  5. NULL values because of estimation data missing are removed from the output and “outcomes” object is updated with “edatamissing”.

  6. Remapping is done if “to.remap” is ‘TRUE’ using the function specified in “remap” argument.

  7. Means of returns are computed across various events.

  8. Inference is done if “inference” is ‘TRUE’ using the technique specified in “inference.strategy”.

“firm.returns” can contain a single series also. To study a single series, use ‘[’ with drop = FALSE to subset the data set. See phys2eventtime for more details.

‘NA’ values in the returns data are converted to 0.

“type” currently supports:

  • “marketModel”: uses marketModel function to regress market returns on firms return using a linear model.

  • “excessReturn”: uses excessReturn to subtract market return from firm return.

  • “lmAMM”: uses lmAMM to perform Augmented Market Model estimation.

  • “None”: does not use any model.

Arguments to a model type can be sent inside ‘model.args’. See ‘Model arguments’ section for details on accepted fields.

“remap” can take three values:

  • “cumsum”: cumulative sum, uses remap.cumsum. [Default]

  • “cumprod”: cumulative product, buy-hold-abnormal-return (BHAR), uses remap.cumprod.

  • “reindex”: re-indexes the event window by using remap.event.reindex.

For computing confidence intervals, the function can either use bootstrap or Wilcoxon signed-rank test. See inference.bootstrap and inference.wilcox for more details.

‘model.args’ is directly supplied to the model mentioned in the “type” argument. See section on ‘Model arguments’ for more details.

Note: phys2eventtime is called with ‘width’ set to 0 when called from this function.

See Also

lmAMM, marketModel, excessReturn, phys2eventtime, inference.bootstrap, inference.wilcox, remap.cumsum, remap.cumprod, remap.event.reindex,

Examples

Run this code
# NOT RUN {
data("StockPriceReturns")
data("SplitDates")
data("OtherReturns")

                # Event study without adjustment
es <- eventstudy(firm.returns = StockPriceReturns,
                 event.list = SplitDates,
                 event.window = 7,
                 type = "None",
                 to.remap = TRUE,
                 remap = "cumsum",
                 inference = TRUE,
                 inference.strategy = "bootstrap")
str(es)
plot(es)

                # Event study using Market Model
es <- eventstudy(firm.returns = StockPriceReturns,
                 event.list = SplitDates,
                 event.window = 7,
                 type = "marketModel",
                 to.remap = TRUE,
                 remap = "cumsum",
                 inference = TRUE,
                 inference.strategy = "bootstrap",
                 model.args = list(
                        market.returns = OtherReturns[, "NiftyIndex"]
                        )
                 )
str(es)
plot(es)

                # Event study using Augmented Market Model
es <- eventstudy(firm.returns = StockPriceReturns,
                 event.list = SplitDates,
                 event.window = 7,
                 type = "lmAMM",
                 to.remap = TRUE,
                 remap = "cumsum",
                 inference = TRUE,
                 inference.strategy = "bootstrap",
                                                 # model arguments
                 model.args = list(
                        market.returns = OtherReturns[, "NiftyIndex"],
                        others = OtherReturns[, "USDINR"],
                        market.returns.purge = TRUE,
                        nlag.makeX = 5,
                        nlag.lmAMM = 5
                        )
                 )
str(es)
plot(es)
# }

Run the code above in your browser using DataLab