compounding {fixedincome}R Documentation

Create Compounding class

Description

compound() creates a Compounding object in one of its subclasses: Simple, Discrete, Continuous.

Usage

compounding(x = c("simple", "discrete", "continuous"))

Arguments

x

a character with the name of compounding regime: simple, discrete, continuous

Details

A Compounding object can be instanciated with the compounding function, passing a string with the name of one of the compounding regimes: simple, discrete, continuous.

Value

A subclass of Compounding object.

Examples

compounding("simple")
compounding("discrete")
compounding("continuous")

comp <- compounding("discrete")
compound(comp, 0.06, 2) # equals (1 + 0.06) ^ 2 = 1.1236
implied_rate(comp, 1.1236, 2) # equals 0.06

[Package fixedincome version 0.0.5 Index]