NUMERICAL AUDIT · 5 DECEMBER 2026

The Common Domain Model miscounts days under 30E/360 (ISDA)

Xamit Kadirbekov and Daniyal Kadirbekov, GERO Numerical Assurance

REPRODUCED · FIX PROPOSED. Fix open as CDM pull request #5439 (updated 5 December 2026). Our bug report, issue #5432, was closed automatically by a repository bot because it was filed through the API rather than the project’s Bug form; we are re-filing it through the form. Reproduced with the official finos-cdm 7.12.0 Python package; model source at master commit dfdcbf3. Reproduction script: cdm-30e360-isda-check.py. See also: three more money errors in the same model.

The Common Domain Model (CDM) is a machine-readable and machine-executable model of how financial products are traded and managed across their lifecycle. Earlier versions were released as the ISDA CDM; since February 2023 it has been an open standard hosted by FINOS, sponsored by the trade associations ISDA, ISLA and ICMA. Besides data structures, it contains executable calculations, including YearFraction, which turns a calculation period into the fraction of a year used to compute interest.

For the day count 30E/360 (ISDA), that function does not follow the ISDA definition it cites.

195days CDM counts for a final period of 180
166,667overstated on one coupon of 100 million at 4%
2,831 / 3,000random periods where CDM differs from the ISDA formula

What the definition says

Under the 2006 ISDA Definitions, Section 4.16(h), 30E/360 (ISDA) is [360 × (Y2 − Y1) + 30 × (M2 − M1) + (D2 − D1)] / 360, where D1 is the first day of the period, set to 30 if it is the last day of February or the 31st, and D2 is the day after the last day of the period, set to 30 if it is the last day of February but not the Termination Date, or the 31st.

What the model does

In base-datetime-daycount-func.rosetta, two lines differ from this:

alias startDay:
    if <start is last day of February> or startDate -> day = 31
    then 30
    else endDate -> day          // D1 taken from the END date

alias endDay:
    if <end is last day of February> or endDate -> day = 31
        or endDate = terminationDate   // 30 on ANY termination date
    then 30
    else endDate -> day

The first looks like a copy-and-paste slip: D1 falls back to the end date’s day. The second turns the definition’s exception around. The Termination Date is meant to be exempt from the February rule; in the model it forces D2 to 30 on whatever day the trade ends.

When a period starts and ends on the same day of the month and does not end on the termination date, the two slips cancel and the result is right. That is the regular middle of most schedules, which may be why the error has gone unnoticed. Everywhere else it is wrong: short and long stubs, periods whose start and end move differently under business-day adjustment, and every final period that ends on a termination date other than the 30th or 31st.

Examples

StartEndTerminationCDMISDA
15 Jan 202420 Feb 202415 Jan 20303035
15 Mar 202415 Sep 202415 Sep 2024195180
31 Aug 202528 Feb 202628 Feb 2026180178
15 Mar 202415 Sep 202415 Mar 2030180180

Days on a 360 basis. The first row is a short first period: D1 is taken as 20 instead of 15, and five days of interest disappear. The second is a final period: D2 is forced to 30, adding 15 days. The third is a termination on 28 February, where the definition keeps 28 and the model uses 30. The last row is a regular middle period, where the slips cancel.

On a final coupon of 100 million at 4%, the second row gives 2,166,667 instead of 2,000,000: 166,667 too much. On a five-year semi-annual schedule rolling on the 15th, with weekend adjustment only, between two and five of the ten periods come out wrong depending on the start year, and the whole schedule accrues 1,815 days instead of 1,800.

How we checked

We ran the official generated Python code (finos-cdm 7.12.0 from PyPI) against a direct implementation of the formula above, and cross-checked that implementation with QuantLib 1.44 Thirty360(German), which takes the termination date into account. On 3,000 random periods the ISDA formula and QuantLib agree in every case; the CDM differs in 2,831 of them.

The package also fails before it gets that far: for 30E/360 (ISDA), and for ACT/365L, the generated code calls a leap-year function that the package does not define, and raises NameError. Our script supplies that one built-in so that the rest of the generated logic runs unchanged; the script prints the error first.

How to reproduce

pip install finos-cdm==7.12.0 QuantLib
python cdm-30e360-isda-check.py

The script prints the table above, the count on random periods, the QuantLib cross-check and the coupon example. Download it: cdm-30e360-isda-check.py.

Fix and status

We reported the defect as issue #5432 on 5 December 2026, with the proposed change: take D1 from the start date, and apply the termination-date exception only to the last day of February. A transcription of the corrected logic matches QuantLib on the same 3,000 periods. The fix, with a test, is open as pull request #5439; both authors have signed the project’s contributor licence agreement. We found no earlier report of this in the project’s issues and pull requests. There appear to be no tests for this day count in the repository.

Limits

This is a defect in one executable function of a reference model. We do not know which firms run CDM’s calculation functions in production, or whether any payment has been computed with them; we make no claim that anyone has been over- or underpaid. The defect is in the model source, so other distributions generated from it, such as Java, are expected to carry the same logic; we ran only the Python package. The random periods use arbitrary start and end dates, not real trade schedules, so 2,831 of 3,000 describes how far the function departs from the definition, not how often real coupons are affected.