term-conversion {fixedincome}R Documentation

Convert Term in different units

Description

toyears, tomonths and todays functions convert Term objects according to Daycount.

Usage

toyears(x, t)

tomonths(x, t)

todays(x, t)

Arguments

x

a Daycount object.

t

a Term object.

Details

toyears returns the given Term in years units. tomonths returns the given Term in months units. todays returns the given Term in days units.

Value

A Term object converted to the units accordingly the used function.

Examples

dc <- daycount("actual/360")
t <- term(10, "months")
toyears(dc, t)
tomonths(dc, t)
todays(dc, t)

[Package fixedincome version 0.0.5 Index]