
Last chance! 50% off unlimited learning
Sale ends in
switchDates
derives the dates on which the index constituents are going to be reevaluated.
switchDates(price, specificDate = NULL, WeekDay = NULL, Appearance = 1)
An xts object with the price data. An entry is always required.
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
.
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.
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
.
A vector of class date with the respective dates on which the index members become reevaluated. This is a necessary input to IndexComp
.
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
# NOT RUN {
data(CryptoData)
switchDates(price, specificDate = "1")
# }
Run the code above in your browser using DataLab