MDURATION Function (OpenOffice Calc)
Calculate modified bond duration with OpenOffice MDURATION. Check the yield-frequency divisor, source timing conventions and a bounded sensitivity interpretation.
Verification status: Eight ordinary reference formulas were recalculated in Apache OpenOffice 4.1.16 on Linux x86-64, Build 9816, through generated native ODF and GUI hard recalculation. Saved identities, inputs and results were checked. How formula examples are checked
Quick answer: =MDURATION(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;0) returned 0.958977521835 in the tested Apache OpenOffice 4.1.16 build.
Availability and version history
- Introduced: First release not established; documented by OpenOffice.org 3.3.
- Supported in: Apache OpenOffice 4.1.16; this is a verified release, not a final supported version.
- Scope: Desktop Calc, English function names and semicolon-separated formulas.
- Checked: October 14, 2026. Eight ordinary reference formulas were recalculated from generated ODF in 4.1.16 on Linux x86-64, Build 9816. Source and independent arithmetic were checked.
What MDURATION returns
MDURATION divides the implementation’s bond duration by 1+Yield/Frequency. It expresses a local yield-sensitivity measure under that timing model. It is not the modified internal rate of return, MIRR, and not the number of compound-growth periods. Release implementation.
Syntax and arguments
MDURATION(Settlement;Maturity;Coupon;Yield;Frequency[;Basis])
- Settlement, Maturity: chronological dates on a regular maturity-anchored coupon schedule.
- Coupon, Yield: nonnegative annual decimal rates.
- Frequency: 1, 2 or 4 payments per year.
- Basis: optional 0, with alternatives 1–4 selecting actual/actual, actual/360, actual/365 or European 30/360. Date-helper details can affect results.
Eight reproducible examples
The native column contains saved 4.1.16 results; independent references use high-precision arithmetic and the stated source rules. Values are shown to twelve decimal places where needed. Enter DATE expressions directly rather than locale-dependent date text.
| Formula | Native 4.1.16 result | Independent reference |
|---|---|---|
=MDURATION(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;0) |
0.958977521835 |
0.958977521835 |
=MDURATION(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;1) |
0.958977521835 |
0.958977521835 |
=MDURATION(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;2) |
0.975158751608 |
0.975158751608 |
=MDURATION(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;3) |
0.961637450017 |
0.961637450017 |
=MDURATION(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;4) |
0.958977521835 |
0.958977521835 |
=MDURATION(DATE(2024;1;1);DATE(2025;1;1);.05;.06;1;0) |
0.943396226415 |
0.943396226415 |
=MDURATION(DATE(2024;1;1);DATE(2025;1;1);.05;.06;4;0) |
0.967025072289 |
0.967025072289 |
=MDURATION(DATE(2024;1;1);DATE(2025;1;1);0;.06;2;0) |
0.970873786408 |
0.970873786408 |
Practical worksheet
The one-year semiannual example has DURATION_ADD≈0.987746847490 and Yield/Frequency=0.03. Dividing by 1.03 gives 0.958977521835. With a zero coupon, the corresponding basis-0 result is 1/1.03≈0.970873786408.
Annual frequency gives 1/1.06≈0.943396226415 for the one-year example. Quarterly frequency gives approximately 0.967025072289. The divisor uses yield per coupon period, so inserting an annual rate without dividing by frequency changes the result.
Advanced interpretation and checks
A local approximation often written ΔP/P≈−ModifiedDuration*ΔYield uses an absolute yield change: 0.01 means one percentage point. For the first result, multiplying by 0.01 gives approximately 0.009589775218. This is a small-change model calculation, not a separately executed price forecast or a guarantee for a large rate move.
The duration helper uses GetYearFrac and coupon count to set timing. In the native basis-2 example, the returned modified duration is approximately 0.975158751608, differing from basis 0. Do not assume an arbitrary price function has identical timing conventions; PRICE uses its own coupon-day fractions.
Boundaries and troubleshooting
The wrapper checks nonnegative coupon and yield and a valid frequency; its called coupon helpers impose settlement before maturity. Use basis 0–4 and regular schedules. Native examples cover only valid ordinary inputs, including zero coupon, with no invalid-domain or irregular-schedule execution.
For meaningful sensitivity analysis, preserve the price/yield convention and identify which cash flows and timing assumptions are being differentiated. The first-order relation is an approximation and does not include convexity. The guide verifies the stated spreadsheet calculation, not suitability for a particular investment or accounting decision.
Related functions
Official evidence and checking scope
- Function-specific release implementation
- Function calculation helper
- GetYearFrac date-fraction helper
- GetDiffParam date-fraction helper
- Remaining coupon count
The generated ODF produced the informational load warning “Not all attributes could be read.” The sheet was hard-recalculated and saved separately. All eight ordinary function identities, inputs and results were reconciled; a stale SUM cache changed from 999999 to 3 and an uncached SUM returned 7. This establishes the stated examples, not every workbook style or invalid input. Other explanatory identities are independent calculations. The authoring-tool XLSX was not executed in OpenOffice, and its preview values are not the native results reported here.