QUANT.BOND.DURATION OpenBI
A bond's modified duration at its yield: how much its price moves, in percent, for a change in the yield.
Group: Quantitative finance. OpenBI’s own: DAX has no function of this name.
Syntax
QUANT.BOND.DURATION ( <settlement>, <maturity>, <coupon>, <yieldRate> [, <frequency>] [, <dayCount>] [, <redemption>] )
| Parameter | Type | Description |
|---|---|---|
settlement | Date | The day the bond changes hands: everything is worked out as of this day. |
maturity | Date | The day the bond pays its last coupon and its redemption. |
coupon | Number | The coupon rate a year, as a decimal: 0.04 for 4 %. |
yieldRate | Number | The yield to maturity as a decimal, compounded as many times a year as the coupon is paid. |
frequency | Whole number optional | Coupons a year: 1 (when left out), 2, 4 or 12. |
dayCount | Text optional | How days are counted between coupons: "Actual/Actual" (when left out: each coupon period's own days), "Actual/Actual ISDA", "Actual/365", "Actual/360" or "30/360". |
redemption | Number optional | What the bond pays back at maturity for each 100 of nominal; 100 when left out. |
Returns
Number. The modified duration in years: the relative fall in the dirty price for a rise of one unit of yield.
Remarks
- A duration of 4.4 means the price falls by about 4.4 % when the yield rises by one percentage point, and by about 0.044 % for one basis point.
- The longer the bond and the lower its coupon, the longer its duration; a bond without coupons has a duration a little under its remaining life.
- It is the Macaulay duration divided by one plus the yield per period. With the default conventions it equals the spreadsheet-style
MDURATIONwith basis 1. - For the price change itself, in money, use
QUANT.BOND.DV01; for how the duration bends,QUANT.BOND.CONVEXITY. - The coupon dates are counted back from the maturity one period at a time, on the same day of the month, and are not moved off weekends or holidays.
- The yield is compounded at the coupon frequency, with the day count given: the convention of a bond's own quote.
- A blank or a text where a number belongs, a maturity on or before the settlement, or a frequency other than 1, 2, 4 or 12 is an error.
Compared with DAX
An OpenBI function: DAX has none like it, so a measure or query that uses it works in OpenBI only, not in Power BI or Analysis Services.
Examples
The five-year bond's risk measures
Its duration, convexity and DV01 at a yield of 4.5 %, and MDURATION for the duration.
EVALUATE
ROW (
"Duration", QUANT.BOND.DURATION ( DATE ( 2026, 10, 13 ), DATE ( 2031, 10, 13 ), 0.04, 0.045 ),
"MDURATION", MDURATION ( DATE ( 2026, 10, 13 ), DATE ( 2031, 10, 13 ), 0.04, 0.045, 1, 1 ),
"Convexity", QUANT.BOND.CONVEXITY ( DATE ( 2026, 10, 13 ), DATE ( 2031, 10, 13 ), 0.04, 0.045 ),
"DV01", QUANT.BOND.DV01 ( DATE ( 2026, 10, 13 ), DATE ( 2031, 10, 13 ), 0.04, 0.045 )
)
| Duration | MDURATION | Convexity | DV01 |
|---|---|---|---|
| 4.42595959250607 | 4.42595959250607 | 24.7405516554818 | -0.0432881029409165 |
The holdings at 4 %, longest first
EVALUATE
SELECTCOLUMNS (
Holdings,
"Bond", Holdings[Bond],
"Duration", ROUND ( QUANT.BOND.DURATION ( DATE ( 2026, 10, 13 ), Holdings[Maturity], Holdings[Coupon], 0.04 ), 3 )
)
ORDER BY [Duration] DESC
| Bond | Duration |
|---|---|
| Government 2033 | 5.714 |
| Municipal 2031 | 4.379 |
| Corporate 2030 | 3.55 |
| Covered 2029 | 2.472 |
| Government 2028 | 1.302 |
Related functions
QUANT.BOND.DV01, QUANT.BOND.CONVEXITY, QUANT.BOND.PRICE, MDURATION, QUANT.KEYRATE.