as_ircurve: Create an interest rates curve

Description Usage Arguments Value Examples

View source: R/ircurve.R

Description

Creates an object of class ircurve which represents in interest rates curve. The curve cosists of interest rates and is of type either "forward" or "spot". The interest rates curve can be for monthly or yearly periods.

Usage

1
as_ircurve(rates = double(), type = "forward", period = "year")

Arguments

rates

vector of rates

type

"forward" or "spot"

period

"year" or "month"

Value

Interest rates curve, an object of class ircurve.

Examples

1
2
as_ircurve(c(0.01, 0.015))
as_ircurve(c(0.002, 0.001), type = "spot", period = "month")

Example output

Interest rate curve
Type:   forward 
Period: year 
Rates:
[1] 0.010 0.015
Interest rate curve
Type:   spot 
Period: month 
Rates:
[1] 0.002 0.001

actuaryr documentation built on April 14, 2020, 6:15 p.m.