{"abstract":"Accrued interest differs in the last decimals for long accrual periods.","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":"Rounding the daily rate to 8 decimals shrinks but does not remove the drift.","family":"w2-bond_day_count_conventions-icma-regular-ex-coupon-daily-rate-rounding-stage","id":"FA-60906","implementations":{"attempt":{"sha256":"2f04b8d49eebc9f2493c59ea5bd4685e976b26076437774303ac211f95664ba5","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\n    return round(round(coupon / period, 8) * days, 6)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['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]]]\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":"6e0f42f48f78ce4887c39980066f27a145303df0162818b500fed9ccc6456445","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\n    return round(round(coupon / period, 6) * days, 6)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['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]]]\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-daily-rate-rounding-stage","generated_at":"2026-09-29T14:46:49.973271+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":"Rounding is applied to the daily coupon rate instead of the final accrued amount.","sha256":"5e918db5d75946f654d71bca97a66ec993a10ce6d0eafa5169ce3b2de26a4674","title":"ICMA regular-period accrued with ex-coupon: the per-day coupon is rounded before multiplying by days · 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":44.667,"exit_code":1,"observations":[{"actual":1.851223,"check":"regression daily rate rounding stage 1","expected":1.851223,"passed":true},{"actual":1.117808,"check":"regression daily rate rounding stage 2","expected":1.117808,"passed":true},{"actual":0.472528,"check":"partial repair probe 1","expected":0.472527,"passed":false},{"actual":1.154892,"check":"partial repair probe 2","expected":1.154891,"passed":false},{"actual":"settlement outside period","check":"boundary control 1","expected":"settlement outside period","passed":true},{"actual":-0.096154,"check":"boundary control 2","expected":-0.096154,"passed":true},{"actual":-0.01105,"check":"normal control 1","expected":-0.01105,"passed":true},{"actual":0.0,"check":"normal control 2","expected":0.0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression daily rate rounding stage 1\", \"actual\": 1.851223, \"expected\": 1.851223, \"passed\": true}, {\"check\": \"regression daily rate rounding stage 2\", \"actual\": 1.117808, \"expected\": 1.117808, \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": 0.472528, \"expected\": 0.472527, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 1.154892, \"expected\": 1.154891, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": \"settlement outside period\", \"expected\": \"settlement outside period\", \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": -0.096154, \"expected\": -0.096154, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": -0.01105, \"expected\": -0.01105, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.103,"exit_code":1,"observations":[{"actual":1.851256,"check":"regression daily rate rounding stage 1","expected":1.851223,"passed":false},{"actual":1.117716,"check":"regression daily rate rounding stage 2","expected":1.117808,"passed":false},{"actual":0.47257,"check":"partial repair probe 1","expected":0.472527,"passed":false},{"actual":1.154912,"check":"partial repair probe 2","expected":1.154891,"passed":false},{"actual":"settlement outside period","check":"boundary control 1","expected":"settlement outside period","passed":true},{"actual":-0.096154,"check":"boundary control 2","expected":-0.096154,"passed":true},{"actual":-0.01105,"check":"normal control 1","expected":-0.01105,"passed":true},{"actual":0.0,"check":"normal control 2","expected":0.0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression daily rate rounding stage 1\", \"actual\": 1.851256, \"expected\": 1.851223, \"passed\": false}, {\"check\": \"regression daily rate rounding stage 2\", \"actual\": 1.117716, \"expected\": 1.117808, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 0.47257, \"expected\": 0.472527, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 1.154912, \"expected\": 1.154891, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": \"settlement outside period\", \"expected\": \"settlement outside period\", \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": -0.096154, \"expected\": -0.096154, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": -0.01105, \"expected\": -0.01105, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.0, \"expected\": 0.0, \"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."}}