car_parametric_tests: Returns the result of given event study parametric CAR tests.

View source: R/car_parametric_tests.R

car_parametric_testsR Documentation

Returns the result of given event study parametric CAR tests.

Description

Performs given tests to examine whether cumulative abnormal return (CAR) significantly differs from zero.

Usage

car_parametric_tests(
  list_of_returns,
  car_start,
  car_end,
  percentage = 90,
  all = TRUE,
  tests
)

Arguments

list_of_returns

a list of objects of S3 class returns, each element of which is treated as a security.

car_start

an object of Date class giving the first date of the CAR period.

car_end

an object of Date class giving the last date of the CAR period.

percentage

a lowest allowed percentage of non-missing observation for each day to be incorporated into CAR. The default value is 90 percent.

all

a logical value indicating whether all tests should be performed. The default value is TRUE.

tests

a list of tests' functions among car_brown_warner_1985 and car_lamb.

Details

car_parametric_tests performs specified tests among car_brown_warner_1985 and lamb and returns a list of these tests' results. If all = TRUE (by default), the function ignores the value of tests.

Value

A data frame of the following columns:

  • name: a name of the test

  • car_start: the first date of the CAR period

  • car_end: the last date of the CAR period

  • average_percentage: an average share of non-missing observations over the CAR period

  • car_mean: an average abnormal return over the CAR period

  • statistic: a test's statistic

  • number_of_days: the number of days in the CAR period

  • significance: a significance of the statistic

References

  • Brown S.J., Warner J.B. Using Daily Stock Returns, The Case of Event Studies. Journal of Financial Economics, 14:3-31, 1985.

  • Lamb R.P. An Exposure-Based Analysis of Property-Liability Insurer Stock Values around Hurricane Andrew. Journal of Risk and Insurance, 62(1):111-123, 1995.

See Also

car_brown_warner_1985 and car_lamb.

Examples

## Not run: 
library("magrittr")
rates_indx <- get_prices_from_tickers("^GSPC",
                                      start = as.Date("2019-04-01"),
                                      end = as.Date("2020-04-01"),
                                      quote = "Close",
                                      retclass = "zoo") %>%
    get_rates_from_prices(quote = "Close",
                          multi_day = TRUE,
                          compounding = "continuous")
tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK")
car_param <- get_prices_from_tickers(tickers,
                                                 start = as.Date("2019-04-01"),
                                                 end = as.Date("2020-04-01"),
                                                 quote = "Close",
                                                 retclass = "zoo") %>%
    get_rates_from_prices(quote = "Close",
                          multi_day = TRUE,
                          compounding = "continuous") %>%
    apply_market_model(regressor = rates_indx,
                       same_regressor_for_all = TRUE,
                       market_model = "sim",
                       estimation_method = "ols",
                       estimation_start = as.Date("2019-04-01"),
                       estimation_end = as.Date("2020-03-13")) %>%
    car_parametric_tests(car_start = as.Date("2020-03-16"),
                         car_end = as.Date("2020-03-20"))

## End(Not run)
## The result of the code above is equivalent to:
data(securities_returns)
car_param <- car_parametric_tests(
    list_of_returns = securities_returns,
    car_start = as.Date("2020-03-16"),
    car_end = as.Date("2020-03-20")
)


irudnyts/estudy2 documentation built on April 21, 2022, 10:50 p.m.