{"abstract":"Bills just over half a 365-day year report a yield from the simple formula.","category":"Bond day-count conventions","checks":8,"contract":"Inputs settlement and maturity [y,m,d] (1 to 364 days apart) and discount rate d. t = days. Price = 100*(1 - d*t/360). Year basis B is 366 if a 29 February lies in (settle, settle+365 days], else 365. For t <= B/2, BEY = B*d/(360 - d*t); otherwise BEY solves the quadratic with a = t/(2B) - 0.25, b = t/B, c = (price-100)/price, taking (-b + sqrt(b^2 - 4ac))/(2a). Return [price rounded 6, BEY rounded 8].","contract_signature":"settle, maturity, d","evaluation_group":"w2-bond_day_count_conventions-bill-discount-to-bey","failed_approach":"Rounding half the basis up to a whole day still admits 183 days under a 365-day basis.","family":"w2-bond_day_count_conventions-bill-discount-to-bey-half-year-threshold","id":"FA-61106","implementations":{"attempt":{"sha256":"9762806d88621cb9a1cb18a75dab80b541c5788024d48e92654bc10664fa381a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nimport math\nN = 1\nobservations = []\ndef solve(settle, maturity, d):\n    S = datetime.date(*settle)\n    M = datetime.date(*maturity)\n    t = (M - S).days\n    def leap(y):\n        return (y % 4 == 0 and y % 100 != 0) or y % 400 == 0\n    horizon = S + datetime.timedelta(days=365)\n    basis = 366 if any(leap(y) and S < datetime.date(y, 2, 29) <= horizon for y in (S.year, S.year + 1)) else 365\n    price = 100 * (1 - d * t / 360)\n    if t <= math.ceil(basis / 2):\n        bey = basis * d / (360 - d * t)\n    else:\n        a = t / (2 * basis) - 0.25\n        b = t / basis\n        c = (price - 100) / price\n        bey = (-b + math.sqrt(b * b - 4 * a * c)) / (2 * a)\n    return [round(price, 6), round(bey, 8)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression half-year threshold 1', [[2066, 5, 30], [2066, 11, 29], 0.08], [95.933333, 0.08453969]], ['regression half-year threshold 2', [[2021, 2, 3], [2021, 8, 5], 0.0525], [97.33125, 0.05468459]], ['partial repair probe 1', [[2099, 12, 15], [2100, 6, 16], 0.08], [95.933333, 0.08453969]], ['partial repair probe 2', [[2005, 5, 30], [2005, 11, 29], 0.025], [98.729167, 0.02567259]], ['boundary control 1', [[2023, 5, 1], [2023, 10, 30], 0.05], [97.472222, 0.05215161]], ['boundary control 2', [[2023, 5, 1], [2023, 10, 31], 0.05], [97.458333, 0.05215904]], ['normal control 1', [[2055, 6, 4], [2055, 12, 3], 0.0435], [97.800833, 0.04521945]], ['normal control 2', [[2028, 1, 1], [2028, 7, 12], 0.025], [98.659722, 0.02574478]]], [['regression half-year threshold 1', [[2001, 12, 28], [2002, 6, 29], 0.01], [99.491667, 0.01019055]], ['regression half-year threshold 2', [[2100, 12, 28], [2101, 6, 29], 0.0525], [97.33125, 0.05468459]], ['partial repair probe 1', [[2014, 1, 31], [2014, 8, 2], 0.08], [95.933333, 0.08453969]], ['partial repair probe 2', [[2102, 8, 20], [2103, 2, 19], 0.025], [98.729167, 0.02567259]], ['boundary control 1', [[2023, 5, 1], [2023, 10, 31], 0.05], [97.458333, 0.05215904]], ['boundary control 2', [[2023, 5, 1], [2023, 10, 30], 0.05], [97.472222, 0.05215161]], ['normal control 1', [[2027, 1, 1], [2027, 7, 1], 0.025], [98.743056, 0.02566988]], ['normal control 2', [[2096, 4, 10], [2096, 10, 8], 0.0435], [97.812917, 0.04509033]]], [['regression half-year threshold 1', [[2056, 11, 28], [2057, 5, 30], 0.0435], [97.78875, 0.04509869]], ['regression half-year threshold 2', [[2022, 7, 7], [2023, 1, 6], 0.025], [98.729167, 0.02567259]], ['partial repair probe 1', [[2008, 11, 1], [2009, 5, 3], 0.08], [95.933333, 0.08453969]], ['partial repair probe 2', [[2037, 4, 29], [2037, 10, 29], 0.025], [98.729167, 0.02567259]], ['boundary control 1', [[2023, 1, 1], [2023, 1, 2], 0.05], [99.986111, 0.05070149]], ['boundary control 2', [[2023, 5, 1], [2023, 10, 30], 0.05], [97.472222, 0.05215161]], ['normal control 1', [[2051, 9, 19], [2052, 9, 17], 0.0525], [94.691667, 0.0555986]], ['normal control 2', [[2081, 6, 16], [2081, 9, 15], 0.0525], [98.672917, 0.05394506]]], [['regression half-year threshold 1', [[2041, 8, 21], [2042, 2, 20], 0.025], [98.729167, 0.02567259]], ['regression half-year threshold 2', [[2100, 3, 1], [2100, 8, 31], 0.0525], [97.33125, 0.05468459]], ['partial repair probe 1', [[2024, 3, 15], [2024, 9, 14], 0.08], [95.933333, 0.08453969]], ['partial repair probe 2', [[2036, 5, 1], [2036, 10, 31], 0.0435], [97.78875, 0.04509869]], ['boundary control 1', [[2023, 5, 1], [2023, 10, 31], 0.05], [97.458333, 0.05215904]], ['boundary control 2', [[2023, 5, 1], [2023, 10, 30], 0.05], [97.472222, 0.05215161]], ['normal control 1', [[2033, 4, 9], [2033, 7, 9], 0.0435], [98.900417, 0.04459452]], ['normal control 2', [[2024, 12, 1], [2025, 5, 31], 0.0435], [97.812917, 0.04509033]]], [['regression half-year threshold 1', [[2053, 11, 23], [2054, 5, 25], 0.01], [99.491667, 0.01019055]], ['regression half-year threshold 2', [[2053, 5, 31], [2053, 11, 30], 0.08], [95.933333, 0.08453969]], ['partial repair probe 1', [[2100, 3, 1], [2100, 8, 31], 0.0525], [97.33125, 0.05468459]], ['partial repair probe 2', [[2099, 1, 15], [2099, 7, 17], 0.025], [98.729167, 0.02567259]], ['boundary control 1', [[2023, 5, 1], [2023, 10, 31], 0.05], [97.458333, 0.05215904]], ['boundary control 2', [[2023, 3, 1], [2024, 2, 28], 0.05], [94.944444, 0.05284575]], ['normal control 1', [[2002, 1, 7], [2002, 7, 8], 0.0525], [97.345833, 0.05468048]], ['normal control 2', [[2034, 1, 31], [2034, 5, 2], 0.025], [99.368056, 0.02550842]]]]\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":"dfacb0c09da6f4d3d30e0adb83e5b0ed6f94cdb1cab1b3f1dba2cf103807f8cf","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nimport math\nN = 1\nobservations = []\ndef solve(settle, maturity, d):\n    S = datetime.date(*settle)\n    M = datetime.date(*maturity)\n    t = (M - S).days\n    def leap(y):\n        return (y % 4 == 0 and y % 100 != 0) or y % 400 == 0\n    horizon = S + datetime.timedelta(days=365)\n    basis = 366 if any(leap(y) and S < datetime.date(y, 2, 29) <= horizon for y in (S.year, S.year + 1)) else 365\n    price = 100 * (1 - d * t / 360)\n    if t <= 183:\n        bey = basis * d / (360 - d * t)\n    else:\n        a = t / (2 * basis) - 0.25\n        b = t / basis\n        c = (price - 100) / price\n        bey = (-b + math.sqrt(b * b - 4 * a * c)) / (2 * a)\n    return [round(price, 6), round(bey, 8)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression half-year threshold 1', [[2066, 5, 30], [2066, 11, 29], 0.08], [95.933333, 0.08453969]], ['regression half-year threshold 2', [[2021, 2, 3], [2021, 8, 5], 0.0525], [97.33125, 0.05468459]], ['partial repair probe 1', [[2099, 12, 15], [2100, 6, 16], 0.08], [95.933333, 0.08453969]], ['partial repair probe 2', [[2005, 5, 30], [2005, 11, 29], 0.025], [98.729167, 0.02567259]], ['boundary control 1', [[2023, 5, 1], [2023, 10, 30], 0.05], [97.472222, 0.05215161]], ['boundary control 2', [[2023, 5, 1], [2023, 10, 31], 0.05], [97.458333, 0.05215904]], ['normal control 1', [[2055, 6, 4], [2055, 12, 3], 0.0435], [97.800833, 0.04521945]], ['normal control 2', [[2028, 1, 1], [2028, 7, 12], 0.025], [98.659722, 0.02574478]]], [['regression half-year threshold 1', [[2001, 12, 28], [2002, 6, 29], 0.01], [99.491667, 0.01019055]], ['regression half-year threshold 2', [[2100, 12, 28], [2101, 6, 29], 0.0525], [97.33125, 0.05468459]], ['partial repair probe 1', [[2014, 1, 31], [2014, 8, 2], 0.08], [95.933333, 0.08453969]], ['partial repair probe 2', [[2102, 8, 20], [2103, 2, 19], 0.025], [98.729167, 0.02567259]], ['boundary control 1', [[2023, 5, 1], [2023, 10, 31], 0.05], [97.458333, 0.05215904]], ['boundary control 2', [[2023, 5, 1], [2023, 10, 30], 0.05], [97.472222, 0.05215161]], ['normal control 1', [[2027, 1, 1], [2027, 7, 1], 0.025], [98.743056, 0.02566988]], ['normal control 2', [[2096, 4, 10], [2096, 10, 8], 0.0435], [97.812917, 0.04509033]]], [['regression half-year threshold 1', [[2056, 11, 28], [2057, 5, 30], 0.0435], [97.78875, 0.04509869]], ['regression half-year threshold 2', [[2022, 7, 7], [2023, 1, 6], 0.025], [98.729167, 0.02567259]], ['partial repair probe 1', [[2008, 11, 1], [2009, 5, 3], 0.08], [95.933333, 0.08453969]], ['partial repair probe 2', [[2037, 4, 29], [2037, 10, 29], 0.025], [98.729167, 0.02567259]], ['boundary control 1', [[2023, 1, 1], [2023, 1, 2], 0.05], [99.986111, 0.05070149]], ['boundary control 2', [[2023, 5, 1], [2023, 10, 30], 0.05], [97.472222, 0.05215161]], ['normal control 1', [[2051, 9, 19], [2052, 9, 17], 0.0525], [94.691667, 0.0555986]], ['normal control 2', [[2081, 6, 16], [2081, 9, 15], 0.0525], [98.672917, 0.05394506]]], [['regression half-year threshold 1', [[2041, 8, 21], [2042, 2, 20], 0.025], [98.729167, 0.02567259]], ['regression half-year threshold 2', [[2100, 3, 1], [2100, 8, 31], 0.0525], [97.33125, 0.05468459]], ['partial repair probe 1', [[2024, 3, 15], [2024, 9, 14], 0.08], [95.933333, 0.08453969]], ['partial repair probe 2', [[2036, 5, 1], [2036, 10, 31], 0.0435], [97.78875, 0.04509869]], ['boundary control 1', [[2023, 5, 1], [2023, 10, 31], 0.05], [97.458333, 0.05215904]], ['boundary control 2', [[2023, 5, 1], [2023, 10, 30], 0.05], [97.472222, 0.05215161]], ['normal control 1', [[2033, 4, 9], [2033, 7, 9], 0.0435], [98.900417, 0.04459452]], ['normal control 2', [[2024, 12, 1], [2025, 5, 31], 0.0435], [97.812917, 0.04509033]]], [['regression half-year threshold 1', [[2053, 11, 23], [2054, 5, 25], 0.01], [99.491667, 0.01019055]], ['regression half-year threshold 2', [[2053, 5, 31], [2053, 11, 30], 0.08], [95.933333, 0.08453969]], ['partial repair probe 1', [[2100, 3, 1], [2100, 8, 31], 0.0525], [97.33125, 0.05468459]], ['partial repair probe 2', [[2099, 1, 15], [2099, 7, 17], 0.025], [98.729167, 0.02567259]], ['boundary control 1', [[2023, 5, 1], [2023, 10, 31], 0.05], [97.458333, 0.05215904]], ['boundary control 2', [[2023, 3, 1], [2024, 2, 28], 0.05], [94.944444, 0.05284575]], ['normal control 1', [[2002, 1, 7], [2002, 7, 8], 0.0525], [97.345833, 0.05468048]], ['normal control 2', [[2034, 1, 31], [2034, 5, 2], 0.025], [99.368056, 0.02550842]]]]\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-bill-discount-to-bey-half-year-threshold","generated_at":"2026-09-29T14:46:52.102775+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 branch hard-codes 183 days, the half year of a 366-day basis.","sha256":"7eae3ae82cf01abf954751ec3d0bc7bd2198fc517eca9d07454a479073107e9f","title":"Discount-basis bill price and bond-equivalent yield: a 183-day bill in a 365-day basis year uses the short-dated formula · 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.413,"exit_code":1,"observations":[{"actual":[95.933333,0.08454946],"check":"regression half-year threshold 1","expected":[95.933333,0.08453969],"passed":false},{"actual":[97.33125,0.05468867],"check":"regression half-year threshold 2","expected":[97.33125,0.05468459],"passed":false},{"actual":[95.933333,0.08454946],"check":"partial repair probe 1","expected":[95.933333,0.08453969],"passed":false},{"actual":[98.729167,0.02567349],"check":"partial repair probe 2","expected":[98.729167,0.02567259],"passed":false},{"actual":[97.472222,0.05215161],"check":"boundary control 1","expected":[97.472222,0.05215161],"passed":true},{"actual":[97.458333,0.05215904],"check":"boundary control 2","expected":[97.458333,0.05215904],"passed":true},{"actual":[97.800833,0.04521945],"check":"normal control 1","expected":[97.800833,0.04521945],"passed":true},{"actual":[98.659722,0.02574478],"check":"normal control 2","expected":[98.659722,0.02574478],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression half-year threshold 1\", \"actual\": [95.933333, 0.08454946], \"expected\": [95.933333, 0.08453969], \"passed\": false}, {\"check\": \"regression half-year threshold 2\", \"actual\": [97.33125, 0.05468867], \"expected\": [97.33125, 0.05468459], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [95.933333, 0.08454946], \"expected\": [95.933333, 0.08453969], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [98.729167, 0.02567349], \"expected\": [98.729167, 0.02567259], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [97.472222, 0.05215161], \"expected\": [97.472222, 0.05215161], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [97.458333, 0.05215904], \"expected\": [97.458333, 0.05215904], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [97.800833, 0.04521945], \"expected\": [97.800833, 0.04521945], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [98.659722, 0.02574478], \"expected\": [98.659722, 0.02574478], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.374,"exit_code":1,"observations":[{"actual":[95.933333,0.08454946],"check":"regression half-year threshold 1","expected":[95.933333,0.08453969],"passed":false},{"actual":[97.33125,0.05468867],"check":"regression half-year threshold 2","expected":[97.33125,0.05468459],"passed":false},{"actual":[95.933333,0.08454946],"check":"partial repair probe 1","expected":[95.933333,0.08453969],"passed":false},{"actual":[98.729167,0.02567349],"check":"partial repair probe 2","expected":[98.729167,0.02567259],"passed":false},{"actual":[97.472222,0.05215161],"check":"boundary control 1","expected":[97.472222,0.05215161],"passed":true},{"actual":[97.458333,0.05215904],"check":"boundary control 2","expected":[97.458333,0.05215904],"passed":true},{"actual":[97.800833,0.04521945],"check":"normal control 1","expected":[97.800833,0.04521945],"passed":true},{"actual":[98.659722,0.02574478],"check":"normal control 2","expected":[98.659722,0.02574478],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression half-year threshold 1\", \"actual\": [95.933333, 0.08454946], \"expected\": [95.933333, 0.08453969], \"passed\": false}, {\"check\": \"regression half-year threshold 2\", \"actual\": [97.33125, 0.05468867], \"expected\": [97.33125, 0.05468459], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [95.933333, 0.08454946], \"expected\": [95.933333, 0.08453969], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [98.729167, 0.02567349], \"expected\": [98.729167, 0.02567259], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [97.472222, 0.05215161], \"expected\": [97.472222, 0.05215161], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [97.458333, 0.05215904], \"expected\": [97.458333, 0.05215904], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [97.800833, 0.04521945], \"expected\": [97.800833, 0.04521945], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [98.659722, 0.02574478], \"expected\": [98.659722, 0.02574478], \"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."}}