View source: R/nonparametric_tests.R
generalized_sign_test | R Documentation |
A binomial sign test which determines whether the frequency of positive abnormal returns in the event period is significantly different from the frequency in the estimation period.
generalized_sign_test(list_of_returns, event_start, event_end)
list_of_returns |
a list of objects of S3 class |
event_start |
an object of |
event_end |
an object of |
This test is application of the binomial test to the event study,
which indicates whether the cross-sectional frequency of positive abnormal
returns is significantly different from the expected. This test is stable
to outliers, in other words allows for checking if the result is driven by
few companies with extremely large abnormal performance. For this test the
estimation period and the event period must not overlap, otherwise an error
will be thrown. This test uses an estimate from the estimation period instead
of using naive value of expected frequency 0.5. The test statistic is assumed
to have a normal distribution. Typically the test is used together with
parametric tests. The test is well-specified for the case, when
cross-sectional abnormal returns are not symmetric. Also this procedure is
less sensitive to extreme returns than the rank test. The significance levels
of \alpha
are 0.1, 0.05, and 0.01 (marked respectively by *, **, and
***).
A data frame of the following columns:
date
: a calendar date
weekday
: a day of the week
percentage
: a share of non-missing observations for a given
day
gsign_stat
: a generalized sign test statistic
gsign_signif
: a significance of the statistic
McConnell J.J., Muscarella C.J. Capital expenditure plans and firm value Journal of Financial Economics, 14:399-422, 1985.
Cowan A.R. Nonparametric Event Study Tests. Review of Quantitative Finance and Accounting, 2:343-358, 1992.
nonparametric_tests
, sign_test
,
corrado_sign_test
, rank_test
,
modified_rank_test
, and wilcoxon_test
.
## 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")
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")) %>%
generalized_sign_test(event_start = as.Date("2020-03-16"),
event_end = as.Date("2020-03-20"))
## End(Not run)
## The result of the code above is equivalent to:
data(securities_returns)
generalized_sign_test(list_of_returns = securities_returns,
event_start = as.Date("2020-03-16"),
event_end = as.Date("2020-03-20"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.