Contact

DURATION_ADD Function (OpenOffice Calc)

Financial Intermediate OpenOffice Calc

Calculate bond duration with OpenOffice DURATION_ADD. Verify coupon-weighted timing, frequency, date bases and its distinction from three-argument DURATION.

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. The stored formula identity was source-mapped bond DURATION. How formula examples are checked

Quick answer: =DURATION_ADD(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;0) returned 0.98774684749 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 DURATION_ADD returns

DURATION_ADD is the bond-duration add-in. It forms a present-value-weighted average of coupon and redemption times, expressed in years. It is distinct from OpenOffice’s three-argument compound-growth DURATION. The bond add-in is stored as DURATION in native ODF. Release implementation.

Syntax and arguments

DURATION_ADD(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.

The native ODF formulas use DURATION, mapped by the release to English DURATION_ADD. This is the bond function, not core compound-growth DURATION.

Formula Native 4.1.16 result Independent reference
=DURATION_ADD(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;0) 0.98774684749 0.98774684749
=DURATION_ADD(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;1) 0.98774684749 0.98774684749
=DURATION_ADD(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;2) 1.004413514157 1.004413514157
=DURATION_ADD(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;3) 0.990486573517 0.990486573517
=DURATION_ADD(DATE(2024;1;1);DATE(2025;1;1);.05;.06;2;4) 0.98774684749 0.98774684749
=DURATION_ADD(DATE(2024;1;1);DATE(2025;1;1);.05;.06;1;0) 1 1
=DURATION_ADD(DATE(2024;1;1);DATE(2025;1;1);.05;.06;4;0) 0.981530448373 0.981530448373
=DURATION_ADD(DATE(2024;1;1);DATE(2025;1;1);0;.06;2;0) 1 1

Practical worksheet

For January 1, 2024 settlement, January 1, 2025 maturity, a 5% coupon, 6% yield, semiannual payments and basis 0, duration is approximately 0.987746847490 years. A payment near the half-year point gives some value back before redemption, so the duration is below the one-year maturity interval.

With a zero coupon and the same one-year basis-0 interval, the only positive payment is redemption and duration is 1. Annual coupons also give 1 in this one-year example because all payments occur at the final time.

Advanced interpretation and checks

For basis 0 the two cash flows per 100 are 2.5 at time 0.5 and 102.5 at time 1. Discount each by (1+0.06/2) raised to its payment index, multiply by its time, then divide the weighted sum by total present value.

The implementation sets fractional timing from GetYearFrac(Settlement;Maturity;Basis) and the remaining coupon count. Basis 2 produces approximately 1.004413514157 in the tested calendar-year example because its year fraction is 366/360; basis 3 gives approximately 0.990486573517. These are source-specific timing conventions, not evidence that all bases have the same calendar-year interpretation.

Boundaries and troubleshooting

Coupon and Yield must be nonnegative, Frequency must be 1, 2 or 4, and Settlement must precede Maturity. The native examples use regular valid schedules, all five bases and zero coupon; irregular first/last coupons, negative yields and invalid domains were not executed.

ODF DURATION is the source-mapped bond identity used by the fixture; core compound-growth DURATION uses ODF PDURATION. Modified duration divides this result by 1+Yield/Frequency and is supplied by MDURATION. Neither value by itself prices every cash flow or guarantees an exact price change for a finite yield movement.

Official evidence and checking scope

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.