Bond duration given price

**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`

] = bnddurp(`Price`

,`CouponRate`

,`Settle`

,`Maturity`

)`NUMBONDS`

fixed-income securities given a clean price for each bond.

`bnddurp`

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).
`bnddurp`

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

`[`

adds optional name-value pair arguments. `ModDuration`

,`YearDuration`

,`PerDuration`

] = bnddurp(___,`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.