bondDuration: Calculate the duration of a bond

Description Usage Arguments Value Author(s) Examples

Description

Estimate the macaulay or modified duration of a fixed rate coupon bond given the discount curve and bond data. The duration is calculated using the continuously compounded yield

Usage

1
2
bondDuration(bond, discountCurve, percentChangeYield = 0,
  type = c("modified", "macaulay"))

Arguments

bond

a bond object created with bondSpec

discountCurve

vector of discount rates

percentChangeYield

optional elasticity measure

type

specify modified or macaulay duration

Value

duration of the bond

Author(s)

Thomas Fillebeen and Jaiganesh Prabhakaran

Examples

1
2
3
4
5
time = seq(from=0.5, to=2, by=0.5)
DF = rbind(0.968,0.9407242,0.9031545,0.8739803)
bond = bondSpec(time, face=100, m=2, couponRate = 0.0475)
mcDuration = bondDuration(bond,DF, type="macaulay")
modDuration = bondDuration(bond,DF, type="modified")

GARPFRM documentation built on May 2, 2019, 5:45 p.m.