The security's settlement date.
The security's maturity date.
The security's annual coupon rate.
The security's annual yield.
The number of coupon payments per year. For
annual payments, frequency = 1; for semiannual, frequency = 2; for
quarterly, frequency = 4.
Optionalbasis: 0 | 1 | 2 | 4 | 3 = 0The type of day count basis to use. 0 or
omitted = US (NASD 30/360), 1 = actual/actual, 2 = actual/360, 3 =
actual/365, 4 = European 30/360.
The Macauley duration.
Calculates the Macauley duration for an assumed par value of $100. Duration is defined as the weighted average of the present value of cash flows, and is used as a measure of a bond's price sensitivity to changes in yield.
Remarks:
settlement,maturity,frequency, andbasisare truncated to integers.settlementormaturityis not a valid date, an error is thrown.coupon<0or ifyld<0, an error is thrown.frequencyis any number other than1,2, or4, an error is thrown.basis<0or ifbasis>4, an error is thrown.settlement>=maturity, an error is thrown.The duration is calculated as:
When N > 1:
When N = 1: