switchDates {IndexConstruction} | R Documentation |
Deriving the dates on which the index constituents are going to be reevaluated
Description
switchDates
derives the dates on which the index constituents are going to be reevaluated.
Usage
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. |
WeekDay |
Only active when |
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 |
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
data(CryptoData)
switchDates(price, specificDate = "1")