indexshifters: Index date shifters

Description Usage Arguments Details Value Examples

Description

A collection of methods that shift dates according to index conventions.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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 Index class.

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

1
2
3
4
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)))

fmbasics documentation built on May 2, 2019, 6:22 a.m.