FA-60906 / Bond day-count conventions / Open access
ICMA regular-period accrued with ex-coupon: the per-day coupon is rounded before multiplying by days · case 01
Accrued interest differs in the last decimals for long accrual periods.
ROOT CAUSE
Rounding is applied to the daily coupon rate instead of the final accrued amount.
THE FAILURE
Rounding is applied to the daily coupon rate instead of the final accrued amount.
Unsuccessful approach: Rounding the daily rate to 8 decimals shrinks but does not remove the drift.
Case contract
Inputs prev, nxt, settle ([y,m,d]), annual rate, frequency and ex-coupon days. Settlement outside [prev, nxt] returns "settlement outside period"; settlement on nxt returns 0.0. If the settlement is within ex-coupon days of nxt (days to nxt <= exdays), accrued is negative: -coupon*days(settle,nxt)/days(prev,nxt). Otherwise accrued = coupon*days(prev,settle)/days(prev,nxt). coupon=100*rate/freq; round the final value to 6 decimals.
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
import datetime
from fractions import Fraction
N = 1
observations = []
def solve(prev, nxt, settle, rate, freq, exdays):
P = datetime.date(*prev)
Q = datetime.date(*nxt)
S = datetime.date(*settle)
if not (P <= S <= Q):
return 'settlement outside period'
if S == Q:
return 0.0
period = (Q - P).days
coupon = 100 * rate / freq
if (Q - S).days <= exdays:
return round(-coupon * (Q - S).days / period, 6)
days = (S - P).days
return round(round(coupon / period, 6) * days, 6)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression daily rate rounding stage 1', [[2019, 7, 31], [2020, 1, 31], [2019, 11, 17], 0.0625, 2, 5], 1.851223], ['regression daily rate rounding stage 2', [[2060, 6, 3], [2061, 6, 3], [2060, 12, 24], 0.02, 1, 0], 1.117808], ['partial repair probe 1', [[2030, 9, 16], [2030, 12, 16], [2030, 12, 11], 0.02, 4, 0], 0.472527], ['partial repair probe 2', [[2049, 3, 10], [2049, 9, 10], [2049, 5, 17], 0.0625, 2, 3], 1.154891], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 16], 0.05, 2, 7], 'settlement outside period'], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['normal control 1', [[2042, 11, 16], [2043, 5, 16], [2043, 5, 14], 0.02, 2, 5], -0.01105], ['normal control 2', [[2027, 1, 25], [2027, 7, 25], [2027, 7, 25], 0.0625, 2, 0], 0.0]], [['regression daily rate rounding stage 1', [[2050, 11, 30], [2050, 12, 30], [2050, 12, 18], 0.04125, 12, 7], 0.20625], ['regression daily rate rounding stage 2', [[2030, 5, 27], [2031, 5, 27], [2030, 12, 17], 0.0275, 1, 0], 1.536986], ['partial repair probe 1', [[2003, 7, 29], [2004, 1, 29], [2003, 12, 3], 0.0625, 2, 3], 2.156929], ['partial repair probe 2', [[2035, 12, 26], [2036, 12, 26], [2036, 12, 16], 0.07, 1, 0], 6.808743], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2024, 1, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2038, 2, 5], [2038, 5, 5], [2038, 5, 3], 0.02, 4, 7], -0.011236], ['normal control 2', [[2032, 2, 27], [2032, 3, 27], [2032, 2, 27], 0.0275, 12, 0], 0.0]], [['regression daily rate rounding stage 1', [[2003, 1, 22], [2003, 4, 22], [2003, 3, 31], 0.05, 4, 0], 0.944444], ['regression daily rate rounding stage 2', [[2034, 9, 16], [2034, 12, 16], [2034, 11, 25], 0.0625, 4, 0], 1.201923], ['partial repair probe 1', [[2006, 5, 15], [2006, 11, 15], [2006, 7, 16], 0.02, 2, 10], 0.336957], ['partial repair probe 2', [[2033, 4, 30], [2033, 7, 30], [2033, 7, 27], 0.035, 4, 0], 0.846154], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 16], 0.05, 2, 7], 'settlement outside period'], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2024, 1, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2039, 6, 30], [2039, 9, 30], [2039, 6, 30], 0.035, 4, 7], 0.0], ['normal control 2', [[2041, 9, 27], [2042, 3, 27], [2041, 9, 27], 0.05, 2, 7], 0.0]], [['regression daily rate rounding stage 1', [[2050, 9, 30], [2051, 9, 30], [2051, 2, 13], 0.07, 1, 10], 2.608219], ['regression daily rate rounding stage 2', [[2028, 7, 30], [2029, 1, 30], [2028, 9, 6], 0.0125, 2, 7], 0.129076], ['partial repair probe 1', [[2027, 11, 15], [2028, 5, 15], [2028, 5, 13], 0.04125, 2, 0], 2.039835], ['partial repair probe 2', [[2000, 8, 24], [2001, 8, 24], [2001, 8, 20], 0.02, 1, 0], 1.978082], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 15], 0.05, 2, 7], 0.0], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['normal control 1', [[2032, 12, 2], [2033, 1, 2], [2033, 1, 2], 0.0275, 12, 10], 0.0], ['normal control 2', [[2041, 9, 30], [2042, 9, 30], [2041, 9, 30], 0.02, 1, 0], 0.0]], [['regression daily rate rounding stage 1', [[2021, 12, 4], [2022, 3, 4], [2022, 2, 26], 0.02, 4, 0], 0.466667], ['regression daily rate rounding stage 2', [[2015, 5, 19], [2015, 11, 19], [2015, 11, 11], 0.02, 2, 7], 0.956522], ['partial repair probe 1', [[2042, 9, 20], [2042, 12, 20], [2042, 11, 10], 0.0125, 4, 0], 0.175137], ['partial repair probe 2', [[2033, 12, 31], [2034, 12, 31], [2034, 12, 22], 0.02, 1, 0], 1.950685], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 16], 0.05, 2, 7], 'settlement outside period'], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['normal control 1', [[2039, 1, 31], [2039, 7, 31], [2039, 2, 16], 0.07, 2, 5], 0.309392], ['normal control 2', [[2051, 11, 14], [2051, 12, 14], [2051, 12, 10], 0.0275, 12, 5], -0.030556]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression daily rate rounding stage 1 | 1.851256 | 1.851223 | Failed |
| regression daily rate rounding stage 2 | 1.117716 | 1.117808 | Failed |
| partial repair probe 1 | 0.47257 | 0.472527 | Failed |
| partial repair probe 2 | 1.154912 | 1.154891 | Failed |
| boundary control 1 | settlement outside period | settlement outside period | Passed |
| boundary control 2 | -0.096154 | -0.096154 | Passed |
| normal control 1 | -0.01105 | -0.01105 | Passed |
| normal control 2 | 0.0 | 0.0 | Passed |
SHA-256 / 6e0f42f48f78ce4887c39980066f27a145303df0162818b500fed9ccc6456445
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
from fractions import Fraction
N = 1
observations = []
def solve(prev, nxt, settle, rate, freq, exdays):
P = datetime.date(*prev)
Q = datetime.date(*nxt)
S = datetime.date(*settle)
if not (P <= S <= Q):
return 'settlement outside period'
if S == Q:
return 0.0
period = (Q - P).days
coupon = 100 * rate / freq
if (Q - S).days <= exdays:
return round(-coupon * (Q - S).days / period, 6)
days = (S - P).days
return round(round(coupon / period, 8) * days, 6)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression daily rate rounding stage 1', [[2019, 7, 31], [2020, 1, 31], [2019, 11, 17], 0.0625, 2, 5], 1.851223], ['regression daily rate rounding stage 2', [[2060, 6, 3], [2061, 6, 3], [2060, 12, 24], 0.02, 1, 0], 1.117808], ['partial repair probe 1', [[2030, 9, 16], [2030, 12, 16], [2030, 12, 11], 0.02, 4, 0], 0.472527], ['partial repair probe 2', [[2049, 3, 10], [2049, 9, 10], [2049, 5, 17], 0.0625, 2, 3], 1.154891], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 16], 0.05, 2, 7], 'settlement outside period'], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['normal control 1', [[2042, 11, 16], [2043, 5, 16], [2043, 5, 14], 0.02, 2, 5], -0.01105], ['normal control 2', [[2027, 1, 25], [2027, 7, 25], [2027, 7, 25], 0.0625, 2, 0], 0.0]], [['regression daily rate rounding stage 1', [[2050, 11, 30], [2050, 12, 30], [2050, 12, 18], 0.04125, 12, 7], 0.20625], ['regression daily rate rounding stage 2', [[2030, 5, 27], [2031, 5, 27], [2030, 12, 17], 0.0275, 1, 0], 1.536986], ['partial repair probe 1', [[2003, 7, 29], [2004, 1, 29], [2003, 12, 3], 0.0625, 2, 3], 2.156929], ['partial repair probe 2', [[2035, 12, 26], [2036, 12, 26], [2036, 12, 16], 0.07, 1, 0], 6.808743], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2024, 1, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2038, 2, 5], [2038, 5, 5], [2038, 5, 3], 0.02, 4, 7], -0.011236], ['normal control 2', [[2032, 2, 27], [2032, 3, 27], [2032, 2, 27], 0.0275, 12, 0], 0.0]], [['regression daily rate rounding stage 1', [[2003, 1, 22], [2003, 4, 22], [2003, 3, 31], 0.05, 4, 0], 0.944444], ['regression daily rate rounding stage 2', [[2034, 9, 16], [2034, 12, 16], [2034, 11, 25], 0.0625, 4, 0], 1.201923], ['partial repair probe 1', [[2006, 5, 15], [2006, 11, 15], [2006, 7, 16], 0.02, 2, 10], 0.336957], ['partial repair probe 2', [[2033, 4, 30], [2033, 7, 30], [2033, 7, 27], 0.035, 4, 0], 0.846154], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 16], 0.05, 2, 7], 'settlement outside period'], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2024, 1, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2039, 6, 30], [2039, 9, 30], [2039, 6, 30], 0.035, 4, 7], 0.0], ['normal control 2', [[2041, 9, 27], [2042, 3, 27], [2041, 9, 27], 0.05, 2, 7], 0.0]], [['regression daily rate rounding stage 1', [[2050, 9, 30], [2051, 9, 30], [2051, 2, 13], 0.07, 1, 10], 2.608219], ['regression daily rate rounding stage 2', [[2028, 7, 30], [2029, 1, 30], [2028, 9, 6], 0.0125, 2, 7], 0.129076], ['partial repair probe 1', [[2027, 11, 15], [2028, 5, 15], [2028, 5, 13], 0.04125, 2, 0], 2.039835], ['partial repair probe 2', [[2000, 8, 24], [2001, 8, 24], [2001, 8, 20], 0.02, 1, 0], 1.978082], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 15], 0.05, 2, 7], 0.0], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['normal control 1', [[2032, 12, 2], [2033, 1, 2], [2033, 1, 2], 0.0275, 12, 10], 0.0], ['normal control 2', [[2041, 9, 30], [2042, 9, 30], [2041, 9, 30], 0.02, 1, 0], 0.0]], [['regression daily rate rounding stage 1', [[2021, 12, 4], [2022, 3, 4], [2022, 2, 26], 0.02, 4, 0], 0.466667], ['regression daily rate rounding stage 2', [[2015, 5, 19], [2015, 11, 19], [2015, 11, 11], 0.02, 2, 7], 0.956522], ['partial repair probe 1', [[2042, 9, 20], [2042, 12, 20], [2042, 11, 10], 0.0125, 4, 0], 0.175137], ['partial repair probe 2', [[2033, 12, 31], [2034, 12, 31], [2034, 12, 22], 0.02, 1, 0], 1.950685], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 16], 0.05, 2, 7], 'settlement outside period'], ['boundary control 2', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['normal control 1', [[2039, 1, 31], [2039, 7, 31], [2039, 2, 16], 0.07, 2, 5], 0.309392], ['normal control 2', [[2051, 11, 14], [2051, 12, 14], [2051, 12, 10], 0.0275, 12, 5], -0.030556]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression daily rate rounding stage 1 | 1.851223 | 1.851223 | Passed |
| regression daily rate rounding stage 2 | 1.117808 | 1.117808 | Passed |
| partial repair probe 1 | 0.472528 | 0.472527 | Failed |
| partial repair probe 2 | 1.154892 | 1.154891 | Failed |
| boundary control 1 | settlement outside period | settlement outside period | Passed |
| boundary control 2 | -0.096154 | -0.096154 | Passed |
| normal control 1 | -0.01105 | -0.01105 | Passed |
| normal control 2 | 0.0 | 0.0 | Passed |
SHA-256 / 2f04b8d49eebc9f2493c59ea5bd4685e976b26076437774303ac211f95664ba5
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.973271+00:00.
Case digest / 5e918db5d75946f654d71bca97a66ec993a10ce6d0eafa5169ce3b2de26a4674