{"abstract":"Trades settling on the first ex-coupon day receive positive accrued interest.","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":"Widening the window by one extra day now marks the day before the window as ex-coupon.","family":"w2-bond_day_count_conventions-icma-regular-ex-coupon-ex-coupon-window-boundary","id":"FA-60896","implementations":{"attempt":{"sha256":"b0d5f3eb66a979f92560a291124c54d38fc818ef676030c84f7ebd1c69726445","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 + 1:\n        return round(-coupon * (Q - S).days / period, 6)\n    days = (S - P).days\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 ex-coupon window boundary 1', [[2053, 5, 28], [2053, 6, 28], [2053, 6, 25], 0.0625, 12, 3], -0.050403], ['regression ex-coupon window boundary 2', [[2012, 7, 31], [2012, 10, 31], [2012, 10, 21], 0.05, 4, 10], -0.13587], ['partial repair probe 1', [[2005, 7, 31], [2006, 7, 31], [2006, 7, 30], 0.0275, 1, 0], 2.742466], ['partial repair probe 2', [[2022, 7, 31], [2022, 8, 31], [2022, 8, 23], 0.04125, 12, 7], 0.25504], ['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, 1, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2059, 1, 30], [2059, 4, 30], [2059, 3, 16], 0.04125, 4, 0], 0.515625], ['normal control 2', [[2005, 12, 29], [2006, 12, 29], [2006, 2, 13], 0.0125, 1, 3], 0.157534]], [['regression ex-coupon window boundary 1', [[2043, 3, 31], [2043, 4, 30], [2043, 4, 25], 0.0625, 12, 5], -0.086806], ['regression ex-coupon window boundary 2', [[2010, 7, 5], [2010, 8, 5], [2010, 7, 29], 0.0275, 12, 7], -0.051747], ['partial repair probe 1', [[2012, 1, 31], [2012, 7, 31], [2012, 7, 27], 0.0625, 2, 3], 3.056319], ['partial repair probe 2', [[2040, 12, 31], [2041, 1, 31], [2041, 1, 30], 0.02, 12, 0], 0.16129], ['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, 1, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2005, 4, 9], [2005, 5, 9], [2005, 5, 8], 0.0625, 12, 7], -0.017361], ['normal control 2', [[2059, 5, 31], [2059, 6, 30], [2059, 6, 25], 0.0275, 12, 3], 0.190972]], [['regression ex-coupon window boundary 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['regression ex-coupon window boundary 2', [[2014, 10, 10], [2014, 11, 10], [2014, 11, 3], 0.0125, 12, 7], -0.023522], ['partial repair probe 1', [[2007, 8, 26], [2008, 2, 26], [2008, 2, 25], 0.0125, 2, 0], 0.621603], ['partial repair probe 2', [[2057, 6, 30], [2057, 7, 30], [2057, 7, 22], 0.07, 12, 7], 0.427778], ['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', [[2027, 5, 9], [2027, 6, 9], [2027, 6, 9], 0.035, 12, 7], 0.0], ['normal control 2', [[2052, 5, 31], [2052, 8, 31], [2052, 8, 30], 0.035, 4, 10], -0.009511]], [['regression ex-coupon window boundary 1', [[2029, 8, 8], [2029, 9, 8], [2029, 8, 29], 0.05, 12, 10], -0.134409], ['regression ex-coupon window boundary 2', [[2009, 4, 13], [2009, 7, 13], [2009, 7, 6], 0.02, 4, 7], -0.038462], ['partial repair probe 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 7], 0.05, 2, 7], 2.39011], ['partial repair probe 2', [[2020, 6, 28], [2020, 12, 28], [2020, 12, 22], 0.0125, 2, 5], 0.604508], ['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, 1, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2018, 2, 18], [2018, 3, 18], [2018, 3, 11], 0.0625, 12, 3], 0.390625], ['normal control 2', [[2033, 3, 9], [2033, 6, 9], [2033, 4, 3], 0.0125, 4, 7], 0.084918]], [['regression ex-coupon window boundary 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['regression ex-coupon window boundary 2', [[2057, 4, 30], [2057, 10, 30], [2057, 10, 20], 0.02, 2, 10], -0.054645], ['partial repair probe 1', [[2015, 7, 30], [2015, 10, 30], [2015, 10, 29], 0.0275, 4, 0], 0.680027], ['partial repair probe 2', [[2046, 11, 10], [2047, 5, 10], [2047, 5, 2], 0.0275, 2, 7], 1.314227], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 1, 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', [[2001, 2, 3], [2001, 3, 3], [2001, 2, 3], 0.0275, 12, 0], 0.0], ['normal control 2', [[2000, 10, 29], [2001, 10, 29], [2001, 9, 13], 0.05, 1, 7], 4.369863]]]\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":"108f1a0d8a13a414bebc778a16304cffc6e255f3001d7cfa1818d438999ea3f4","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(coupon * days / period, 6)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression ex-coupon window boundary 1', [[2053, 5, 28], [2053, 6, 28], [2053, 6, 25], 0.0625, 12, 3], -0.050403], ['regression ex-coupon window boundary 2', [[2012, 7, 31], [2012, 10, 31], [2012, 10, 21], 0.05, 4, 10], -0.13587], ['partial repair probe 1', [[2005, 7, 31], [2006, 7, 31], [2006, 7, 30], 0.0275, 1, 0], 2.742466], ['partial repair probe 2', [[2022, 7, 31], [2022, 8, 31], [2022, 8, 23], 0.04125, 12, 7], 0.25504], ['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, 1, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2059, 1, 30], [2059, 4, 30], [2059, 3, 16], 0.04125, 4, 0], 0.515625], ['normal control 2', [[2005, 12, 29], [2006, 12, 29], [2006, 2, 13], 0.0125, 1, 3], 0.157534]], [['regression ex-coupon window boundary 1', [[2043, 3, 31], [2043, 4, 30], [2043, 4, 25], 0.0625, 12, 5], -0.086806], ['regression ex-coupon window boundary 2', [[2010, 7, 5], [2010, 8, 5], [2010, 7, 29], 0.0275, 12, 7], -0.051747], ['partial repair probe 1', [[2012, 1, 31], [2012, 7, 31], [2012, 7, 27], 0.0625, 2, 3], 3.056319], ['partial repair probe 2', [[2040, 12, 31], [2041, 1, 31], [2041, 1, 30], 0.02, 12, 0], 0.16129], ['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, 1, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2005, 4, 9], [2005, 5, 9], [2005, 5, 8], 0.0625, 12, 7], -0.017361], ['normal control 2', [[2059, 5, 31], [2059, 6, 30], [2059, 6, 25], 0.0275, 12, 3], 0.190972]], [['regression ex-coupon window boundary 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['regression ex-coupon window boundary 2', [[2014, 10, 10], [2014, 11, 10], [2014, 11, 3], 0.0125, 12, 7], -0.023522], ['partial repair probe 1', [[2007, 8, 26], [2008, 2, 26], [2008, 2, 25], 0.0125, 2, 0], 0.621603], ['partial repair probe 2', [[2057, 6, 30], [2057, 7, 30], [2057, 7, 22], 0.07, 12, 7], 0.427778], ['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', [[2027, 5, 9], [2027, 6, 9], [2027, 6, 9], 0.035, 12, 7], 0.0], ['normal control 2', [[2052, 5, 31], [2052, 8, 31], [2052, 8, 30], 0.035, 4, 10], -0.009511]], [['regression ex-coupon window boundary 1', [[2029, 8, 8], [2029, 9, 8], [2029, 8, 29], 0.05, 12, 10], -0.134409], ['regression ex-coupon window boundary 2', [[2009, 4, 13], [2009, 7, 13], [2009, 7, 6], 0.02, 4, 7], -0.038462], ['partial repair probe 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 7], 0.05, 2, 7], 2.39011], ['partial repair probe 2', [[2020, 6, 28], [2020, 12, 28], [2020, 12, 22], 0.0125, 2, 5], 0.604508], ['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, 1, 15], 0.05, 2, 7], 0.0], ['normal control 1', [[2018, 2, 18], [2018, 3, 18], [2018, 3, 11], 0.0625, 12, 3], 0.390625], ['normal control 2', [[2033, 3, 9], [2033, 6, 9], [2033, 4, 3], 0.0125, 4, 7], 0.084918]], [['regression ex-coupon window boundary 1', [[2024, 1, 15], [2024, 7, 15], [2024, 7, 8], 0.05, 2, 7], -0.096154], ['regression ex-coupon window boundary 2', [[2057, 4, 30], [2057, 10, 30], [2057, 10, 20], 0.02, 2, 10], -0.054645], ['partial repair probe 1', [[2015, 7, 30], [2015, 10, 30], [2015, 10, 29], 0.0275, 4, 0], 0.680027], ['partial repair probe 2', [[2046, 11, 10], [2047, 5, 10], [2047, 5, 2], 0.0275, 2, 7], 1.314227], ['boundary control 1', [[2024, 1, 15], [2024, 7, 15], [2024, 1, 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', [[2001, 2, 3], [2001, 3, 3], [2001, 2, 3], 0.0275, 12, 0], 0.0], ['normal control 2', [[2000, 10, 29], [2001, 10, 29], [2001, 9, 13], 0.05, 1, 7], 4.369863]]]\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-ex-coupon-window-boundary","generated_at":"2026-09-29T14:46:49.972421+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 ex-coupon test uses a strict comparison with the ex-coupon day count.","sha256":"3e2c40f446cfcea3c00c16d496e26be085e37e7ea3f0c91a68b6948238a5c054","title":"ICMA regular-period accrued with ex-coupon: a settlement exactly exdays before the coupon is not ex-coupon · 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":46.311,"exit_code":1,"observations":[{"actual":-0.050403,"check":"regression ex-coupon window boundary 1","expected":-0.050403,"passed":true},{"actual":-0.13587,"check":"regression ex-coupon window boundary 2","expected":-0.13587,"passed":true},{"actual":-0.007534,"check":"partial repair probe 1","expected":2.742466,"passed":false},{"actual":-0.08871,"check":"partial repair probe 2","expected":0.25504,"passed":false},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":0.0,"check":"boundary control 2","expected":0.0,"passed":true},{"actual":0.515625,"check":"normal control 1","expected":0.515625,"passed":true},{"actual":0.157534,"check":"normal control 2","expected":0.157534,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression ex-coupon window boundary 1\", \"actual\": -0.050403, \"expected\": -0.050403, \"passed\": true}, {\"check\": \"regression ex-coupon window boundary 2\", \"actual\": -0.13587, \"expected\": -0.13587, \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": -0.007534, \"expected\": 2.742466, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": -0.08871, \"expected\": 0.25504, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0.515625, \"expected\": 0.515625, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.157534, \"expected\": 0.157534, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":47.356,"exit_code":1,"observations":[{"actual":0.47043,"check":"regression ex-coupon window boundary 1","expected":-0.050403,"passed":false},{"actual":1.11413,"check":"regression ex-coupon window boundary 2","expected":-0.13587,"passed":false},{"actual":2.742466,"check":"partial repair probe 1","expected":2.742466,"passed":true},{"actual":0.25504,"check":"partial repair probe 2","expected":0.25504,"passed":true},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":0.0,"check":"boundary control 2","expected":0.0,"passed":true},{"actual":0.515625,"check":"normal control 1","expected":0.515625,"passed":true},{"actual":0.157534,"check":"normal control 2","expected":0.157534,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression ex-coupon window boundary 1\", \"actual\": 0.47043, \"expected\": -0.050403, \"passed\": false}, {\"check\": \"regression ex-coupon window boundary 2\", \"actual\": 1.11413, \"expected\": -0.13587, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 2.742466, \"expected\": 2.742466, \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": 0.25504, \"expected\": 0.25504, \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 0.515625, \"expected\": 0.515625, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.157534, \"expected\": 0.157534, \"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."}}