{"abstract":"Every positive accrual is one day of coupon too high.","category":"Bond day-count conventions","checks":8,"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.","contract_signature":"prev, nxt, settle, rate, freq, exdays","evaluation_group":"w2-bond_day_count_conventions-icma-regular-ex-coupon","failed_approach":"Skipping the extra day only when settling on the coupon date keeps the error elsewhere.","family":"w2-bond_day_count_conventions-icma-regular-ex-coupon-accrual-day-inclusivity","id":"FA-60891","implementations":{"attempt":{"sha256":"cd38560581ae82ef0c3d00ac659a18bb791848bd32d0e94051a6d457ac455630","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(prev, nxt, settle, rate, freq, exdays):\n    P = datetime.date(*prev)\n    Q = datetime.date(*nxt)\n    S = datetime.date(*settle)\n    if not (P <= S <= Q):\n        return 'settlement outside period'\n    if S == Q:\n        return 0.0\n    period = (Q - P).days\n    coupon = 100 * rate / freq\n    if (Q - S).days <= exdays:\n        return round(-coupon * (Q - S).days / period, 6)\n    days = (S - P).days + (1 if S > P else 0)\n    return round(coupon * days / period, 6)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression accrual day inclusivity 1', [[2007, 5, 30], [2007, 8, 30], [2007, 8, 24], 0.05, 4, 3], 1.168478], ['regression accrual day inclusivity 2', [[2025, 3, 18], [2025, 9, 18], [2025, 7, 23], 0.04125, 2, 7], 1.423573], ['partial repair probe 1', [[2046, 7, 29], [2047, 1, 29], [2046, 8, 11], 0.04125, 2, 5], 0.14572], ['partial repair probe 2', [[2028, 5, 28], [2028, 8, 28], [2028, 8, 20], 0.07, 4, 7], 1.597826], ['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, 16], 0.05, 2, 7], 'settlement outside period'], ['normal control 1', [[2005, 4, 30], [2005, 10, 30], [2005, 10, 22], 0.04125, 2, 10], -0.090164], ['normal control 2', [[2017, 8, 15], [2018, 8, 15], [2018, 8, 8], 0.02, 1, 10], -0.038356]], [['regression accrual day inclusivity 1', [[2019, 11, 18], [2020, 5, 18], [2020, 1, 26], 0.0625, 2, 10], 1.184753], ['regression accrual day inclusivity 2', [[2042, 9, 26], [2043, 3, 26], [2043, 3, 21], 0.035, 2, 0], 1.701657], ['partial repair probe 1', [[2000, 1, 1], [2001, 1, 1], [2000, 5, 26], 0.035, 1, 0], 1.396175], ['partial repair probe 2', [[2004, 6, 27], [2005, 6, 27], [2004, 11, 1], 0.035, 1, 0], 1.217808], ['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, 7, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2026, 12, 31], [2027, 1, 31], [2027, 1, 27], 0.0275, 12, 7], -0.02957], ['normal control 2', [[2038, 11, 1], [2039, 11, 1], [2039, 11, 1], 0.035, 1, 3], 0.0]], [['regression accrual day inclusivity 1', [[2016, 4, 30], [2016, 10, 30], [2016, 8, 20], 0.02, 2, 0], 0.612022], ['regression accrual day inclusivity 2', [[2056, 11, 30], [2057, 5, 30], [2056, 12, 3], 0.0625, 2, 5], 0.051796], ['partial repair probe 1', [[2005, 11, 16], [2006, 11, 16], [2006, 5, 30], 0.02, 1, 0], 1.068493], ['partial repair probe 2', [[2056, 4, 28], [2056, 10, 28], [2056, 9, 28], 0.0125, 2, 0], 0.522541], ['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', [[2006, 3, 1], [2007, 3, 1], [2007, 3, 1], 0.02, 1, 5], 0.0], ['normal control 2', [[2000, 11, 25], [2001, 2, 25], [2001, 2, 19], 0.0275, 4, 7], -0.044837]], [['regression accrual day inclusivity 1', [[2019, 8, 11], [2019, 9, 11], [2019, 8, 14], 0.0625, 12, 0], 0.050403], ['regression accrual day inclusivity 2', [[2003, 4, 28], [2003, 7, 28], [2003, 7, 21], 0.035, 4, 0], 0.807692], ['partial repair probe 1', [[2056, 5, 30], [2056, 6, 30], [2056, 6, 18], 0.05, 12, 10], 0.255376], ['partial repair probe 2', [[2017, 11, 30], [2018, 5, 30], [2018, 4, 27], 0.02, 2, 7], 0.81768], ['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, 7, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2004, 8, 24], [2004, 9, 24], [2004, 9, 24], 0.07, 12, 3], 0.0], ['normal control 2', [[2006, 2, 28], [2006, 3, 28], [2006, 3, 22], 0.0275, 12, 10], -0.049107]], [['regression accrual day inclusivity 1', [[2049, 12, 4], [2050, 3, 4], [2049, 12, 4], 0.02, 4, 7], 0.0], ['regression accrual day inclusivity 2', [[2039, 1, 26], [2039, 4, 26], [2039, 3, 14], 0.0275, 4, 0], 0.359028], ['partial repair probe 1', [[2045, 3, 26], [2046, 3, 26], [2045, 9, 3], 0.0125, 1, 0], 0.55137], ['partial repair probe 2', [[2032, 10, 24], [2033, 1, 24], [2032, 12, 25], 0.02, 4, 5], 0.336957], ['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, 16], 0.05, 2, 7], 'settlement outside period'], ['normal control 1', [[2033, 11, 1], [2034, 2, 1], [2034, 1, 29], 0.035, 4, 10], -0.028533], ['normal control 2', [[2054, 6, 1], [2054, 7, 1], [2054, 6, 24], 0.0125, 12, 10], -0.024306]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"899b4216076258bbe0f6c3f3bd76d6a987910b08df0aaf73e0601f3a857c3522","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(prev, nxt, settle, rate, freq, exdays):\n    P = datetime.date(*prev)\n    Q = datetime.date(*nxt)\n    S = datetime.date(*settle)\n    if not (P <= S <= Q):\n        return 'settlement outside period'\n    if S == Q:\n        return 0.0\n    period = (Q - P).days\n    coupon = 100 * rate / freq\n    if (Q - S).days <= exdays:\n        return round(-coupon * (Q - S).days / period, 6)\n    days = (S - P).days + 1\n    return round(coupon * days / period, 6)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression accrual day inclusivity 1', [[2007, 5, 30], [2007, 8, 30], [2007, 8, 24], 0.05, 4, 3], 1.168478], ['regression accrual day inclusivity 2', [[2025, 3, 18], [2025, 9, 18], [2025, 7, 23], 0.04125, 2, 7], 1.423573], ['partial repair probe 1', [[2046, 7, 29], [2047, 1, 29], [2046, 8, 11], 0.04125, 2, 5], 0.14572], ['partial repair probe 2', [[2028, 5, 28], [2028, 8, 28], [2028, 8, 20], 0.07, 4, 7], 1.597826], ['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, 16], 0.05, 2, 7], 'settlement outside period'], ['normal control 1', [[2005, 4, 30], [2005, 10, 30], [2005, 10, 22], 0.04125, 2, 10], -0.090164], ['normal control 2', [[2017, 8, 15], [2018, 8, 15], [2018, 8, 8], 0.02, 1, 10], -0.038356]], [['regression accrual day inclusivity 1', [[2019, 11, 18], [2020, 5, 18], [2020, 1, 26], 0.0625, 2, 10], 1.184753], ['regression accrual day inclusivity 2', [[2042, 9, 26], [2043, 3, 26], [2043, 3, 21], 0.035, 2, 0], 1.701657], ['partial repair probe 1', [[2000, 1, 1], [2001, 1, 1], [2000, 5, 26], 0.035, 1, 0], 1.396175], ['partial repair probe 2', [[2004, 6, 27], [2005, 6, 27], [2004, 11, 1], 0.035, 1, 0], 1.217808], ['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, 7, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2026, 12, 31], [2027, 1, 31], [2027, 1, 27], 0.0275, 12, 7], -0.02957], ['normal control 2', [[2038, 11, 1], [2039, 11, 1], [2039, 11, 1], 0.035, 1, 3], 0.0]], [['regression accrual day inclusivity 1', [[2016, 4, 30], [2016, 10, 30], [2016, 8, 20], 0.02, 2, 0], 0.612022], ['regression accrual day inclusivity 2', [[2056, 11, 30], [2057, 5, 30], [2056, 12, 3], 0.0625, 2, 5], 0.051796], ['partial repair probe 1', [[2005, 11, 16], [2006, 11, 16], [2006, 5, 30], 0.02, 1, 0], 1.068493], ['partial repair probe 2', [[2056, 4, 28], [2056, 10, 28], [2056, 9, 28], 0.0125, 2, 0], 0.522541], ['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', [[2006, 3, 1], [2007, 3, 1], [2007, 3, 1], 0.02, 1, 5], 0.0], ['normal control 2', [[2000, 11, 25], [2001, 2, 25], [2001, 2, 19], 0.0275, 4, 7], -0.044837]], [['regression accrual day inclusivity 1', [[2019, 8, 11], [2019, 9, 11], [2019, 8, 14], 0.0625, 12, 0], 0.050403], ['regression accrual day inclusivity 2', [[2003, 4, 28], [2003, 7, 28], [2003, 7, 21], 0.035, 4, 0], 0.807692], ['partial repair probe 1', [[2056, 5, 30], [2056, 6, 30], [2056, 6, 18], 0.05, 12, 10], 0.255376], ['partial repair probe 2', [[2017, 11, 30], [2018, 5, 30], [2018, 4, 27], 0.02, 2, 7], 0.81768], ['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, 7, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2004, 8, 24], [2004, 9, 24], [2004, 9, 24], 0.07, 12, 3], 0.0], ['normal control 2', [[2006, 2, 28], [2006, 3, 28], [2006, 3, 22], 0.0275, 12, 10], -0.049107]], [['regression accrual day inclusivity 1', [[2049, 12, 4], [2050, 3, 4], [2049, 12, 4], 0.02, 4, 7], 0.0], ['regression accrual day inclusivity 2', [[2039, 1, 26], [2039, 4, 26], [2039, 3, 14], 0.0275, 4, 0], 0.359028], ['partial repair probe 1', [[2045, 3, 26], [2046, 3, 26], [2045, 9, 3], 0.0125, 1, 0], 0.55137], ['partial repair probe 2', [[2032, 10, 24], [2033, 1, 24], [2032, 12, 25], 0.02, 4, 5], 0.336957], ['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, 16], 0.05, 2, 7], 'settlement outside period'], ['normal control 1', [[2033, 11, 1], [2034, 2, 1], [2034, 1, 29], 0.035, 4, 10], -0.028533], ['normal control 2', [[2054, 6, 1], [2054, 7, 1], [2054, 6, 24], 0.0125, 12, 10], -0.024306]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-bond_day_count_conventions-icma-regular-ex-coupon-accrual-day-inclusivity","generated_at":"2026-09-29T14:46:49.918239+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Bond accrual and pricing systems depend on exact day-count arithmetic; a single-day error changes settlement cash.","root_cause":"The accrued day count adds one to include both endpoints.","sha256":"d89ddc4ae129622c57ab529af821e1cf1061f516dc1b52e08e1b8e0e26b65e29","title":"ICMA regular-period accrued with ex-coupon: the settlement day is counted as an accrued day · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":43.999,"exit_code":1,"observations":[{"actual":1.182065,"check":"regression accrual day inclusivity 1","expected":1.168478,"passed":false},{"actual":1.434783,"check":"regression accrual day inclusivity 2","expected":1.423573,"passed":false},{"actual":0.156929,"check":"partial repair probe 1","expected":0.14572,"passed":false},{"actual":1.616848,"check":"partial repair probe 2","expected":1.597826,"passed":false},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":"settlement outside period","check":"boundary control 2","expected":"settlement outside period","passed":true},{"actual":-0.090164,"check":"normal control 1","expected":-0.090164,"passed":true},{"actual":-0.038356,"check":"normal control 2","expected":-0.038356,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression accrual day inclusivity 1\", \"actual\": 1.182065, \"expected\": 1.168478, \"passed\": false}, {\"check\": \"regression accrual day inclusivity 2\", \"actual\": 1.434783, \"expected\": 1.423573, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 0.156929, \"expected\": 0.14572, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 1.616848, \"expected\": 1.597826, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": \"settlement outside period\", \"expected\": \"settlement outside period\", \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": -0.090164, \"expected\": -0.090164, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": -0.038356, \"expected\": -0.038356, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.215,"exit_code":1,"observations":[{"actual":1.182065,"check":"regression accrual day inclusivity 1","expected":1.168478,"passed":false},{"actual":1.434783,"check":"regression accrual day inclusivity 2","expected":1.423573,"passed":false},{"actual":0.156929,"check":"partial repair probe 1","expected":0.14572,"passed":false},{"actual":1.616848,"check":"partial repair probe 2","expected":1.597826,"passed":false},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":"settlement outside period","check":"boundary control 2","expected":"settlement outside period","passed":true},{"actual":-0.090164,"check":"normal control 1","expected":-0.090164,"passed":true},{"actual":-0.038356,"check":"normal control 2","expected":-0.038356,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression accrual day inclusivity 1\", \"actual\": 1.182065, \"expected\": 1.168478, \"passed\": false}, {\"check\": \"regression accrual day inclusivity 2\", \"actual\": 1.434783, \"expected\": 1.423573, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 0.156929, \"expected\": 0.14572, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 1.616848, \"expected\": 1.597826, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": \"settlement outside period\", \"expected\": \"settlement outside period\", \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": -0.090164, \"expected\": -0.090164, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": -0.038356, \"expected\": -0.038356, \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}