FAILURE MAP
← Case archive

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

30E/360 ISDA with maturity exemption: the maturity exemption matches on day of month only · case 01

An interim February month-end that shares the maturity day number escapes promotion.

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

ROOT CAUSE

Equality with the maturity date is tested by comparing only the day number and February.

THE FAILURE

Equality with the maturity date is tested by comparing only the day number and February.

Unsuccessful approach: Adding the month to the comparison still ignores the year, so earlier Februaries are exempted.

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) and not (d2 == mat[2] and m2 == 2):
        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 identity comparison 1', [[2026, 11, 29], [2030, 2, 28], [2031, 2, 28]], 1171], ['regression maturity identity comparison 2', [[2001, 5, 24], [2002, 2, 28], [2003, 2, 28]], 276], ['partial repair probe 1', [[2056, 6, 30], [2059, 2, 28], [2063, 2, 28]], 960], ['partial repair probe 2', [[2027, 1, 31], [2029, 2, 28], [2030, 2, 28]], 750], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['boundary control 2', [[2023, 2, 28], [2023, 8, 31], [2030, 5, 31]], 180], ['normal control 1', [[2009, 4, 30], [2011, 11, 30], [2011, 11, 30]], 930], ['normal control 2', [[2064, 1, 31], [2066, 2, 28], [2071, 12, 11]], 750]], [['regression maturity identity comparison 1', [[2016, 4, 8], [2017, 2, 28], [2018, 6, 28]], 322], ['regression maturity identity comparison 2', [[2005, 10, 31], [2011, 2, 28], [2013, 2, 28]], 1920], ['partial repair probe 1', [[2077, 7, 31], [2078, 2, 28], [2082, 2, 28]], 210], ['partial repair probe 2', [[2099, 8, 31], [2100, 2, 28], [2102, 2, 28]], 180], ['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', [[2100, 2, 28], [2100, 8, 31], [2100, 11, 30]], 180], ['normal control 2', [[2099, 8, 31], [2100, 2, 28], [2102, 10, 31]], 180]], [['regression maturity identity comparison 1', [[2099, 8, 31], [2100, 2, 28], [2101, 2, 28]], 180], ['regression maturity identity comparison 2', [[2000, 10, 31], [2001, 2, 28], [2007, 2, 28]], 120], ['partial repair probe 1', [[1998, 11, 30], [1999, 2, 28], [2001, 2, 28]], 90], ['partial repair probe 2', [[2025, 1, 12], [2025, 2, 28], [2030, 2, 28]], 48], ['boundary control 1', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['normal control 1', [[2006, 8, 31], [2011, 3, 31], [2011, 3, 31]], 1650], ['normal control 2', [[2000, 1, 21], [2000, 7, 31], [2008, 2, 29]], 189]], [['regression maturity identity comparison 1', [[2021, 1, 17], [2021, 2, 28], [2022, 2, 28]], 43], ['regression maturity identity comparison 2', [[2091, 12, 31], [2097, 2, 28], [2098, 2, 28]], 1860], ['partial repair probe 1', [[2070, 12, 31], [2077, 2, 28], [2078, 2, 28]], 2220], ['partial repair probe 2', [[2074, 9, 12], [2081, 2, 28], [2082, 2, 28]], 2328], ['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', [[2022, 8, 11], [2024, 2, 29], [2024, 2, 29]], 558], ['normal control 2', [[2002, 10, 28], [2005, 2, 28], [2005, 2, 28]], 840]], [['regression maturity identity comparison 1', [[2068, 9, 30], [2073, 2, 28], [2075, 2, 28]], 1590], ['regression maturity identity comparison 2', [[2049, 3, 31], [2055, 2, 28], [2056, 12, 28]], 2130], ['partial repair probe 1', [[2039, 8, 9], [2041, 2, 28], [2046, 2, 28]], 561], ['partial repair probe 2', [[2097, 2, 1], [2097, 2, 28], [2102, 2, 28]], 29], ['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', [[2100, 2, 28], [2100, 12, 31], [2103, 9, 30]], 300], ['normal control 2', [[2024, 5, 28], [2025, 11, 6], [2025, 11, 6]], 518]]]
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 identity comparison 111691171Failed
regression maturity identity comparison 2274276Failed
partial repair probe 1958960Failed
partial repair probe 2748750Failed
boundary control 1180180Passed
boundary control 2180180Passed
normal control 1930930Passed
normal control 2750750Passed

