term-conversion: Convert Term in different units

term-conversionR 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)

fixedincome documentation built on July 9, 2023, 7:28 p.m.