diff --git a/docs/404.html b/docs/404.html index 9761533..209eb2b 100644 --- a/docs/404.html +++ b/docs/404.html @@ -8,6 +8,13 @@
returns
objects.R/apply_market_model.R
+ Source: R/apply_market_model.R
apply_market_model.Rd
diff --git a/docs/reference/boehmer.html b/docs/reference/boehmer.html index bc217be..b41b697 100644 --- a/docs/reference/boehmer.html +++ b/docs/reference/boehmer.html @@ -8,6 +8,13 @@## 1. Mean-adjusted-returns model if (FALSE) { library("magrittr") -tickers <- c("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") securities_returns <- get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + 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(market_model = "mean_adj", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) } ## The result of the code above is equivalent to: data(rates) securities_returns <- apply_market_model( rates, market_model = "mean_adj", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10") + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13") ) ## 2. Market-adjusted-returns model if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") securities_returns <- get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -256,8 +262,8 @@Examp apply_market_model(regressor = rates_indx, same_regressor_for_all = TRUE, market_model = "mrkt_adj", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) } ## The result of the code above is equivalent to: data(rates, rates_indx) @@ -266,26 +272,25 @@
Examp regressor = rates_indx, same_regressor_for_all = TRUE, market_model = "mrkt_adj", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10") + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13") ) ## 3. Single-index market model if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") securities_returns <- get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -295,8 +300,8 @@
Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) } ## The result of the code above is equivalent to: data(rates, rates_indx) @@ -306,8 +311,8 @@
Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10") + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13") )
R/parametric_tests.R
+ Source: R/parametric_tests.R
boehmer.Rd
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -221,31 +228,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - boehmer(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + boehmer(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) boehmer(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage mean bh_stat bh_signif -#> 1 2001-09-11 Tuesday 100 -0.095267547 -4.033246415 *** -#> 2 2001-09-12 Wednesday 100 -0.031384102 -0.757624918 -#> 3 2001-09-13 Thursday 0 NA NA -#> 4 2001-09-14 Friday 100 -0.037994921 -1.443639802 -#> 5 2001-09-17 Monday 100 0.023717979 1.271626024 -#> 6 2001-09-18 Tuesday 100 -0.004574035 -0.159962572 -#> 7 2001-09-19 Wednesday 100 -0.004380471 -0.005548115 -#> 8 2001-09-20 Thursday 100 -0.097628194 -2.800280643 ** -#> 9 2001-09-21 Friday 100 -0.039622894 -2.298184877 * -#> 10 2001-09-24 Monday 100 0.031556552 1.809375759 -#> 11 2001-09-25 Tuesday 100 0.041640460 2.231357971 * -#> 12 2001-09-26 Wednesday 100 0.022896229 5.554167758 *** -#> 13 2001-09-27 Thursday 100 0.020423192 1.953042855 * -#> 14 2001-09-28 Friday 100 0.005078339 1.228737963#> date weekday percentage mean bh_stat bh_signif +#> 1 2020-03-16 Monday 100 0.02329740 1.20471169 +#> 2 2020-03-17 Tuesday 100 -0.03157867 -1.17531339 +#> 3 2020-03-18 Wednesday 100 -0.01617850 0.07606284 +#> 4 2020-03-19 Thursday 100 0.07672027 2.16657728 * +#> 5 2020-03-20 Friday 100 0.05840545 8.65212561 ***
R/parametric_tests.R
+ Source: R/parametric_tests.R
brown_warner_1980.Rd
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -215,31 +222,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - brown_warner_1980(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + brown_warner_1980(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) brown_warner_1980(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage mean bw_1980_stat bw_1980_signif -#> 1 2001-09-11 Tuesday 100 -0.095267547 -14.1375931 *** -#> 2 2001-09-12 Wednesday 100 -0.031384102 -4.6573643 *** -#> 3 2001-09-13 Thursday 0 NA NA -#> 4 2001-09-14 Friday 100 -0.037994921 -5.6384021 *** -#> 5 2001-09-17 Monday 100 0.023717979 3.5197204 *** -#> 6 2001-09-18 Tuesday 100 -0.004574035 -0.6787815 -#> 7 2001-09-19 Wednesday 100 -0.004380471 -0.6500568 -#> 8 2001-09-20 Thursday 100 -0.097628194 -14.4879104 *** -#> 9 2001-09-21 Friday 100 -0.039622894 -5.8799914 *** -#> 10 2001-09-24 Monday 100 0.031556552 4.6829556 *** -#> 11 2001-09-25 Tuesday 100 0.041640460 6.1793958 *** -#> 12 2001-09-26 Wednesday 100 0.022896229 3.3977737 *** -#> 13 2001-09-27 Thursday 100 0.020423192 3.0307779 *** -#> 14 2001-09-28 Friday 100 0.005078339 0.7536195#> date weekday percentage mean bw_1980_stat bw_1980_signif +#> 1 2020-03-16 Monday 100 0.02329740 2.486449 ** +#> 2 2020-03-17 Tuesday 100 -0.03157867 -3.370281 *** +#> 3 2020-03-18 Wednesday 100 -0.01617850 -1.726675 * +#> 4 2020-03-19 Thursday 100 0.07672027 8.188085 *** +#> 5 2020-03-20 Friday 100 0.05840545 6.233409 ***
R/parametric_tests.R
+ Source: R/parametric_tests.R
brown_warner_1985.Rd
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -214,31 +221,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - brown_warner_1985(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + brown_warner_1985(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) brown_warner_1985(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage mean bw_1985_stat bw_1985_signif -#> 1 2001-09-11 Tuesday 100 -0.095267547 -12.8932767 *** -#> 2 2001-09-12 Wednesday 100 -0.031384102 -4.2474476 *** -#> 3 2001-09-13 Thursday 0 NA NA -#> 4 2001-09-14 Friday 100 -0.037994921 -5.1421397 *** -#> 5 2001-09-17 Monday 100 0.023717979 3.2099332 *** -#> 6 2001-09-18 Tuesday 100 -0.004574035 -0.6190387 -#> 7 2001-09-19 Wednesday 100 -0.004380471 -0.5928423 -#> 8 2001-09-20 Thursday 100 -0.097628194 -13.2127608 *** -#> 9 2001-09-21 Friday 100 -0.039622894 -5.3624656 *** -#> 10 2001-09-24 Monday 100 0.031556552 4.2707865 *** -#> 11 2001-09-25 Tuesday 100 0.041640460 5.6355179 *** -#> 12 2001-09-26 Wednesday 100 0.022896229 3.0987196 *** -#> 13 2001-09-27 Thursday 100 0.020423192 2.7640248 *** -#> 14 2001-09-28 Friday 100 0.005078339 0.6872899#> date weekday percentage mean bw_1985_stat bw_1985_signif +#> 1 2020-03-16 Monday 100 0.02329740 1.858514 * +#> 2 2020-03-17 Tuesday 100 -0.03157867 -2.519140 ** +#> 3 2020-03-18 Wednesday 100 -0.01617850 -1.290615 +#> 4 2020-03-19 Thursday 100 0.07672027 6.120241 *** +#> 5 2020-03-20 Friday 100 0.05840545 4.659205 ***
R/car_parametric_tests.R
+ Source: R/car_parametric_tests.R
car_brown_warner_1985.Rd
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -216,22 +223,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - car_brown_warner_1985(car_start = as.Date("2001-09-11"), - car_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + car_brown_warner_1985(car_start = as.Date("2020-03-16"), + car_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) car_brown_warner_1985( list_of_returns = securities_returns, - car_start = as.Date("2001-09-11"), - car_end = as.Date("2001-09-28") + car_start = as.Date("2020-03-16"), + car_end = as.Date("2020-03-20") )
#> name car_start car_end average_percentage car_mean -#> 1 car_brown_warner_1985 2001-09-11 2001-09-28 100 -0.0127338 +#> 1 car_brown_warner_1985 2020-03-16 2020-03-20 100 0.02213319 #> statistic number_of_days significance -#> 1 -6.213668 13 ***+#> 1 3.948093 5 ***
R/car_parametric_tests.R
+ Source: R/car_parametric_tests.R
car_lamb.Rd
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -219,22 +226,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - car_lamb(car_start = as.Date("2001-09-11"), - car_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + car_lamb(car_start = as.Date("2020-03-16"), + car_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) car_lamb( list_of_returns = securities_returns, - car_start = as.Date("2001-09-11"), - car_end = as.Date("2001-09-28") + car_start = as.Date("2020-03-16"), + car_end = as.Date("2020-03-20") )
#> name car_start car_end average_percentage car_mean statistic -#> 1 car_lamb 2001-09-11 2001-09-28 100 -0.0127338 -6.009818 +#> 1 car_lamb 2020-03-16 2020-03-20 100 0.02213319 3.846464 #> number_of_days significance -#> 1 13 ***+#> 1 5 ***
R/car_nonparametric_tests.R
+ Source: R/car_nonparametric_tests.R
car_nonparametric_tests.Rd
diff --git a/docs/reference/car_parametric_tests.html b/docs/reference/car_parametric_tests.html index c5d01ee..41cab87 100644 --- a/docs/reference/car_parametric_tests.html +++ b/docs/reference/car_parametric_tests.html @@ -8,6 +8,13 @@if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") -nine_eleven_car_param <- get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), - quote = "Close", - retclass = "zoo") %>% +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") +car_nonparam <- 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") %>% @@ -237,17 +244,17 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - car_nonparametric_tests(car_start = as.Date("2001-09-11"), - car_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + car_nonparametric_tests(car_start = as.Date("2020-03-16"), + car_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) -nine_eleven_car_param <- car_nonparametric_tests( +car_nonparam <- car_nonparametric_tests( list_of_returns = securities_returns, - car_start = as.Date("2001-09-11"), - car_end = as.Date("2001-09-28") + car_start = as.Date("2020-03-16"), + car_end = as.Date("2020-03-20") )
R/car_parametric_tests.R
+ Source: R/car_parametric_tests.R
car_parametric_tests.Rd
diff --git a/docs/reference/car_rank_test.html b/docs/reference/car_rank_test.html index 225a342..937b3aa 100644 --- a/docs/reference/car_rank_test.html +++ b/docs/reference/car_rank_test.html @@ -8,6 +8,13 @@if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") -nine_eleven_car_param <- get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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", @@ -238,17 +245,17 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - car_parametric_tests(car_start = as.Date("2001-09-11"), - car_end = as.Date("2001-09-28")) + 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")) } ## The result of the code above is equivalent to: data(securities_returns) -nine_eleven_car_param <- car_parametric_tests( +car_param <- car_parametric_tests( list_of_returns = securities_returns, - car_start = as.Date("2001-09-11"), - car_end = as.Date("2001-09-28") + car_start = as.Date("2020-03-16"), + car_end = as.Date("2020-03-20") )
R/car_nonparametric_tests.R
+ Source: R/car_nonparametric_tests.R
car_rank_test.Rd
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -226,22 +233,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - car_rank_test(car_start = as.Date("2001-09-11"), - car_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + car_rank_test(car_start = as.Date("2020-03-16"), + car_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) car_rank_test( list_of_returns = securities_returns, - car_start = as.Date("2001-09-11"), - car_end = as.Date("2001-09-28") + car_start = as.Date("2020-03-16"), + car_end = as.Date("2020-03-20") )
#> name car_start car_end average_percentage statistic -#> 1 car_rank_test 2001-09-11 2001-09-28 100 -0.364965 +#> 1 car_rank_test 2020-03-16 2020-03-20 100 3.0537 #> number_of_days significance -#> 1 13+#> 1 5 ***
R/nonparametric_tests.R
+ Source: R/nonparametric_tests.R
corrado_sign_test.Rd
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -216,31 +223,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - corrado_sign_test(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + corrado_sign_test(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) corrado_sign_test(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage csign_stat csign_signif -#> 1 2001-09-11 Tuesday 100 -2.2292016 ** -#> 2 2001-09-12 Wednesday 100 -0.9553721 -#> 3 2001-09-13 Thursday 0 NA -#> 4 2001-09-14 Friday 100 -0.9553721 -#> 5 2001-09-17 Monday 100 0.9553721 -#> 6 2001-09-18 Tuesday 100 0.3184574 -#> 7 2001-09-19 Wednesday 100 -0.3184574 -#> 8 2001-09-20 Thursday 100 -2.2292016 ** -#> 9 2001-09-21 Friday 100 -0.9553721 -#> 10 2001-09-24 Monday 100 1.5922868 -#> 11 2001-09-25 Tuesday 100 0.3184574 -#> 12 2001-09-26 Wednesday 100 2.2292016 ** -#> 13 2001-09-27 Thursday 100 0.6369147 -#> 14 2001-09-28 Friday 100 -0.3184574#> date weekday percentage csign_stat csign_signif +#> 1 2020-03-16 Monday 100 0.8636930 +#> 2 2020-03-17 Tuesday 100 0.2878977 +#> 3 2020-03-18 Wednesday 100 0.8636930 +#> 4 2020-03-19 Thursday 100 1.4394883 +#> 5 2020-03-20 Friday 100 2.0152836 **
R/nonparametric_tests.R
+ Source: R/nonparametric_tests.R
generalized_sign_test.Rd
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -226,31 +233,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - generalized_sign_test(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + 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")) } ## The result of the code above is equivalent to: data(securities_returns) generalized_sign_test(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage gsign_stat gsign_signif -#> 1 2001-09-11 Tuesday 100 -2.5877375 *** -#> 2 2001-09-12 Wednesday 100 -1.0755080 -#> 3 2001-09-13 Thursday 0 NA -#> 4 2001-09-14 Friday 100 -1.0755080 -#> 5 2001-09-17 Monday 100 1.1928362 -#> 6 2001-09-18 Tuesday 100 0.4367214 -#> 7 2001-09-19 Wednesday 100 -0.3193933 -#> 8 2001-09-20 Thursday 100 -2.5877375 *** -#> 9 2001-09-21 Friday 100 -1.0755080 -#> 10 2001-09-24 Monday 100 1.9489509 * -#> 11 2001-09-25 Tuesday 100 0.4367214 -#> 12 2001-09-26 Wednesday 100 2.7050657 *** -#> 13 2001-09-27 Thursday 100 1.1928362 -#> 14 2001-09-28 Friday 100 -0.3193933#> date weekday percentage gsign_stat gsign_signif +#> 1 2020-03-16 Monday 100 1.1516761 +#> 2 2020-03-17 Tuesday 100 0.3957301 +#> 3 2020-03-18 Wednesday 100 1.1516761 +#> 4 2020-03-19 Thursday 100 1.9076220 * +#> 5 2020-03-20 Friday 100 2.6635680 ***
R/get_prices_from_tickers.R
+ Source: R/get_prices_from_tickers.R
get_prices_from_tickers.Rd
## Download historical prices of nine European insurance companies' -## stocks: +## Download historical prices of seven companies' stocks: if (FALSE) { library("magrittr") -tickers <- c("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") prices <- tickers %>% - get_prices_from_tickers(start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + get_prices_from_tickers(start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") } ## The result of the above code is stored in: data(prices) -## Download historical prices of ESTX50 EUR P index: +## Download historical prices of S&P 500 index: if (FALSE) { -prices_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +prices_indx <- get_prices_from_tickers("^GSPC", + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") } diff --git a/docs/reference/get_rates_from_prices.html b/docs/reference/get_rates_from_prices.html index 47bce82..a666eae 100644 --- a/docs/reference/get_rates_from_prices.html +++ b/docs/reference/get_rates_from_prices.html @@ -8,6 +8,13 @@@@ -106,7 +114,7 @@Calculate rates of return for given prices. — get_rates_from_prices • estudy2 + + + + + + + @@ -42,6 +49,7 @@ + @@ -73,7 +81,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -125,7 +133,7 @@
@@ -191,15 +199,14 @@Calculate rates of return for given prices.
- Source:R/get_rates_from_prices.R
+ Source:R/get_rates_from_prices.R
get_rates_from_prices.Rd
Details compounding.
Examples
-## Download historical prices of nine European insurance companies' -## stocks and estimate rates of returns form prices: +## Download historical prices of seven companies' stocks and estimate rates +## of returns form prices: if (FALSE) { library("magrittr") -tickers <- c("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") rates <- tickers %>% - get_prices_from_tickers(start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + get_prices_from_tickers(start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -209,13 +216,13 @@@@ -104,7 +112,7 @@Examp ## The result of the above code is stored in: data(rates) -## Download historical prices of ESTX50 EUR P index and estimate rates of +## Download historical prices of S&P 500 index and estimate rates of ## returns from prices: if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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", diff --git a/docs/reference/index.html b/docs/reference/index.html index aad415c..d3195f9 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -8,6 +8,13 @@
Function reference • estudy2 + + + + + + + @@ -40,6 +47,7 @@ + @@ -71,7 +79,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -258,14 +266,13 @@
prices -
+ Stock prices of eight major European insurance companies from 2000-01-03 to -2002-01-01
Stock prices of seven companies from 2019-04-01 to 2020-04-01
- + Prices of of EURONEXT 100 index from 2000-01-03 to 2001-12-31
Prices of S&P 500 index from 2019-04-01 to 2020-04-01
@@ -277,14 +284,13 @@ -rates
+ Rates of returns of eight major European insurance companies from 2000-01-04 -to 2002-01-01
Rates of returns of seven companies from 2019-04-01 to 2020-04-01
- + Rates of returns of EURONEXT 100 index from 2000-01-04 to 2001-12-31
Rates of returns of S&P 500 index from 2019-04-01 to 2020-04-01
@@ -293,10 +299,16 @@ +run_app() +
+ Run Shiny demo app
+ - + Returns of eight major insurance companies from 2000-01-04 to 2001-12-29
Returns of seven companies from 2019-04-01 to 2020-04-01
diff --git a/docs/reference/lamb.html b/docs/reference/lamb.html index 36692ef..6caf570 100644 --- a/docs/reference/lamb.html +++ b/docs/reference/lamb.html @@ -8,6 +8,13 @@ Lamb's parametric test (1995). — lamb • estudy2 + + + + + + + @@ -41,6 +48,7 @@ + @@ -72,7 +80,7 @@ estudy2 - 0.9.2 + 0.9.3 @@ -105,7 +113,7 @@
- - + @@ -124,7 +132,7 @@
@@ -192,19 +200,18 @@Lamb's parametric test (1995).
- Source:R/parametric_tests.R
+ Source:R/parametric_tests.R
lamb.Rd
See a
Examples
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -214,31 +221,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - lamb(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + lamb(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) lamb(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage mean lmb_stat lmb_signif -#> 1 2001-09-11 Tuesday 100 -0.095267547 -12.8350529 *** -#> 2 2001-09-12 Wednesday 100 -0.031384102 -4.2061350 *** -#> 3 2001-09-13 Thursday 0 NA NA -#> 4 2001-09-14 Friday 100 -0.037994921 -4.8579285 *** -#> 5 2001-09-17 Monday 100 0.023717979 3.1953793 *** -#> 6 2001-09-18 Tuesday 100 -0.004574035 -0.6010351 -#> 7 2001-09-19 Wednesday 100 -0.004380471 -0.5838091 -#> 8 2001-09-20 Thursday 100 -0.097628194 -12.4856495 *** -#> 9 2001-09-21 Friday 100 -0.039622894 -5.2306013 *** -#> 10 2001-09-24 Monday 100 0.031556552 3.8950964 *** -#> 11 2001-09-25 Tuesday 100 0.041640460 5.5638463 *** -#> 12 2001-09-26 Wednesday 100 0.022896229 3.0612478 *** -#> 13 2001-09-27 Thursday 100 0.020423192 2.7451289 *** -#> 14 2001-09-28 Friday 100 0.005078339 0.6708057#> date weekday percentage mean lmb_stat lmb_signif +#> 1 2020-03-16 Monday 100 0.02329740 1.620049 +#> 2 2020-03-17 Tuesday 100 -0.03157867 -2.435456 ** +#> 3 2020-03-18 Wednesday 100 -0.01617850 -1.254626 +#> 4 2020-03-19 Thursday 100 0.07672027 6.105794 *** +#> 5 2020-03-20 Friday 100 0.05840545 4.565195 ***diff --git a/docs/reference/modified_rank_test.html b/docs/reference/modified_rank_test.html index 5b535f3..5e12765 100644 --- a/docs/reference/modified_rank_test.html +++ b/docs/reference/modified_rank_test.html @@ -8,6 +8,13 @@@@ -106,7 +114,7 @@An event study modified rank test. — modified_rank_test • estudy2 + + + + + + + @@ -42,6 +49,7 @@ + @@ -73,7 +81,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -125,7 +133,7 @@
@@ -200,19 +208,18 @@An event study modified rank test.
- Source:R/nonparametric_tests.R
+ Source:R/nonparametric_tests.R
modified_rank_test.Rd
See a
Examples
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -222,31 +229,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - modified_rank_test(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + modified_rank_test(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) modified_rank_test(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage mrank_stat mrank_signif -#> 1 2001-09-11 Tuesday 100 -3.4115930 *** -#> 2 2001-09-12 Wednesday 100 -1.0640921 -#> 3 2001-09-13 Thursday 0 NA -#> 4 2001-09-14 Friday 100 -1.6083224 -#> 5 2001-09-17 Monday 100 1.1128291 -#> 6 2001-09-18 Tuesday 100 0.6741958 -#> 7 2001-09-19 Wednesday 100 -0.2274395 -#> 8 2001-09-20 Thursday 100 -3.4115930 *** -#> 9 2001-09-21 Friday 100 -1.7707792 * -#> 10 2001-09-24 Monday 100 2.2987639 ** -#> 11 2001-09-25 Tuesday 100 1.3808829 -#> 12 2001-09-26 Wednesday 100 2.7211516 *** -#> 13 2001-09-27 Thursday 100 1.4296199 -#> 14 2001-09-28 Friday 100 0.5604760#> date weekday percentage mrank_stat mrank_signif +#> 1 2020-03-16 Monday 100 0.8499246 +#> 2 2020-03-17 Tuesday 100 -0.2283881 +#> 3 2020-03-18 Wednesday 100 0.9865178 +#> 4 2020-03-19 Thursday 100 2.1665371 ** +#> 5 2020-03-20 Friday 100 2.9786668 ***diff --git a/docs/reference/nonparametric_tests.html b/docs/reference/nonparametric_tests.html index 419a3e6..13150d0 100644 --- a/docs/reference/nonparametric_tests.html +++ b/docs/reference/nonparametric_tests.html @@ -8,6 +8,13 @@@@ -106,7 +114,7 @@Returns the result of given event study nonparametric tests. — nonparametric_tests • estudy2 + + + + + + + @@ -42,6 +49,7 @@ + @@ -73,7 +81,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -125,7 +133,7 @@
diff --git a/docs/reference/parametric_tests.html b/docs/reference/parametric_tests.html index e9bc824..292924a 100644 --- a/docs/reference/parametric_tests.html +++ b/docs/reference/parametric_tests.html @@ -8,6 +8,13 @@@@ -227,21 +235,20 @@Returns the result of given event study nonparametric tests.
- Source:R/nonparametric_tests.R
+ Source:R/nonparametric_tests.R
nonparametric_tests.Rd
See a
Examples
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") -nine_eleven_nparam <- get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), - quote = "Close", - retclass = "zoo") %>% +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") +nparam <- 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") %>% @@ -249,16 +256,16 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - nonparametric_tests(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + nonparametric_tests(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) -nine_eleven_nparam <- nonparametric_tests(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) +nparam <- nonparametric_tests(list_of_returns = securities_returns, + event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20"))
Returns the result of given event study parametric tests. — parametric_tests • estudy2 + + + + + + + @@ -42,6 +49,7 @@ + @@ -73,7 +81,7 @@ estudy2 - 0.9.2 + 0.9.3 @@ -106,7 +114,7 @@
- - + @@ -125,7 +133,7 @@
diff --git a/docs/reference/patell.html b/docs/reference/patell.html index fa15946..0fff168 100644 --- a/docs/reference/patell.html +++ b/docs/reference/patell.html @@ -8,6 +8,13 @@@@ -212,21 +220,20 @@Returns the result of given event study parametric tests.
- Source:R/parametric_tests.R
+ Source:R/parametric_tests.R
parametric_tests.Rd
See a
Examples
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") -nine_eleven_param <- get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), - quote = "Close", - retclass = "zoo") %>% +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") +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") %>% @@ -234,16 +241,16 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - parametric_tests(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + parametric_tests(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) -nine_eleven_param <- parametric_tests(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) +param <- parametric_tests(list_of_returns = securities_returns, + event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20"))
Patell's parametric test (1976). — patell • estudy2 + + + + + + + @@ -41,6 +48,7 @@ + @@ -72,7 +80,7 @@ estudy2 - 0.9.2 + 0.9.3 @@ -105,7 +113,7 @@
- - + @@ -124,7 +132,7 @@
@@ -201,19 +209,18 @@Patell's parametric test (1976).
- Source:R/parametric_tests.R
+ Source:R/parametric_tests.R
patell.Rd
See a
Examples
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -223,31 +230,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - patell(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + patell(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) patell(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage mean pt_stat pt_signif -#> 1 2001-09-11 Tuesday 100 -0.095267547 -15.93199210 *** -#> 2 2001-09-12 Wednesday 100 -0.031384102 -3.02501512 *** -#> 3 2001-09-13 Thursday 0 NA NA -#> 4 2001-09-14 Friday 100 -0.037994921 -6.04629140 *** -#> 5 2001-09-17 Monday 100 0.023717979 4.87549214 *** -#> 6 2001-09-18 Tuesday 100 -0.004574035 -0.72885915 -#> 7 2001-09-19 Wednesday 100 -0.004380471 -0.01540181 -#> 8 2001-09-20 Thursday 100 -0.097628194 -13.28950663 *** -#> 9 2001-09-21 Friday 100 -0.039622894 -6.18660223 *** -#> 10 2001-09-24 Monday 100 0.031556552 4.66791310 *** -#> 11 2001-09-25 Tuesday 100 0.041640460 6.22810566 *** -#> 12 2001-09-26 Wednesday 100 0.022896229 3.48075345 *** -#> 13 2001-09-27 Thursday 100 0.020423192 3.32642949 *** -#> 14 2001-09-28 Friday 100 0.005078339 1.02097492#> date weekday percentage mean pt_stat pt_signif +#> 1 2020-03-16 Monday 100 0.02329740 2.5507399 ** +#> 2 2020-03-17 Tuesday 100 -0.03157867 -2.9495613 *** +#> 3 2020-03-18 Wednesday 100 -0.01617850 0.3283654 +#> 4 2020-03-19 Thursday 100 0.07672027 8.4216222 *** +#> 5 2020-03-20 Friday 100 0.05840545 6.3196352 ***diff --git a/docs/reference/prices.html b/docs/reference/prices.html index 24a6f57..6867f62 100644 --- a/docs/reference/prices.html +++ b/docs/reference/prices.html @@ -6,9 +6,15 @@ -@@ -109,7 +116,7 @@Stock prices of eight major European insurance companies from 2000-01-03 to -2002-01-01 — prices • estudy2 +Stock prices of seven companies from 2019-04-01 to 2020-04-01 — prices • estudy2 + + + + + + + @@ -40,11 +46,12 @@ - - + + + @@ -76,7 +83,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -127,16 +134,16 @@
@@ -107,7 +115,7 @@-Stock prices of eight major European insurance companies from 2000-01-03 to -2002-01-01
- Source:R/data.R
+Stock prices of seven companies from 2019-04-01 to 2020-04-01
+ Source:R/data.R
prices.Rd
-A
+zoo
object of eight columns containing daily Close stock prices of -eight major European insurance companies from 2000-01-03 to 2002-01-01. See -examples ofget_prices_from_tickers
for the dataset generation.A
zoo
object of seven columns containing daily Close stock prices from +2019-04-01 to 2020-04-01 of seven companies, which could profit from COVID-19 +lockdown. See examples ofget_prices_from_tickers
for the +dataset generation.prices
@@ -145,13 +152,13 @@Stock prices of eight major European insurance companies from 2000-01-03 to
Format
A
zoo
object of eight columns:-
diff --git a/docs/reference/prices_indx.html b/docs/reference/prices_indx.html index efef523..bb4f57c 100644 --- a/docs/reference/prices_indx.html +++ b/docs/reference/prices_indx.html @@ -6,8 +6,15 @@ -- -
ALV.DE
- -
CS.PA
- -
G.MI
- -
HNR1.HA
- -
HSX.L
- -
MUV2.DE
- +
TOP.CO
- +
AMZN
- +
ZM
- +
UBER
- +
NFLX
- +
SHOP
- +
FB
UPWK
Prices of of EURONEXT 100 index from 2000-01-03 to 2001-12-31 — prices_indx • estudy2 +Prices of S&P 500 index from 2019-04-01 to 2020-04-01 — prices_indx • estudy2 + + + + + + + @@ -39,10 +46,11 @@ - - + + @@ -74,7 +82,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -125,14 +133,14 @@
@@ -106,7 +114,7 @@-Prices of of EURONEXT 100 index from 2000-01-03 to 2001-12-31
- Source:R/data.R
+Prices of S&P 500 index from 2019-04-01 to 2020-04-01
+ Source:R/data.R
prices_indx.Rd
-diff --git a/docs/reference/rank_test.html b/docs/reference/rank_test.html index 1e0293a..5021069 100644 --- a/docs/reference/rank_test.html +++ b/docs/reference/rank_test.html @@ -8,6 +8,13 @@A
zoo
object containing daily prices of EURONEXT 100 index from -2000-01-03 to 2001-12-31. See examples of +A
zoo
object containing daily prices of S&P 500 index from +2019-04-01 to 2020-04-01. See examples ofget_prices_from_tickers
for the dataset generation.An event study rank test. — rank_test • estudy2 + + + + + + + @@ -42,6 +49,7 @@ + @@ -73,7 +81,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -125,7 +133,7 @@
@@ -205,19 +213,18 @@An event study rank test.
- Source:R/nonparametric_tests.R
+ Source:R/nonparametric_tests.R
rank_test.Rd
See a
Examples
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -227,31 +234,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - rank_test(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + rank_test(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) rank_test(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage rank_stat rank_signif -#> 1 2001-09-11 Tuesday 100 -3.4115930 *** -#> 2 2001-09-12 Wednesday 100 -1.0640921 -#> 3 2001-09-13 Thursday 0 NA -#> 4 2001-09-14 Friday 100 -1.6083224 -#> 5 2001-09-17 Monday 100 1.1128291 -#> 6 2001-09-18 Tuesday 100 0.6741958 -#> 7 2001-09-19 Wednesday 100 -0.2274395 -#> 8 2001-09-20 Thursday 100 -3.4115930 *** -#> 9 2001-09-21 Friday 100 -1.7707792 * -#> 10 2001-09-24 Monday 100 2.2987639 ** -#> 11 2001-09-25 Tuesday 100 1.3808829 -#> 12 2001-09-26 Wednesday 100 2.7211516 *** -#> 13 2001-09-27 Thursday 100 1.4296199 -#> 14 2001-09-28 Friday 100 0.5604760#> date weekday percentage rank_stat rank_signif +#> 1 2020-03-16 Monday 100 0.7962064 +#> 2 2020-03-17 Tuesday 100 -0.1857202 +#> 3 2020-03-18 Wednesday 100 1.0205417 +#> 4 2020-03-19 Thursday 100 2.1127972 ** +#> 5 2020-03-20 Friday 100 2.9255529 ***diff --git a/docs/reference/rates.html b/docs/reference/rates.html index e8861df..329fc2c 100644 --- a/docs/reference/rates.html +++ b/docs/reference/rates.html @@ -6,9 +6,15 @@ -@@ -109,7 +116,7 @@Rates of returns of eight major European insurance companies from 2000-01-04 -to 2002-01-01 — rates • estudy2 +Rates of returns of seven companies from 2019-04-01 to 2020-04-01 — rates • estudy2 + + + + + + + @@ -40,11 +46,12 @@ - - + + + @@ -76,7 +83,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -127,16 +134,16 @@
@@ -108,7 +116,7 @@@@ -107,7 +115,7 @@-Rates of returns of eight major European insurance companies from 2000-01-04 -to 2002-01-01
- Source:R/data.R
+Rates of returns of seven companies from 2019-04-01 to 2020-04-01
+ Source:R/data.R
rates.Rd
-A
+zoo
object of eight columns containing daily rates of returns of -eight major European insurance companies from 2000-01-04 to 2002-01-01. See -examples ofget_rates_from_prices
for the dataset generation.A
zoo
object of seven columns containing daily rates of returns from +2019-04-01 to 2020-04-01 of seven companies, which could profit from COVID-19 +lockdown. See examples ofget_rates_from_prices
for the dataset +generation.rates
@@ -145,13 +152,13 @@Rates of returns of eight major European insurance companies from 2000-01-04
Format
A
zoo
object of eight columns:-
diff --git a/docs/reference/rates_indx.html b/docs/reference/rates_indx.html index a091976..a798707 100644 --- a/docs/reference/rates_indx.html +++ b/docs/reference/rates_indx.html @@ -6,8 +6,15 @@ -- -
ALV.DE
- -
CS.PA
- -
G.MI
- -
HNR1.HA
- -
HSX.L
- -
MUV2.DE
- +
TOP.CO
- +
AMZN
- +
ZM
- +
UBER
- +
NFLX
- +
SHOP
- +
FB
UPWK
Rates of returns of EURONEXT 100 index from 2000-01-04 to 2001-12-31 — rates_indx • estudy2 +Rates of returns of S&P 500 index from 2019-04-01 to 2020-04-01 — rates_indx • estudy2 + + + + + + + @@ -39,10 +46,11 @@ - - + + @@ -74,7 +82,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -125,14 +133,14 @@
diff --git a/docs/reference/run_app.html b/docs/reference/run_app.html new file mode 100644 index 0000000..bfffbe9 --- /dev/null +++ b/docs/reference/run_app.html @@ -0,0 +1,181 @@ + + + + + + + + +@@ -105,7 +113,7 @@-Rates of returns of EURONEXT 100 index from 2000-01-04 to 2001-12-31
- Source:R/data.R
+Rates of returns of S&P 500 index from 2019-04-01 to 2020-04-01
+ Source:R/data.R
rates_indx.Rd
-diff --git a/docs/reference/returns.html b/docs/reference/returns.html index ac36376..f6a74f1 100644 --- a/docs/reference/returns.html +++ b/docs/reference/returns.html @@ -8,6 +8,13 @@A
zoo
object containing daily rates of returns of EURONEXT 100 index -from 2000-01-04 to 2001-12-31. See examples of +A
zoo
object containing daily rates of returns of S&P 500 index +from 2019-04-01 to 2020-04-01. See examples ofget_rates_from_prices
for the dataset generation.Constructor of an object of S3 class returns. — returns • estudy2 + + + + + + + @@ -41,6 +48,7 @@ + @@ -72,7 +80,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -124,7 +132,7 @@
@@ -233,40 +241,40 @@Constructor of an object of S3 class
- Source:returns
.R/apply_market_model.R
+ Source:R/apply_market_model.R
returns.Rd
Examp #> as.Date, as.Date.numeric
## 1. Mean-adjusted-returns model if (FALSE) { library("magrittr") -single_return <- get_prices_from_tickers("ALV.DE", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +single_return <- get_prices_from_tickers("AMZN", + 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") %>% returns(market_model = "mean_adj", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) } ## The result of the code above is equivalent to: data(rates) -single_return <- returns(rates[, "ALV.DE"], +single_return <- returns(rates[, "AMZN"], market_model = "mean_adj", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) ## 2. Market-adjusted-returns model if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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") -single_return <- get_prices_from_tickers("ALV.DE", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +single_return <- get_prices_from_tickers("AMZN", + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -274,33 +282,33 @@Examp compounding = "continuous") %>% returns(regressor = rates_indx, market_model = "mrkt_adj", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) } ## The result of the code above is equivalent to: data(rates, rates_indx) -single_return <- returns(rates = rates[, "ALV.DE", drop = FALSE], +single_return <- returns(rates = rates[, "AMZN", drop = FALSE], regressor = rates_indx, market_model = "mrkt_adj", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) ## 3. Single-index market model if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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") -single_return <- get_prices_from_tickers("ALV.DE", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +single_return <- get_prices_from_tickers("AMZN", + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -309,17 +317,17 @@
Examp returns(regressor = rates_indx, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) } ## The result of the code above is equivalent to: data(rates, rates_indx) -single_return <- returns(rates = rates[, "ALV.DE", drop = FALSE], +single_return <- returns(rates = rates[, "AMZN", drop = FALSE], regressor = rates_indx, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13"))
Run Shiny demo app — run_app • estudy2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +++ + + + + + + + diff --git a/docs/reference/securities_returns.html b/docs/reference/securities_returns.html index be083ab..6229c29 100644 --- a/docs/reference/securities_returns.html +++ b/docs/reference/securities_returns.html @@ -6,8 +6,15 @@ -+ + + + + + +++ + + ++++ + + estudy2 + 0.9.3 + ++ ++++
+- + + + + +
+- + Reference +
+- + + Articles + + + +
++
+- + Introduction to estudy2 +
+- + Changelog +
++
+ +- + + + + +
+Returns of eight major insurance companies from 2000-01-04 to 2001-12-29 — securities_returns • estudy2 +Returns of seven companies from 2019-04-01 to 2020-04-01 — securities_returns • estudy2 + + + + + + + @@ -39,11 +46,12 @@ - - + + + @@ -75,7 +83,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -126,16 +134,16 @@
@@ -107,7 +115,7 @@-Returns of eight major insurance companies from 2000-01-04 to 2001-12-29
- Source:R/data.R
+Returns of seven companies from 2019-04-01 to 2020-04-01
+ Source:R/data.R
securities_returns.Rd
-A list of length eight, elements of which are objects of the class -
+returns
. The list contains all necessary returns of eight major -insurance companies from 2000-01-04 to 2001-12-29. See examples of -apply_market_model
for the dataset generation.A list of length seven, elements of which are objects of the class +
returns
. The list contains all necessary returns from 2019-04-01 to +2020-04-01 of seven companies, which could profit from COVID-19 lockdown. See +examples ofapply_market_model
for the dataset generation.securities_returns
@@ -144,13 +152,13 @@Returns of eight major insurance companies from 2000-01-04 to 2001-12-29
FormatA list of eight
zoo
elements:-
diff --git a/docs/reference/sign_test.html b/docs/reference/sign_test.html index 347db90..ef5efbe 100644 --- a/docs/reference/sign_test.html +++ b/docs/reference/sign_test.html @@ -8,6 +8,13 @@- -
ALV.DE
- -
CS.PA
- -
G.MI
- -
HNR1.HA
- -
HSX.L
- -
MUV2.DE
- +
TOP.CO
- +
AMZN
- +
ZM
- +
UBER
- +
NFLX
- +
SHOP
- +
FB
UPWK
An event study simple binomial sign test. — sign_test • estudy2 + + + + + + + @@ -43,6 +50,7 @@ + @@ -74,7 +82,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -126,7 +134,7 @@
@@ -198,19 +206,18 @@An event study simple binomial sign test.
- Source:R/nonparametric_tests.R
+ Source:R/nonparametric_tests.R
sign_test.Rd
See a
Examples
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -220,31 +227,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - sign_test(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + sign_test(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) sign_test(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage sign_stat sign_signif -#> 1 2001-09-11 Tuesday 100 -2.6457513 *** -#> 2 2001-09-12 Wednesday 100 -1.1338934 -#> 3 2001-09-13 Thursday 0 NA -#> 4 2001-09-14 Friday 100 -1.1338934 -#> 5 2001-09-17 Monday 100 1.1338934 -#> 6 2001-09-18 Tuesday 100 0.3779645 -#> 7 2001-09-19 Wednesday 100 -0.3779645 -#> 8 2001-09-20 Thursday 100 -2.6457513 *** -#> 9 2001-09-21 Friday 100 -1.1338934 -#> 10 2001-09-24 Monday 100 1.8898224 * -#> 11 2001-09-25 Tuesday 100 0.3779645 -#> 12 2001-09-26 Wednesday 100 2.6457513 *** -#> 13 2001-09-27 Thursday 100 1.1338934 -#> 14 2001-09-28 Friday 100 -0.3779645#> date weekday percentage sign_stat sign_signif +#> 1 2020-03-16 Monday 100 1.1338934 +#> 2 2020-03-17 Tuesday 100 0.3779645 +#> 3 2020-03-18 Wednesday 100 1.1338934 +#> 4 2020-03-19 Thursday 100 1.8898224 * +#> 5 2020-03-20 Friday 100 2.6457513 ***diff --git a/docs/reference/t_test.html b/docs/reference/t_test.html index 8af7028..6271383 100644 --- a/docs/reference/t_test.html +++ b/docs/reference/t_test.html @@ -8,6 +8,13 @@@@ -105,7 +113,7 @@An event study t-test. — t_test • estudy2 + + + + + + + @@ -41,6 +48,7 @@ + @@ -72,7 +80,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -124,7 +132,7 @@
@@ -196,19 +204,18 @@See a
Examples
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -218,31 +225,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - t_test(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + t_test(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) t_test(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage mean t_test_stat t_test_signif -#> 1 2001-09-11 Tuesday 100 -0.095267547 -4.8342919 *** -#> 2 2001-09-12 Wednesday 100 -0.031384102 -1.0197160 -#> 3 2001-09-13 Thursday 0 NA NA -#> 4 2001-09-14 Friday 100 -0.037994921 -1.3785596 -#> 5 2001-09-17 Monday 100 0.023717979 0.9005395 -#> 6 2001-09-18 Tuesday 100 -0.004574035 -0.1608414 -#> 7 2001-09-19 Wednesday 100 -0.004380471 -0.2072312 -#> 8 2001-09-20 Thursday 100 -0.097628194 -2.3475394 * -#> 9 2001-09-21 Friday 100 -0.039622894 -2.5106293 ** -#> 10 2001-09-24 Monday 100 0.031556552 1.8657907 -#> 11 2001-09-25 Tuesday 100 0.041640460 1.9867341 * -#> 12 2001-09-26 Wednesday 100 0.022896229 4.3498111 *** -#> 13 2001-09-27 Thursday 100 0.020423192 1.8165741 -#> 14 2001-09-28 Friday 100 0.005078339 1.1444937#> date weekday percentage mean t_test_stat t_test_signif +#> 1 2020-03-16 Monday 100 0.02329740 1.3941497 +#> 2 2020-03-17 Tuesday 100 -0.03157867 -1.2769075 +#> 3 2020-03-18 Wednesday 100 -0.01617850 -0.4023135 +#> 4 2020-03-19 Thursday 100 0.07672027 1.7958275 +#> 5 2020-03-20 Friday 100 0.05840545 5.1233281 ***diff --git a/docs/reference/wilcoxon_test.html b/docs/reference/wilcoxon_test.html index ccc7921..c569b54 100644 --- a/docs/reference/wilcoxon_test.html +++ b/docs/reference/wilcoxon_test.html @@ -8,6 +8,13 @@@@ -106,7 +114,7 @@An event study Wilcoxon signed rank test. — wilcoxon_test • estudy2 + + + + + + + @@ -42,6 +49,7 @@ + @@ -73,7 +81,7 @@ estudy2 - 0.9.2 + 0.9.3
- - + @@ -125,7 +133,7 @@
@@ -204,19 +212,18 @@An event study Wilcoxon signed rank test.
- Source:R/nonparametric_tests.R
+ Source:R/nonparametric_tests.R
wilcoxon_test.Rd
See a
Examples
if (FALSE) { library("magrittr") -rates_indx <- get_prices_from_tickers("^N100", - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), +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("ALV.DE", "CS.PA", "G.MI", "HNR1.HA", "HSX.L", "MUV2.DE", - "TOP.CO") +tickers <- c("AMZN", "ZM", "UBER", "NFLX", "SHOP", "FB", "UPWK") get_prices_from_tickers(tickers, - start = as.Date("2000-01-01"), - end = as.Date("2002-01-01"), + start = as.Date("2019-04-01"), + end = as.Date("2020-04-01"), quote = "Close", retclass = "zoo") %>% get_rates_from_prices(quote = "Close", @@ -226,31 +233,22 @@Examp same_regressor_for_all = TRUE, market_model = "sim", estimation_method = "ols", - estimation_start = as.Date("2001-03-26"), - estimation_end = as.Date("2001-09-10")) %>% - wilcoxon_test(event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) + estimation_start = as.Date("2019-04-01"), + estimation_end = as.Date("2020-03-13")) %>% + wilcoxon_test(event_start = as.Date("2020-03-16"), + event_end = as.Date("2020-03-20")) } ## The result of the code above is equivalent to: data(securities_returns) wilcoxon_test(list_of_returns = securities_returns, - event_start = as.Date("2001-09-11"), - event_end = as.Date("2001-09-28")) -
#> date weekday percentage wlcx_stat wlcx_signif -#> 1 2001-09-11 Tuesday 100 0 *** -#> 2 2001-09-12 Wednesday 100 9 -#> 3 2001-09-13 Thursday 0 NA -#> 4 2001-09-14 Friday 100 5 -#> 5 2001-09-17 Monday 100 20 -#> 6 2001-09-18 Tuesday 100 16 -#> 7 2001-09-19 Wednesday 100 12 -#> 8 2001-09-20 Thursday 100 0 *** -#> 9 2001-09-21 Friday 100 3 ** -#> 10 2001-09-24 Monday 100 22 * -#> 11 2001-09-25 Tuesday 100 22 * -#> 12 2001-09-26 Wednesday 100 28 *** -#> 13 2001-09-27 Thursday 100 23 * -#> 14 2001-09-28 Friday 100 18#> date weekday percentage wlcx_stat wlcx_signif +#> 1 2020-03-16 Monday 100 23 * +#> 2 2020-03-17 Tuesday 100 10 +#> 3 2020-03-18 Wednesday 100 15 +#> 4 2020-03-19 Thursday 100 27 *** +#> 5 2020-03-20 Friday 100 28 ***diff --git a/pkgdown/favicon/apple-touch-icon-120x120.png b/pkgdown/favicon/apple-touch-icon-120x120.png new file mode 100644 index 0000000..0e994f2 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-120x120.png differ diff --git a/pkgdown/favicon/apple-touch-icon-152x152.png b/pkgdown/favicon/apple-touch-icon-152x152.png new file mode 100644 index 0000000..814f476 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-152x152.png differ diff --git a/pkgdown/favicon/apple-touch-icon-180x180.png b/pkgdown/favicon/apple-touch-icon-180x180.png new file mode 100644 index 0000000..a33b567 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-180x180.png differ diff --git a/pkgdown/favicon/apple-touch-icon-60x60.png b/pkgdown/favicon/apple-touch-icon-60x60.png new file mode 100644 index 0000000..1a44d58 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-60x60.png differ diff --git a/pkgdown/favicon/apple-touch-icon-76x76.png b/pkgdown/favicon/apple-touch-icon-76x76.png new file mode 100644 index 0000000..c0b48b9 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon-76x76.png differ diff --git a/pkgdown/favicon/apple-touch-icon.png b/pkgdown/favicon/apple-touch-icon.png new file mode 100644 index 0000000..a33b567 Binary files /dev/null and b/pkgdown/favicon/apple-touch-icon.png differ diff --git a/pkgdown/favicon/favicon-16x16.png b/pkgdown/favicon/favicon-16x16.png new file mode 100644 index 0000000..f9fe7b6 Binary files /dev/null and b/pkgdown/favicon/favicon-16x16.png differ diff --git a/pkgdown/favicon/favicon-32x32.png b/pkgdown/favicon/favicon-32x32.png new file mode 100644 index 0000000..c731a57 Binary files /dev/null and b/pkgdown/favicon/favicon-32x32.png differ diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico new file mode 100644 index 0000000..0bc99e3 Binary files /dev/null and b/pkgdown/favicon/favicon.ico differ