SHA-256 / 63521e47630c4c3690bdd335fe453b284b2f951e4820ade01213ba2ff3951a41

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 not (d2 == mat[2] and m2 == mat[1] == 2):
        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 identity comparison 1', [[2026, 11, 29], [2030, 2, 28], [2031, 2, 28]], 1171], ['regression maturity identity comparison 2', [[2001, 5, 24], [2002, 2, 28], [2003, 2, 28]], 276], ['partial repair probe 1', [[2056, 6, 30], [2059, 2, 28], [2063, 2, 28]], 960], ['partial repair probe 2', [[2027, 1, 31], [2029, 2, 28], [2030, 2, 28]], 750], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['boundary control 2', [[2023, 2, 28], [2023, 8, 31], [2030, 5, 31]], 180], ['normal control 1', [[2009, 4, 30], [2011, 11, 30], [2011, 11, 30]], 930], ['normal control 2', [[2064, 1, 31], [2066, 2, 28], [2071, 12, 11]], 750]], [['regression maturity identity comparison 1', [[2016, 4, 8], [2017, 2, 28], [2018, 6, 28]], 322], ['regression maturity identity comparison 2', [[2005, 10, 31], [2011, 2, 28], [2013, 2, 28]], 1920], ['partial repair probe 1', [[2077, 7, 31], [2078, 2, 28], [2082, 2, 28]], 210], ['partial repair probe 2', [[2099, 8, 31], [2100, 2, 28], [2102, 2, 28]], 180], ['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', [[2100, 2, 28], [2100, 8, 31], [2100, 11, 30]], 180], ['normal control 2', [[2099, 8, 31], [2100, 2, 28], [2102, 10, 31]], 180]], [['regression maturity identity comparison 1', [[2099, 8, 31], [2100, 2, 28], [2101, 2, 28]], 180], ['regression maturity identity comparison 2', [[2000, 10, 31], [2001, 2, 28], [2007, 2, 28]], 120], ['partial repair probe 1', [[1998, 11, 30], [1999, 2, 28], [2001, 2, 28]], 90], ['partial repair probe 2', [[2025, 1, 12], [2025, 2, 28], [2030, 2, 28]], 48], ['boundary control 1', [[2023, 9, 30], [2024, 3, 31], [2024, 3, 31]], 180], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2029, 7, 15]], 180], ['normal control 1', [[2006, 8, 31], [2011, 3, 31], [2011, 3, 31]], 1650], ['normal control 2', [[2000, 1, 21], [2000, 7, 31], [2008, 2, 29]], 189]], [['regression maturity identity comparison 1', [[2021, 1, 17], [2021, 2, 28], [2022, 2, 28]], 43], ['regression maturity identity comparison 2', [[2091, 12, 31], [2097, 2, 28], [2098, 2, 28]], 1860], ['partial repair probe 1', [[2070, 12, 31], [2077, 2, 28], [2078, 2, 28]], 2220], ['partial repair probe 2', [[2074, 9, 12], [2081, 2, 28], [2082, 2, 28]], 2328], ['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', [[2022, 8, 11], [2024, 2, 29], [2024, 2, 29]], 558], ['normal control 2', [[2002, 10, 28], [2005, 2, 28], [2005, 2, 28]], 840]], [['regression maturity identity comparison 1', [[2068, 9, 30], [2073, 2, 28], [2075, 2, 28]], 1590], ['regression maturity identity comparison 2', [[2049, 3, 31], [2055, 2, 28], [2056, 12, 28]], 2130], ['partial repair probe 1', [[2039, 8, 9], [2041, 2, 28], [2046, 2, 28]], 561], ['partial repair probe 2', [[2097, 2, 1], [2097, 2, 28], [2102, 2, 28]], 29], ['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', [[2100, 2, 28], [2100, 12, 31], [2103, 9, 30]], 300], ['normal control 2', [[2024, 5, 28], [2025, 11, 6], [2025, 11, 6]], 518]]]
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 identity comparison 111691171Failed
regression maturity identity comparison 2274276Failed
partial repair probe 1958960Failed
partial repair probe 2748750Failed
boundary control 1180180Passed
boundary control 2180180Passed
normal control 1930930Passed
normal control 2750750Passed

SHA-256 / 2648d4f8ed002a90bbe9bd6d2a0c09ad5e0ac30d724a28b387ea1bc98ade7fee

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.653636+00:00.

Case digest / b252ceb928c3362fc79e562022bebea8bc89ec449c855ac791f642045d742733