SwitchDates: Deriving the dates on which the index constituents are going...

Description Usage Arguments Value References Examples

Description

switchDates derives the dates on which the index constituents are going to be reevaluated.

Usage

1
switchDates(price, specificDate = NULL, WeekDay = NULL, Appearance = 1)

Arguments

price

An xts object with the price data. An entry is always required.

specificDate

A specific date of each month on which the index members get reevaluated. A common date would be the 1st of each month or the 15th of each month. specificDate is dominating WeekDay.

WeekDay

Only active when specificDate is NULL. A specific weekday of each month on which the index members get reevaluated. The input has to be a character describing the weekday in English. By default the first weekday with this appearancce is returned. The argument Appearance defines if it is the 1st, 2nd or another appearance of this weekday. E.g. the 3rd Friday of each month can be returned.

Appearance

Defines if the 1st, 2nd or another appearance of a weekday gets returned. E.g. the 3rd Friday of each month can be returned. Only active when specificDate is NULL. The argument works in combination with WeekDay.

Value

A vector of class date with the respective dates on which the index members become reevaluated. This is a necessary input to IndexComp.

References

Trimborn, S. and Haerdle, W.K. (2018). CRIX an Index for cryptocurrencies, Journal of Empirical Finance 49, pp. 107-122. https://doi.org/10.1016/j.jempfin.2018.08.004

Examples

1
2
3
data(CryptoData)

switchDates(price, specificDate = "1")

IndexConstruction documentation built on July 1, 2020, 6:07 p.m.