adjust {fmdates} | R Documentation |
Adjust to good dates
Description
One common financial markets date arithmetic requires a date needs to be
rolled to the closest business day following some convention (see
is_valid_bdc()
for further details). Such rolled dates can be determined by
calling adjust()
.
Usage
adjust(dates, bdc, calendar)
Arguments
dates |
a vector of dates to adjust. |
bdc |
the business day convention used to roll the |
calendar |
an object that inherits from |
Value
a vector of adjusted dates - good days are unadjusted
See Also
Other calendar methods: generate_schedule
,
is_good
, is_valid_bdc
,
is
, locale
,
shift
, tz
Examples
ausy <- AUSYCalendar()
adjust(lubridate::ymd("20120102"), "u", ausy)
adjust(lubridate::ymd("20120102"), "f", ausy)
adjust(lubridate::ymd("20120102"), "mf", ausy)
adjust(lubridate::ymd("20120102"), "p", ausy)
adjust(lubridate::ymd("20120102"), "mp", ausy)
adjust(lubridate::ymd("20120102"), "ms", ausy)
[Package fmdates version 0.1.4 Index]