{"abstract":"The final coupon of a long last period is too large by the day-count mismatch of the extension.","category":"Bond day-count conventions","checks":8,"contract":"Inputs the last regular coupon date prev, maturity (prev < maturity <= prev + 2 periods), months per period and annual rate. Quasi dates are prev shifted forward k*months with the prev day clamped to month length. c = 100*rate/freq. Short final period (maturity <= q1): c*days(prev,mat)/days(prev,q1). Long final period: c*(1 + days(q1,mat)/days(q1,q2)). Round to 6 decimals.","contract_signature":"prev, maturity, months, rate","evaluation_group":"w2-bond_day_count_conventions-final-stub-coupon","failed_approach":"Scaling days over two notional periods by two ignores their differing lengths.","family":"w2-bond_day_count_conventions-final-stub-coupon-long-stub-single-fraction","id":"FA-61226","implementations":{"attempt":{"sha256":"6d61c55a218358f1c7ae02acd4b4cea475e4d99269fadf9656d0b2bb79081bfb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(prev, maturity, months, rate):\n    def mlen(y, m):\n        if m == 2:\n            return 29 if (y % 4 == 0 and y % 100 != 0) or y % 400 == 0 else 28\n        return 30 if m in (4, 6, 9, 11) else 31\n    P = datetime.date(*prev)\n    M = datetime.date(*maturity)\n    freq = 12 // months\n    def fwd(k):\n        t = P.year * 12 + P.month - 1 + k * months\n        y, m = t // 12, t % 12 + 1\n        return datetime.date(y, m, min(P.day, mlen(y, m)))\n    c = 100 * Fraction(str(rate)) / freq\n    q1 = fwd(1)\n    if M <= q1:\n        frac = Fraction((M - P).days, (q1 - P).days)\n    else:\n        q2 = fwd(2)\n        frac = Fraction((M - P).days, (q2 - P).days) * 2\n    return round(float(c * frac), 6)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression long stub single fraction 1', [[2035, 6, 25], [2037, 5, 16], 12, 0.05], 9.452055], ['regression long stub single fraction 2', [[2013, 7, 11], [2014, 5, 2], 6, 0.045], 3.629834], ['partial repair probe 1', [[2005, 2, 20], [2006, 2, 13], 6, 0.05], 4.904891], ['partial repair probe 2', [[2040, 1, 21], [2040, 2, 28], 1, 0.05], 0.517241], ['boundary control 1', [[2024, 1, 31], [2024, 7, 31], 6, 0.05], 2.5], ['boundary control 2', [[2024, 1, 31], [2024, 4, 30], 6, 0.05], 1.236264], ['normal control 1', [[2008, 9, 30], [2008, 12, 30], 3, 0.0725], 1.8125], ['normal control 2', [[2025, 9, 27], [2025, 10, 9], 3, 0.03], 0.098901]], [['regression long stub single fraction 1', [[2038, 10, 31], [2039, 10, 28], 6, 0.05], 4.959239], ['regression long stub single fraction 2', [[2025, 11, 30], [2026, 1, 20], 1, 0.045], 0.629032], ['partial repair probe 1', [[2041, 2, 27], [2041, 6, 6], 3, 0.045], 1.247283], ['partial repair probe 2', [[2030, 7, 31], [2031, 10, 5], 12, 0.045], 5.311475], ['boundary control 1', [[2024, 1, 31], [2024, 7, 31], 6, 0.05], 2.5], ['boundary control 2', [[2024, 1, 31], [2024, 4, 30], 6, 0.05], 1.236264], ['normal control 1', [[2024, 9, 16], [2025, 1, 19], 6, 0.0725], 2.503453], ['normal control 2', [[2014, 9, 6], [2014, 9, 25], 6, 0.045], 0.236188]], [['regression long stub single fraction 1', [[2022, 4, 15], [2022, 5, 30], 1, 0.045], 0.556452], ['regression long stub single fraction 2', [[2013, 8, 31], [2014, 4, 8], 6, 0.0725], 4.393342], ['partial repair probe 1', [[2014, 3, 31], [2015, 2, 11], 6, 0.0725], 6.293956], ['partial repair probe 2', [[2033, 12, 30], [2034, 11, 30], 6, 0.045], 4.131148], ['boundary control 1', [[2024, 1, 31], [2024, 4, 30], 6, 0.05], 1.236264], ['boundary control 2', [[2024, 1, 31], [2024, 7, 31], 6, 0.05], 2.5], ['normal control 1', [[2034, 2, 20], [2034, 5, 6], 6, 0.045], 0.93232], ['normal control 2', [[2024, 7, 29], [2024, 10, 3], 6, 0.0725], 1.300272]], [['regression long stub single fraction 1', [[2021, 3, 9], [2022, 3, 8], 6, 0.045], 4.487569], ['regression long stub single fraction 2', [[2039, 11, 25], [2040, 10, 27], 6, 0.045], 4.14538], ['partial repair probe 1', [[2042, 4, 1], [2042, 7, 18], 3, 0.0725], 2.147418], ['partial repair probe 2', [[2028, 1, 17], [2028, 9, 11], 6, 0.045], 2.934783], ['boundary control 1', [[2024, 1, 31], [2024, 7, 31], 6, 0.05], 2.5], ['boundary control 2', [[2024, 1, 31], [2024, 4, 30], 6, 0.05], 1.236264], ['normal control 1', [[2014, 8, 7], [2015, 1, 10], 6, 0.0725], 3.07337], ['normal control 2', [[2037, 6, 29], [2037, 8, 31], 3, 0.045], 0.77038]], [['regression long stub single fraction 1', [[2028, 2, 29], [2028, 8, 29], 3, 0.0725], 3.625], ['regression long stub single fraction 2', [[2027, 4, 28], [2027, 9, 25], 3, 0.045], 1.846467], ['partial repair probe 1', [[2023, 10, 31], [2025, 9, 7], 12, 0.0725], 13.427397], ['partial repair probe 2', [[2030, 9, 30], [2031, 5, 15], 6, 0.05], 3.125], ['boundary control 1', [[2024, 1, 31], [2024, 4, 30], 6, 0.05], 1.236264], ['boundary control 2', [[2024, 1, 31], [2024, 7, 31], 6, 0.05], 2.5], ['normal control 1', [[2005, 3, 31], [2005, 7, 28], 12, 0.0725], 2.363699], ['normal control 2', [[2036, 3, 31], [2037, 12, 28], 12, 0.03], 5.235616]]]\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":"cdebbb548da9c16e40d4f57029c21fef64e8aba87309e2245998eeae0e494810","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(prev, maturity, months, rate):\n    def mlen(y, m):\n        if m == 2:\n            return 29 if (y % 4 == 0 and y % 100 != 0) or y % 400 == 0 else 28\n        return 30 if m in (4, 6, 9, 11) else 31\n    P = datetime.date(*prev)\n    M = datetime.date(*maturity)\n    freq = 12 // months\n    def fwd(k):\n        t = P.year * 12 + P.month - 1 + k * months\n        y, m = t // 12, t % 12 + 1\n        return datetime.date(y, m, min(P.day, mlen(y, m)))\n    c = 100 * Fraction(str(rate)) / freq\n    q1 = fwd(1)\n    if M <= q1:\n        frac = Fraction((M - P).days, (q1 - P).days)\n    else:\n        q2 = fwd(2)\n        frac = Fraction((M - P).days, (q1 - P).days)\n    return round(float(c * frac), 6)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression long stub single fraction 1', [[2035, 6, 25], [2037, 5, 16], 12, 0.05], 9.452055], ['regression long stub single fraction 2', [[2013, 7, 11], [2014, 5, 2], 6, 0.045], 3.629834], ['partial repair probe 1', [[2005, 2, 20], [2006, 2, 13], 6, 0.05], 4.904891], ['partial repair probe 2', [[2040, 1, 21], [2040, 2, 28], 1, 0.05], 0.517241], ['boundary control 1', [[2024, 1, 31], [2024, 7, 31], 6, 0.05], 2.5], ['boundary control 2', [[2024, 1, 31], [2024, 4, 30], 6, 0.05], 1.236264], ['normal control 1', [[2008, 9, 30], [2008, 12, 30], 3, 0.0725], 1.8125], ['normal control 2', [[2025, 9, 27], [2025, 10, 9], 3, 0.03], 0.098901]], [['regression long stub single fraction 1', [[2038, 10, 31], [2039, 10, 28], 6, 0.05], 4.959239], ['regression long stub single fraction 2', [[2025, 11, 30], [2026, 1, 20], 1, 0.045], 0.629032], ['partial repair probe 1', [[2041, 2, 27], [2041, 6, 6], 3, 0.045], 1.247283], ['partial repair probe 2', [[2030, 7, 31], [2031, 10, 5], 12, 0.045], 5.311475], ['boundary control 1', [[2024, 1, 31], [2024, 7, 31], 6, 0.05], 2.5], ['boundary control 2', [[2024, 1, 31], [2024, 4, 30], 6, 0.05], 1.236264], ['normal control 1', [[2024, 9, 16], [2025, 1, 19], 6, 0.0725], 2.503453], ['normal control 2', [[2014, 9, 6], [2014, 9, 25], 6, 0.045], 0.236188]], [['regression long stub single fraction 1', [[2022, 4, 15], [2022, 5, 30], 1, 0.045], 0.556452], ['regression long stub single fraction 2', [[2013, 8, 31], [2014, 4, 8], 6, 0.0725], 4.393342], ['partial repair probe 1', [[2014, 3, 31], [2015, 2, 11], 6, 0.0725], 6.293956], ['partial repair probe 2', [[2033, 12, 30], [2034, 11, 30], 6, 0.045], 4.131148], ['boundary control 1', [[2024, 1, 31], [2024, 4, 30], 6, 0.05], 1.236264], ['boundary control 2', [[2024, 1, 31], [2024, 7, 31], 6, 0.05], 2.5], ['normal control 1', [[2034, 2, 20], [2034, 5, 6], 6, 0.045], 0.93232], ['normal control 2', [[2024, 7, 29], [2024, 10, 3], 6, 0.0725], 1.300272]], [['regression long stub single fraction 1', [[2021, 3, 9], [2022, 3, 8], 6, 0.045], 4.487569], ['regression long stub single fraction 2', [[2039, 11, 25], [2040, 10, 27], 6, 0.045], 4.14538], ['partial repair probe 1', [[2042, 4, 1], [2042, 7, 18], 3, 0.0725], 2.147418], ['partial repair probe 2', [[2028, 1, 17], [2028, 9, 11], 6, 0.045], 2.934783], ['boundary control 1', [[2024, 1, 31], [2024, 7, 31], 6, 0.05], 2.5], ['boundary control 2', [[2024, 1, 31], [2024, 4, 30], 6, 0.05], 1.236264], ['normal control 1', [[2014, 8, 7], [2015, 1, 10], 6, 0.0725], 3.07337], ['normal control 2', [[2037, 6, 29], [2037, 8, 31], 3, 0.045], 0.77038]], [['regression long stub single fraction 1', [[2028, 2, 29], [2028, 8, 29], 3, 0.0725], 3.625], ['regression long stub single fraction 2', [[2027, 4, 28], [2027, 9, 25], 3, 0.045], 1.846467], ['partial repair probe 1', [[2023, 10, 31], [2025, 9, 7], 12, 0.0725], 13.427397], ['partial repair probe 2', [[2030, 9, 30], [2031, 5, 15], 6, 0.05], 3.125], ['boundary control 1', [[2024, 1, 31], [2024, 4, 30], 6, 0.05], 1.236264], ['boundary control 2', [[2024, 1, 31], [2024, 7, 31], 6, 0.05], 2.5], ['normal control 1', [[2005, 3, 31], [2005, 7, 28], 12, 0.0725], 2.363699], ['normal control 2', [[2036, 3, 31], [2037, 12, 28], 12, 0.03], 5.235616]]]\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-final-stub-coupon-long-stub-single-fraction","generated_at":"2026-09-29T14:46:53.209834+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 long branch reuses the short-stub formula days(prev, mat)/days(prev, q1).","sha256":"e205c8606402a455f6a3a40ac6c70bb79a5f5dc18a6714dbf71b246db10da270","title":"Irregular final coupon amount: a long final period is pro-rated against one notional period · 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":45.485,"exit_code":1,"observations":[{"actual":9.452804,"check":"regression long stub single fraction 1","expected":9.452055,"passed":false},{"actual":3.636986,"check":"regression long stub single fraction 2","expected":3.629834,"passed":false},{"actual":4.90411,"check":"partial repair probe 1","expected":4.904891,"passed":false},{"actual":0.527778,"check":"partial repair probe 2","expected":0.517241,"passed":false},{"actual":2.5,"check":"boundary control 1","expected":2.5,"passed":true},{"actual":1.236264,"check":"boundary control 2","expected":1.236264,"passed":true},{"actual":1.8125,"check":"normal control 1","expected":1.8125,"passed":true},{"actual":0.098901,"check":"normal control 2","expected":0.098901,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression long stub single fraction 1\", \"actual\": 9.452804, \"expected\": 9.452055, \"passed\": false}, {\"check\": \"regression long stub single fraction 2\", \"actual\": 3.636986, \"expected\": 3.629834, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 4.90411, \"expected\": 4.904891, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 0.527778, \"expected\": 0.517241, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 2.5, \"expected\": 2.5, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.236264, \"expected\": 1.236264, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 1.8125, \"expected\": 1.8125, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.098901, \"expected\": 0.098901, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.333,"exit_code":1,"observations":[{"actual":9.439891,"check":"regression long stub single fraction 1","expected":9.452055,"passed":false},{"actual":3.607337,"check":"regression long stub single fraction 2","expected":3.629834,"passed":false},{"actual":4.944751,"check":"partial repair probe 1","expected":4.904891,"passed":false},{"actual":0.510753,"check":"partial repair probe 2","expected":0.517241,"passed":false},{"actual":2.5,"check":"boundary control 1","expected":2.5,"passed":true},{"actual":1.236264,"check":"boundary control 2","expected":1.236264,"passed":true},{"actual":1.8125,"check":"normal control 1","expected":1.8125,"passed":true},{"actual":0.098901,"check":"normal control 2","expected":0.098901,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression long stub single fraction 1\", \"actual\": 9.439891, \"expected\": 9.452055, \"passed\": false}, {\"check\": \"regression long stub single fraction 2\", \"actual\": 3.607337, \"expected\": 3.629834, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 4.944751, \"expected\": 4.904891, \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": 0.510753, \"expected\": 0.517241, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 2.5, \"expected\": 2.5, \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": 1.236264, \"expected\": 1.236264, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": 1.8125, \"expected\": 1.8125, \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": 0.098901, \"expected\": 0.098901, \"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."}}