{"abstract":"Year fractions are close but not equal to the ISDA value for nearly every span.","category":"Bond day-count conventions","checks":8,"contract":"Inputs start and end [y,m,d]. If end < start return \"end before start\". Split the interval at each 1 January; each piece contributes its actual days divided by 366 if the piece lies in a Gregorian leap year, else 365. Sum exactly and return the float rounded to 9 decimals.","evaluation_group":"w2-bond_day_count_conventions-act-act-isda","failed_approach":"Dividing by 366 only when a 29 February occurs in the span is a different convention.","family":"w2-bond_day_count_conventions-act-act-isda-average-year-basis","id":"FA-60926","implementations":{"attempt":{"sha256":"eb5d456b920d376fa1ac5c8c73c5b04c602b2caec119b2d94904bb5ed4f40296","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(a, b):\n    A = datetime.date(*a)\n    B = datetime.date(*b)\n    if B < A:\n        return 'end before start'\n    def leap(y):\n        return (y % 4 == 0 and y % 100 != 0) or y % 400 == 0\n    total = Fraction(0)\n    cur = A\n    has29 = any(leap(y) and A < datetime.date(y, 2, 29) <= B for y in range(A.year, B.year + 1))\n    total = Fraction((B - A).days, 366 if has29 else 365)\n    return round(float(total), 9)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression average year basis 1', [[2033, 2, 27], [2036, 11, 26]], 3.745474961], ['regression average year basis 2', [[1897, 9, 30], [1898, 3, 28]], 0.490410959], ['partial repair probe 1', [[2079, 11, 3], [2083, 11, 3]], 4.0], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2059, 8, 30], [2059, 7, 23]], 'end before start'], ['normal control 2', [[2099, 12, 16], [2099, 11, 17]], 'end before start'], ['normal control 3', [[2103, 6, 16], [2103, 5, 8]], 'end before start'], ['normal control 4', [[1990, 7, 22], [1990, 7, 4]], 'end before start']], [['regression average year basis 1', [[2041, 1, 23], [2041, 8, 10]], 0.545205479], ['regression average year basis 2', [[1989, 1, 11], [1992, 10, 16]], 3.762220226], ['partial repair probe 1', [[2086, 2, 28], [2090, 1, 22]], 3.898630137], ['partial repair probe 2', [[2028, 12, 24], [2029, 10, 5]], 0.780762033], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2041, 6, 30], [2041, 5, 29]], 'end before start'], ['normal control 2', [[1944, 6, 15], [1944, 5, 27]], 'end before start'], ['normal control 3', [[2087, 4, 19], [2087, 4, 4]], 'end before start']], [['regression average year basis 1', [[2045, 7, 24], [2046, 1, 10]], 0.465753425], ['regression average year basis 2', [[2104, 1, 17], [2104, 7, 25]], 0.519125683], ['partial repair probe 1', [[2096, 12, 31], [2099, 2, 8]], 2.106841829], ['partial repair probe 2', [[1936, 4, 23], [1937, 4, 22]], 0.99536642], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2039, 3, 17], [2039, 2, 26]], 'end before start'], ['normal control 2', [[2031, 11, 17], [2031, 11, 9]], 'end before start'], ['normal control 3', [[2009, 8, 3], [2009, 6, 30]], 'end before start']], [['regression average year basis 1', [[2018, 9, 1], [2019, 9, 29]], 1.076712329], ['regression average year basis 2', [[2094, 2, 28], [2094, 6, 7]], 0.271232877], ['partial repair probe 1', [[1935, 10, 31], [1936, 4, 13]], 0.451283779], ['partial repair probe 2', [[2083, 5, 15], [2084, 6, 1]], 1.048177259], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[1908, 12, 13], [1908, 12, 12]], 'end before start'], ['normal control 2', [[1900, 4, 24], [1900, 4, 13]], 'end before start'], ['normal control 3', [[1994, 7, 29], [1994, 7, 14]], 'end before start']], [['regression average year basis 1', [[2058, 8, 14], [2064, 8, 8]], 5.98465454], ['regression average year basis 2', [[1980, 7, 11], [1983, 5, 22]], 2.861711206], ['partial repair probe 1', [[2088, 5, 30], [2088, 6, 2]], 0.008196721], ['partial repair probe 2', [[2027, 1, 9], [2032, 10, 24]], 5.789557602], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2043, 5, 31], [2043, 4, 25]], 'end before start'], ['normal control 2', [[1960, 8, 1], [1960, 6, 27]], 'end before start'], ['normal control 3', [[2078, 1, 31], [2078, 1, 7]], 'end before start']]]\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":"0b45a0098e0f6503645534ab7a38d48ca873144c4fe554df758a7579322b4c49","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(a, b):\n    A = datetime.date(*a)\n    B = datetime.date(*b)\n    if B < A:\n        return 'end before start'\n    def leap(y):\n        return (y % 4 == 0 and y % 100 != 0) or y % 400 == 0\n    total = Fraction(0)\n    cur = A\n    total = Fraction((B - A).days * 4, 1461)\n    return round(float(total), 9)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression average year basis 1', [[2033, 2, 27], [2036, 11, 26]], 3.745474961], ['regression average year basis 2', [[1897, 9, 30], [1898, 3, 28]], 0.490410959], ['partial repair probe 1', [[2079, 11, 3], [2083, 11, 3]], 4.0], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2059, 8, 30], [2059, 7, 23]], 'end before start'], ['normal control 2', [[2099, 12, 16], [2099, 11, 17]], 'end before start'], ['normal control 3', [[2103, 6, 16], [2103, 5, 8]], 'end before start'], ['normal control 4', [[1990, 7, 22], [1990, 7, 4]], 'end before start']], [['regression average year basis 1', [[2041, 1, 23], [2041, 8, 10]], 0.545205479], ['regression average year basis 2', [[1989, 1, 11], [1992, 10, 16]], 3.762220226], ['partial repair probe 1', [[2086, 2, 28], [2090, 1, 22]], 3.898630137], ['partial repair probe 2', [[2028, 12, 24], [2029, 10, 5]], 0.780762033], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2041, 6, 30], [2041, 5, 29]], 'end before start'], ['normal control 2', [[1944, 6, 15], [1944, 5, 27]], 'end before start'], ['normal control 3', [[2087, 4, 19], [2087, 4, 4]], 'end before start']], [['regression average year basis 1', [[2045, 7, 24], [2046, 1, 10]], 0.465753425], ['regression average year basis 2', [[2104, 1, 17], [2104, 7, 25]], 0.519125683], ['partial repair probe 1', [[2096, 12, 31], [2099, 2, 8]], 2.106841829], ['partial repair probe 2', [[1936, 4, 23], [1937, 4, 22]], 0.99536642], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2039, 3, 17], [2039, 2, 26]], 'end before start'], ['normal control 2', [[2031, 11, 17], [2031, 11, 9]], 'end before start'], ['normal control 3', [[2009, 8, 3], [2009, 6, 30]], 'end before start']], [['regression average year basis 1', [[2018, 9, 1], [2019, 9, 29]], 1.076712329], ['regression average year basis 2', [[2094, 2, 28], [2094, 6, 7]], 0.271232877], ['partial repair probe 1', [[1935, 10, 31], [1936, 4, 13]], 0.451283779], ['partial repair probe 2', [[2083, 5, 15], [2084, 6, 1]], 1.048177259], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[1908, 12, 13], [1908, 12, 12]], 'end before start'], ['normal control 2', [[1900, 4, 24], [1900, 4, 13]], 'end before start'], ['normal control 3', [[1994, 7, 29], [1994, 7, 14]], 'end before start']], [['regression average year basis 1', [[2058, 8, 14], [2064, 8, 8]], 5.98465454], ['regression average year basis 2', [[1980, 7, 11], [1983, 5, 22]], 2.861711206], ['partial repair probe 1', [[2088, 5, 30], [2088, 6, 2]], 0.008196721], ['partial repair probe 2', [[2027, 1, 9], [2032, 10, 24]], 5.789557602], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2043, 5, 31], [2043, 4, 25]], 'end before start'], ['normal control 2', [[1960, 8, 1], [1960, 6, 27]], 'end before start'], ['normal control 3', [[2078, 1, 31], [2078, 1, 7]], 'end before start']]]\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"},"fixed":{"sha256":"782187da114c36bf64d2140adcf1cd6a6f6bb9dd856eff91293a9f75f45ba976","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(a, b):\n    A = datetime.date(*a)\n    B = datetime.date(*b)\n    if B < A:\n        return 'end before start'\n    def leap(y):\n        return (y % 4 == 0 and y % 100 != 0) or y % 400 == 0\n    total = Fraction(0)\n    cur = A\n    while cur < B:\n        nxt = min(B, datetime.date(cur.year + 1, 1, 1))\n        total += Fraction((nxt - cur).days, 366 if leap(cur.year) else 365)\n        cur = nxt\n    return round(float(total), 9)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression average year basis 1', [[2033, 2, 27], [2036, 11, 26]], 3.745474961], ['regression average year basis 2', [[1897, 9, 30], [1898, 3, 28]], 0.490410959], ['partial repair probe 1', [[2079, 11, 3], [2083, 11, 3]], 4.0], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2059, 8, 30], [2059, 7, 23]], 'end before start'], ['normal control 2', [[2099, 12, 16], [2099, 11, 17]], 'end before start'], ['normal control 3', [[2103, 6, 16], [2103, 5, 8]], 'end before start'], ['normal control 4', [[1990, 7, 22], [1990, 7, 4]], 'end before start']], [['regression average year basis 1', [[2041, 1, 23], [2041, 8, 10]], 0.545205479], ['regression average year basis 2', [[1989, 1, 11], [1992, 10, 16]], 3.762220226], ['partial repair probe 1', [[2086, 2, 28], [2090, 1, 22]], 3.898630137], ['partial repair probe 2', [[2028, 12, 24], [2029, 10, 5]], 0.780762033], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2041, 6, 30], [2041, 5, 29]], 'end before start'], ['normal control 2', [[1944, 6, 15], [1944, 5, 27]], 'end before start'], ['normal control 3', [[2087, 4, 19], [2087, 4, 4]], 'end before start']], [['regression average year basis 1', [[2045, 7, 24], [2046, 1, 10]], 0.465753425], ['regression average year basis 2', [[2104, 1, 17], [2104, 7, 25]], 0.519125683], ['partial repair probe 1', [[2096, 12, 31], [2099, 2, 8]], 2.106841829], ['partial repair probe 2', [[1936, 4, 23], [1937, 4, 22]], 0.99536642], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2039, 3, 17], [2039, 2, 26]], 'end before start'], ['normal control 2', [[2031, 11, 17], [2031, 11, 9]], 'end before start'], ['normal control 3', [[2009, 8, 3], [2009, 6, 30]], 'end before start']], [['regression average year basis 1', [[2018, 9, 1], [2019, 9, 29]], 1.076712329], ['regression average year basis 2', [[2094, 2, 28], [2094, 6, 7]], 0.271232877], ['partial repair probe 1', [[1935, 10, 31], [1936, 4, 13]], 0.451283779], ['partial repair probe 2', [[2083, 5, 15], [2084, 6, 1]], 1.048177259], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[1908, 12, 13], [1908, 12, 12]], 'end before start'], ['normal control 2', [[1900, 4, 24], [1900, 4, 13]], 'end before start'], ['normal control 3', [[1994, 7, 29], [1994, 7, 14]], 'end before start']], [['regression average year basis 1', [[2058, 8, 14], [2064, 8, 8]], 5.98465454], ['regression average year basis 2', [[1980, 7, 11], [1983, 5, 22]], 2.861711206], ['partial repair probe 1', [[2088, 5, 30], [2088, 6, 2]], 0.008196721], ['partial repair probe 2', [[2027, 1, 9], [2032, 10, 24]], 5.789557602], ['boundary control 1', [[2024, 3, 1], [2024, 3, 1]], 0.0], ['normal control 1', [[2043, 5, 31], [2043, 4, 25]], 'end before start'], ['normal control 2', [[1960, 8, 1], [1960, 6, 27]], 'end before start'], ['normal control 3', [[2078, 1, 31], [2078, 1, 7]], 'end before start']]]\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-act-act-isda-average-year-basis","generated_at":"2026-09-29T14:46:50.250039+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.","repair":"Split by calendar years and divide each piece by its own year length.","root_cause":"The per-year split was replaced with a single division by 365.25.","sha256":"860770f6cb88f955db6f13f1e04c93012369c446ac4da59eb78bc8edc0d4ed80","title":"Act/Act ISDA year fraction: days are divided by an average 365.25-day year · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.185,"exit_code":1,"observations":[{"actual":3.737704918,"check":"regression average year basis 1","expected":3.745474961,"passed":false},{"actual":0.490410959,"check":"regression average year basis 2","expected":0.490410959,"passed":true},{"actual":3.991803279,"check":"partial repair probe 1","expected":4.0,"passed":false},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":"end before start","check":"normal control 1","expected":"end before start","passed":true},{"actual":"end before start","check":"normal control 2","expected":"end before start","passed":true},{"actual":"end before start","check":"normal control 3","expected":"end before start","passed":true},{"actual":"end before start","check":"normal control 4","expected":"end before start","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression average year basis 1\", \"actual\": 3.737704918, \"expected\": 3.745474961, \"passed\": false}, {\"check\": \"regression average year basis 2\", \"actual\": 0.490410959, \"expected\": 0.490410959, \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": 3.991803279, \"expected\": 4.0, \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.846,"exit_code":1,"observations":[{"actual":3.745379877,"check":"regression average year basis 1","expected":3.745474961,"passed":false},{"actual":0.490075291,"check":"regression average year basis 2","expected":0.490410959,"passed":false},{"actual":4.0,"check":"partial repair probe 1","expected":4.0,"passed":true},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":"end before start","check":"normal control 1","expected":"end before start","passed":true},{"actual":"end before start","check":"normal control 2","expected":"end before start","passed":true},{"actual":"end before start","check":"normal control 3","expected":"end before start","passed":true},{"actual":"end before start","check":"normal control 4","expected":"end before start","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression average year basis 1\", \"actual\": 3.745379877, \"expected\": 3.745474961, \"passed\": false}, {\"check\": \"regression average year basis 2\", \"actual\": 0.490075291, \"expected\": 0.490410959, \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": 4.0, \"expected\": 4.0, \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.991,"exit_code":0,"observations":[{"actual":3.745474961,"check":"regression average year basis 1","expected":3.745474961,"passed":true},{"actual":0.490410959,"check":"regression average year basis 2","expected":0.490410959,"passed":true},{"actual":4.0,"check":"partial repair probe 1","expected":4.0,"passed":true},{"actual":0.0,"check":"boundary control 1","expected":0.0,"passed":true},{"actual":"end before start","check":"normal control 1","expected":"end before start","passed":true},{"actual":"end before start","check":"normal control 2","expected":"end before start","passed":true},{"actual":"end before start","check":"normal control 3","expected":"end before start","passed":true},{"actual":"end before start","check":"normal control 4","expected":"end before start","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression average year basis 1\", \"actual\": 3.745474961, \"expected\": 3.745474961, \"passed\": true}, {\"check\": \"regression average year basis 2\", \"actual\": 0.490410959, \"expected\": 0.490410959, \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": 4.0, \"expected\": 4.0, \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": 0.0, \"expected\": 0.0, \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"normal control 3\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}, {\"check\": \"normal control 4\", \"actual\": \"end before start\", \"expected\": \"end before start\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}