Skip to content

duration

Macaulay duration of a bond.

v = duration(settlement, maturity, coupon, yld, frequency, basis)

Returns the Macaulay duration — the weighted average time to receive a bond’s cash flows. frequency is 1 (annual), 2 (semi-annual), or 4 (quarterly). basis selects the day-count convention.

duration('2008-01-01', '2018-01-01', 0.08, 0.09, 2)