bondduration
Calculates the bond duration for a known bond price and future payments (coupons or fixed incomes). Depending on input, function can return scalar, vector or matrix
Arguments
- Number of periods (payments/incomes)
- Interest rate per period
- Value of periodic payment
Output
Bond duration
Examples