Skip to contents

spot_rate() is a svensson() curve's continuously compounded spot rate at maturity m years, forward_rate() its instantaneous forward rate and discount_factor() its discount factor; for a hull_white() model, the forward rate and discount factor of its initial curve.

Usage

spot_rate(curve, m)

forward_rate(curve, m)

discount_factor(curve, m)

Arguments

curve

A svensson (or, except for spot_rate(), a hull_white).

m

Maturities in years.

Value

One value per m.

Examples

s <- svensson(c(0.04, -0.02, 0.01, 0), c(2, 8))
spot_rate(s, c(1, 10))
#> [1] 0.02606531 0.03794610
forward_rate(s, 10)
#> [1] 0.04020214
discount_factor(s, 10)
#> [1] 0.6842301