implied_rate: Implied rates

implied_rateR Documentation

Implied rates

Description

Computes implied rates to compounding factors.

Usage

implied_rate(x, t, val, ...)

Arguments

x

a Compounding object or a character with the compounding name.

t

a numeric representing the term.

val

a numeric representing the compounding factor.

...

additional arguments. Currently unused.

Details

If the x argument is a character with a valid compounding name (simple, discrete, continuous) the function instanciates a Compounding object and then computes the implied rate for the given compounding values and terms.

Value

A numeric value that represents a spot rate.

Examples

implied_rate("simple", 2, 1.1)
implied_rate("discrete", 2, 1.1025)
implied_rate("continuous", 2, 1.105170918)

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

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