tradingDays | R Documentation |
Used by ichimoku
to subset a vector of dates to trading days.
tradingDays(x, holidays, ...)
x |
a vector of POSIXct date objects. |
holidays |
(optional) a vector, or function which outputs a vector, of dates defined as holidays. Set to NULL for a continuously-traded market. |
... |
other arguments not used by this function. |
New Year's Day (01-01) and Christmas Day (12-25) are defined as holidays by default if ‘holidays’ is not specified.
A vector of logical values: TRUE if the corresponding element of ‘x’ is a weekday and not a holiday, FALSE otherwise.
Or, if the parameter ‘holidays’ is set to NULL, a vector of TRUE values of the same length as ‘x’.
dates <- seq(from = as.POSIXct("2020-01-01"), by = "1 day", length.out = 7)
dates
tradingDays(dates)
tradingDays(dates, holidays = c("2020-01-02", "2020-01-03"))
tradingDays(dates, holidays = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.