FAILURE MAP
← Case archive

FA-60866 / Bond day-count conventions / Open access

30E/360 ISDA with maturity exemption: a February maturity end date is promoted to day 30 · case 01

The final period of a bond maturing at the end of February accrues two or one extra days.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The end-of-month promotion of D2 has no maturity exemption at all.

THE FAILURE

The end-of-month promotion of D2 has no maturity exemption at all.

Unsuccessful approach: Exempting every maturity date regardless of month leaves 31-day maturities unpromoted.

Case contract

Inputs: start, end and maturity dates as [y,m,d]. D1 becomes 30 if the start is the last day of its month. D2 becomes 30 if the end is the last day of its month, unless the end date equals the maturity date and falls in February. Return 360*(Y2-Y1)+30*(M2-M1)+(D2-D1).

Why this case matters

Bond accrual and pricing systems depend on exact day-count arithmetic; a single-day error changes settlement cash.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(a, b, mat):
    y1, m1, d1 = a
    y2, m2, d2 = b
    def last(y, m):
        if m == 2:
            return 29 if (y % 4 == 0 and y % 100 != 0) or y % 400 == 0 else 28
        return 30 if m in (4, 6, 9, 11) else 31
    if d1 == last(y1, m1):
        d1 = 30
    if d2 == last(y2, m2):
        d2 = 30
    return 360 * (y2 - y1) + 30 * (m2 - m1) + (d2 - d1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression maturity february exemption 1', [[2028, 7, 27], [2035, 2, 28], [2035, 2, 28]], 2371], ['regression maturity february exemption 2', [[2078, 10, 31], [2085, 2, 28], [2085, 2, 28]], 2278], ['partial repair probe 1', [[2087, 11, 19], [2091, 7, 31], [2091, 7, 31]], 1331], ['partial repair probe 2', [[2100, 2, 28], [2100, 7, 31], [2100, 7, 31]], 150], ['boundary control 1', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['boundary control 2', [[2023, 2, 28], [2023, 8, 31], [2030, 5, 31]], 180], ['normal control 1', [[2043, 11, 13], [2045, 6, 30], [2051, 7, 31]], 587], ['normal control 2', [[2022, 1, 22], [2027, 12, 15], [2028, 2, 29]], 2123]], [['regression maturity february exemption 1', [[2098, 11, 2], [2100, 2, 28], [2100, 2, 28]], 476], ['regression maturity february exemption 2', [[2034, 1, 1], [2042, 2, 28], [2042, 2, 28]], 2937], ['partial repair probe 1', [[2039, 2, 1], [2046, 3, 31], [2046, 3, 31]], 2579], ['partial repair probe 2', [[2059, 12, 31], [2061, 1, 31], [2061, 1, 31]], 390], ['boundary control 1', [[2023, 2, 28], [2023, 8, 31], [2030, 5, 31]], 180], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['normal control 1', [[2099, 8, 31], [2100, 2, 28], [2100, 3, 9]], 180], ['normal control 2', [[2066, 3, 31], [2071, 6, 17], [2073, 10, 14]], 1877]], [['regression maturity february exemption 1', [[2072, 10, 30], [2073, 2, 28], [2073, 2, 28]], 118], ['regression maturity february exemption 2', [[2052, 5, 31], [2057, 2, 28], [2057, 2, 28]], 1708], ['partial repair probe 1', [[2070, 7, 1], [2073, 7, 31], [2073, 7, 31]], 1109], ['partial repair probe 2', [[2015, 9, 15], [2021, 8, 31], [2021, 8, 31]], 2145], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['boundary control 2', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['normal control 1', [[2014, 2, 28], [2015, 2, 28], [2015, 3, 31]], 360], ['normal control 2', [[2080, 9, 9], [2086, 2, 28], [2088, 8, 29]], 1971]], [['regression maturity february exemption 1', [[2069, 9, 19], [2070, 2, 28], [2070, 2, 28]], 159], ['regression maturity february exemption 2', [[2050, 2, 28], [2058, 2, 28], [2058, 2, 28]], 2878], ['partial repair probe 1', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['partial repair probe 2', [[2031, 1, 30], [2034, 5, 31], [2034, 5, 31]], 1200], ['boundary control 1', [[2023, 2, 28], [2023, 8, 31], [2030, 5, 31]], 180], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['normal control 1', [[2026, 8, 31], [2033, 8, 10], [2033, 8, 10]], 2500], ['normal control 2', [[2069, 5, 31], [2069, 8, 1], [2072, 9, 28]], 61]], [['regression maturity february exemption 1', [[2041, 4, 27], [2045, 2, 28], [2045, 2, 28]], 1381], ['regression maturity february exemption 2', [[2054, 5, 5], [2062, 2, 28], [2062, 2, 28]], 2813], ['partial repair probe 1', [[2076, 6, 30], [2078, 1, 31], [2078, 1, 31]], 570], ['partial repair probe 2', [[2014, 3, 18], [2017, 7, 31], [2017, 7, 31]], 1212], ['boundary control 1', [[2023, 2, 28], [2023, 8, 31], [2030, 5, 31]], 180], ['boundary control 2', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['normal control 1', [[2069, 6, 30], [2075, 4, 30], [2075, 4, 30]], 2100], ['normal control 2', [[2093, 2, 28], [2095, 2, 28], [2100, 5, 31]], 720]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression maturity february exemption 123732371Failed
regression maturity february exemption 222802278Failed
partial repair probe 113311331Passed
partial repair probe 2150150Passed
boundary control 1180180Passed
boundary control 2180180Passed
normal control 1587587Passed
normal control 221232123Passed

SHA-256 / 6ab8edb233e2eaab6b54d6946836d313f616f63193f2ca5ca9741a99c4c0510a

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(a, b, mat):
    y1, m1, d1 = a
    y2, m2, d2 = b
    def last(y, m):
        if m == 2:
            return 29 if (y % 4 == 0 and y % 100 != 0) or y % 400 == 0 else 28
        return 30 if m in (4, 6, 9, 11) else 31
    if d1 == last(y1, m1):
        d1 = 30
    if d2 == last(y2, m2) and list(b) != list(mat):
        d2 = 30
    return 360 * (y2 - y1) + 30 * (m2 - m1) + (d2 - d1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression maturity february exemption 1', [[2028, 7, 27], [2035, 2, 28], [2035, 2, 28]], 2371], ['regression maturity february exemption 2', [[2078, 10, 31], [2085, 2, 28], [2085, 2, 28]], 2278], ['partial repair probe 1', [[2087, 11, 19], [2091, 7, 31], [2091, 7, 31]], 1331], ['partial repair probe 2', [[2100, 2, 28], [2100, 7, 31], [2100, 7, 31]], 150], ['boundary control 1', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['boundary control 2', [[2023, 2, 28], [2023, 8, 31], [2030, 5, 31]], 180], ['normal control 1', [[2043, 11, 13], [2045, 6, 30], [2051, 7, 31]], 587], ['normal control 2', [[2022, 1, 22], [2027, 12, 15], [2028, 2, 29]], 2123]], [['regression maturity february exemption 1', [[2098, 11, 2], [2100, 2, 28], [2100, 2, 28]], 476], ['regression maturity february exemption 2', [[2034, 1, 1], [2042, 2, 28], [2042, 2, 28]], 2937], ['partial repair probe 1', [[2039, 2, 1], [2046, 3, 31], [2046, 3, 31]], 2579], ['partial repair probe 2', [[2059, 12, 31], [2061, 1, 31], [2061, 1, 31]], 390], ['boundary control 1', [[2023, 2, 28], [2023, 8, 31], [2030, 5, 31]], 180], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['normal control 1', [[2099, 8, 31], [2100, 2, 28], [2100, 3, 9]], 180], ['normal control 2', [[2066, 3, 31], [2071, 6, 17], [2073, 10, 14]], 1877]], [['regression maturity february exemption 1', [[2072, 10, 30], [2073, 2, 28], [2073, 2, 28]], 118], ['regression maturity february exemption 2', [[2052, 5, 31], [2057, 2, 28], [2057, 2, 28]], 1708], ['partial repair probe 1', [[2070, 7, 1], [2073, 7, 31], [2073, 7, 31]], 1109], ['partial repair probe 2', [[2015, 9, 15], [2021, 8, 31], [2021, 8, 31]], 2145], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['boundary control 2', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['normal control 1', [[2014, 2, 28], [2015, 2, 28], [2015, 3, 31]], 360], ['normal control 2', [[2080, 9, 9], [2086, 2, 28], [2088, 8, 29]], 1971]], [['regression maturity february exemption 1', [[2069, 9, 19], [2070, 2, 28], [2070, 2, 28]], 159], ['regression maturity february exemption 2', [[2050, 2, 28], [2058, 2, 28], [2058, 2, 28]], 2878], ['partial repair probe 1', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['partial repair probe 2', [[2031, 1, 30], [2034, 5, 31], [2034, 5, 31]], 1200], ['boundary control 1', [[2023, 2, 28], [2023, 8, 31], [2030, 5, 31]], 180], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['normal control 1', [[2026, 8, 31], [2033, 8, 10], [2033, 8, 10]], 2500], ['normal control 2', [[2069, 5, 31], [2069, 8, 1], [2072, 9, 28]], 61]], [['regression maturity february exemption 1', [[2041, 4, 27], [2045, 2, 28], [2045, 2, 28]], 1381], ['regression maturity february exemption 2', [[2054, 5, 5], [2062, 2, 28], [2062, 2, 28]], 2813], ['partial repair probe 1', [[2076, 6, 30], [2078, 1, 31], [2078, 1, 31]], 570], ['partial repair probe 2', [[2014, 3, 18], [2017, 7, 31], [2017, 7, 31]], 1212], ['boundary control 1', [[2023, 2, 28], [2023, 8, 31], [2030, 5, 31]], 180], ['boundary control 2', [[2023, 8, 31], [2024, 2, 29], [2026, 2, 28]], 180], ['normal control 1', [[2069, 6, 30], [2075, 4, 30], [2075, 4, 30]], 2100], ['normal control 2', [[2093, 2, 28], [2095, 2, 28], [2100, 5, 31]], 720]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression maturity february exemption 123712371Passed
regression maturity february exemption 222782278Passed
partial repair probe 113321331Failed
partial repair probe 2151150Failed
boundary control 1180180Passed
boundary control 2180180Passed
normal control 1587587Passed
normal control 221232123Passed

SHA-256 / 50f9e024fba126e3f84de542a306d15e92f1daf604574abcb307818767d4fb02

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

A deterministic toy contract stated explicitly in the contract field; no claim of conformance to any published convention text. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:46:49.627069+00:00.

Case digest / 0044f3aec117078e1013fb5ac988b9a7f6ec5988b425b322be48432aedf926bb