duration: Calculate the duration of a bond

Description Usage Arguments

Description

Calculate the duration of a bond

Usage

1
duration(n, c, M, y, type = "modified")

Arguments

n

The number of 6 month periods in the bond.

c

The annualized semi-annual coupon rate, as a decimal.

M

The maturity value of the bond.

y

The yield to maturity on the bond, as a decimal.

type

Either "modified" or "macaulay".


DavisVaughan/ratekit documentation built on May 5, 2019, 8:14 a.m.