indexshifters {fmbasics} | R Documentation |
Index date shifters
Description
A collection of methods that shift dates according to index conventions.
Usage
to_reset(dates, index)
to_value(dates, index)
to_maturity(dates, index)
## Default S3 method:
to_reset(dates, index)
## Default S3 method:
to_value(dates, index)
## Default S3 method:
to_maturity(dates, index)
Arguments
dates |
a vector of dates to shift |
index |
an instance of an object that inherits from the |
Details
The following describes the default methods. to_reset()
treats the input
dates as value dates and shifts these to the corresponding reset or fixing
dates using the index's spot lag; to_value()
treats the input dates as
reset or fixing dates and shifts them to the corresponding value dates using
the index's spot lag; and to_maturity()
treats the input dates as value
dates and shifts these to the index's corresponding maturity date using the
index's tenor.
Value
a vector of shifted dates
Examples
library(lubridate)
to_reset(ymd(20170101) + days(0:30), AUDBBSW(months(3)))
to_value(ymd(20170101) + days(0:30), AUDBBSW(months(3)))
to_maturity(ymd(20170101) + days(0:30), AUDBBSW(months(3)))
[Package fmbasics version 0.3.0 Index]