Bond duration given yield

**In R2017b, the specification of optional input arguments has changed. While the
previous ordered inputs syntax is still supported, it may no longer be supported in a
future release. Use the optional name-value pair inputs: Period,
Basis, EndMonthRule,
IssueDate,FirstCouponDate,
LastCouponDate,
StartDate,Face,
CompoundingFrequency, DiscountBasis, and
LastCouponInterest.**

`[`

computes the Macaulay and modified duration of `ModDuration`

,`YearDuration`

,`PerDuration`

] = bnddury(`Yield`

,`CouponRate`

,`Settle`

,`Maturity`

)`NUMBONDS`

fixed
income securities given yield to maturity for each bond.

`bnddury`

determines the Macaulay and modified duration for a
bond whether the first or last coupon periods in the coupon structure are short or
long (that is, whether the coupon structure is synchronized to maturity).
`bnddury`

also determines the Macaulay and modified duration
for a zero coupon bond.

`[`

adds optional name-value pair arguments. `ModDuration`

,`YearDuration`

,`PerDuration`

] = bnddury(___,`Name,Value`

)

[1] Krgin, D. *Handbook of Global Fixed Income Calculations.*
Wiley, 2002.

[2] Mayle, J. *"Standard Securities Calculations Methods: Fixed Income
Securities Formulas for Analytic Measures."* SIA, Vol 2, Jan
1994.

[3] Stigum, M., Robinson, F. *Money Market and Bond
Calculation.* McGraw-Hill, 1996.