bondmoddur1(cpn;mat;dcb;setl;price)
Returns the bond modified duration given price (regular semiannual payments).
Syntax
bondmoddur1(cpn;mat;dcb;setl;price)
Input
| Argument | Type | Description |
|---|---|---|
cpn |
integer or decimal | The annual coupon rate expressed as a percentage A scalar value or the name of a column |
mat |
integer | The maturity date A scalar value or the name of a column containing date values |
dcb |
text | The day count basis (dcb) A text value or the name of a column Generally, |
setl |
integer | The settlement date The |
price |
integer | The price (without accrued interest) expressed as a percentage A scalar value or the name of a column |
setl, which cannot be a column name.Return Value
Returns the modified duration of the bond as a decimal value. Bonds are assumed to pay interest semiannually with no odd payment periods. For other bonds, use bondmoddur2(cpn;mat;dcb;issu;first;freq;setl;price).
bondmoddur1(cpn;mat;dcb;setl;price) function handles N/A values as follows:- If
cpn,mat, orpriceare N/A, the result is N/A. - If
dcbis N/A, actual/actual is used.
