{"abstract":"Month-end maturities with the flag set produce coupons on the 28th or 30th instead of month end.","category":"Bond day-count conventions","checks":8,"contract":"Inputs issue and maturity [y,m,d], months per period and an end-of-month flag. Unadjusted coupon dates are generated backward from maturity: the k-th date is maturity shifted back k*months calendar months, keeping the maturity day clamped to the month length; if the flag is set and maturity is the last day of its month, every date is the last day of its month. Dates on or before issue are dropped. If more than one date remains and the first is fewer than 15 days after issue, it is removed (long first coupon). Return the dates ascending.","contract_signature":"issue, maturity, months, eom","evaluation_group":"w2-bond_day_count_conventions-backward-coupon-schedule","failed_approach":"Applying month-end rolling whenever maturity is a month end ignores a cleared flag.","family":"w2-bond_day_count_conventions-backward-coupon-schedule-end-of-month-flag","id":"FA-60961","implementations":{"attempt":{"sha256":"2c8991514d6838831f5615993fc9d02fa5d6bf409fba6792da0f34b3274a5335","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(issue, maturity, months, eom):\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    def shift(y, m, k):\n        t = y * 12 + (m - 1) - k\n        return t // 12, t % 12 + 1\n    I = datetime.date(*issue)\n    my, mm, md = maturity\n    end_eom = md == mlen(my, mm)\n    out = []\n    k = 0\n    while True:\n        y, m = shift(my, mm, k * months)\n        d = mlen(y, m) if end_eom else min(md, mlen(y, m))\n        if datetime.date(y, m, d) <= I:\n            break\n        out.append([y, m, d])\n        k += 1\n    out.reverse()\n    if len(out) > 1 and (datetime.date(*out[0]) - I).days < 15:\n        out.pop(0)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression end-of-month flag 1', [[2016, 10, 14], [2019, 9, 30], 6, True], [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]]], ['regression end-of-month flag 2', [[2008, 4, 3], [2011, 9, 30], 3, True], [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]]], ['partial repair probe 1', [[2035, 9, 1], [2036, 6, 30], 6, False], [[2035, 12, 30], [2036, 6, 30]]], ['partial repair probe 2', [[2006, 8, 13], [2009, 6, 30], 1, False], [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]]], ['boundary control 1', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2003, 5, 3], [2005, 4, 30], 12, False], [[2004, 4, 30], [2005, 4, 30]]], ['normal control 2', [[2026, 3, 1], [2028, 9, 1], 6, True], [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]]]], [['regression end-of-month flag 1', [[2027, 9, 4], [2029, 6, 30], 6, True], [[2027, 12, 31], [2028, 6, 30], [2028, 12, 31], [2029, 6, 30]]], ['regression end-of-month flag 2', [[2034, 4, 30], [2035, 9, 30], 6, True], [[2034, 9, 30], [2035, 3, 31], [2035, 9, 30]]], ['partial repair probe 1', [[2010, 6, 19], [2011, 11, 30], 6, False], [[2010, 11, 30], [2011, 5, 30], [2011, 11, 30]]], ['partial repair probe 2', [[2030, 11, 28], [2033, 2, 28], 3, False], [[2031, 2, 28], [2031, 5, 28], [2031, 8, 28], [2031, 11, 28], [2032, 2, 28], [2032, 5, 28], [2032, 8, 28], [2032, 11, 28], [2033, 2, 28]]], ['boundary control 1', [[2024, 3, 1], [2025, 3, 15], 6, False], [[2024, 9, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2022, 8, 18], [2024, 9, 30], 12, True], [[2022, 9, 30], [2023, 9, 30], [2024, 9, 30]]], ['normal control 2', [[2035, 6, 17], [2036, 5, 31], 6, False], [[2035, 11, 30], [2036, 5, 31]]]], [['regression end-of-month flag 1', [[2034, 3, 3], [2034, 9, 30], 3, True], [[2034, 3, 31], [2034, 6, 30], [2034, 9, 30]]], ['regression end-of-month flag 2', [[2015, 3, 25], [2016, 6, 30], 3, True], [[2015, 6, 30], [2015, 9, 30], [2015, 12, 31], [2016, 3, 31], [2016, 6, 30]]], ['partial repair probe 1', [[2035, 6, 29], [2037, 4, 30], 3, False], [[2035, 7, 30], [2035, 10, 30], [2036, 1, 30], [2036, 4, 30], [2036, 7, 30], [2036, 10, 30], [2037, 1, 30], [2037, 4, 30]]], ['partial repair probe 2', [[2014, 6, 8], [2015, 2, 28], 3, False], [[2014, 8, 28], [2014, 11, 28], [2015, 2, 28]]], ['boundary control 1', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2030, 4, 20], [2033, 5, 1], 3, True], [[2030, 8, 1], [2030, 11, 1], [2031, 2, 1], [2031, 5, 1], [2031, 8, 1], [2031, 11, 1], [2032, 2, 1], [2032, 5, 1], [2032, 8, 1], [2032, 11, 1], [2033, 2, 1], [2033, 5, 1]]], ['normal control 2', [[2009, 3, 15], [2013, 3, 1], 12, False], [[2010, 3, 1], [2011, 3, 1], [2012, 3, 1], [2013, 3, 1]]]], [['regression end-of-month flag 1', [[2028, 3, 15], [2031, 6, 30], 3, True], [[2028, 3, 31], [2028, 6, 30], [2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31], [2030, 6, 30], [2030, 9, 30], [2030, 12, 31], [2031, 3, 31], [2031, 6, 30]]], ['regression end-of-month flag 2', [[2031, 2, 15], [2031, 9, 30], 3, True], [[2031, 3, 31], [2031, 6, 30], [2031, 9, 30]]], ['partial repair probe 1', [[2009, 4, 25], [2011, 4, 30], 1, False], [[2009, 5, 30], [2009, 6, 30], [2009, 7, 30], [2009, 8, 30], [2009, 9, 30], [2009, 10, 30], [2009, 11, 30], [2009, 12, 30], [2010, 1, 30], [2010, 2, 28], [2010, 3, 30], [2010, 4, 30], [2010, 5, 30], [2010, 6, 30], [2010, 7, 30], [2010, 8, 30], [2010, 9, 30], [2010, 10, 30], [2010, 11, 30], [2010, 12, 30], [2011, 1, 30], [2011, 2, 28], [2011, 3, 30], [2011, 4, 30]]], ['partial repair probe 2', [[2002, 3, 19], [2004, 6, 30], 1, False], [[2002, 4, 30], [2002, 5, 30], [2002, 6, 30], [2002, 7, 30], [2002, 8, 30], [2002, 9, 30], [2002, 10, 30], [2002, 11, 30], [2002, 12, 30], [2003, 1, 30], [2003, 2, 28], [2003, 3, 30], [2003, 4, 30], [2003, 5, 30], [2003, 6, 30], [2003, 7, 30], [2003, 8, 30], [2003, 9, 30], [2003, 10, 30], [2003, 11, 30], [2003, 12, 30], [2004, 1, 30], [2004, 2, 29], [2004, 3, 30], [2004, 4, 30], [2004, 5, 30], [2004, 6, 30]]], ['boundary control 1', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['boundary control 2', [[2024, 3, 1], [2025, 3, 15], 6, False], [[2024, 9, 15], [2025, 3, 15]]], ['normal control 1', [[2027, 9, 10], [2030, 3, 31], 3, True], [[2027, 9, 30], [2027, 12, 31], [2028, 3, 31], [2028, 6, 30], [2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31]]], ['normal control 2', [[2019, 6, 13], [2019, 6, 30], 6, False], [[2019, 6, 30]]]], [['regression end-of-month flag 1', [[2028, 7, 26], [2031, 6, 30], 3, True], [[2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31], [2030, 6, 30], [2030, 9, 30], [2030, 12, 31], [2031, 3, 31], [2031, 6, 30]]], ['regression end-of-month flag 2', [[2037, 7, 29], [2040, 4, 30], 6, True], [[2037, 10, 31], [2038, 4, 30], [2038, 10, 31], [2039, 4, 30], [2039, 10, 31], [2040, 4, 30]]], ['partial repair probe 1', [[2005, 11, 4], [2008, 4, 30], 1, False], [[2005, 11, 30], [2005, 12, 30], [2006, 1, 30], [2006, 2, 28], [2006, 3, 30], [2006, 4, 30], [2006, 5, 30], [2006, 6, 30], [2006, 7, 30], [2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30]]], ['partial repair probe 2', [[2005, 8, 13], [2009, 2, 28], 1, False], [[2005, 8, 28], [2005, 9, 28], [2005, 10, 28], [2005, 11, 28], [2005, 12, 28], [2006, 1, 28], [2006, 2, 28], [2006, 3, 28], [2006, 4, 28], [2006, 5, 28], [2006, 6, 28], [2006, 7, 28], [2006, 8, 28], [2006, 9, 28], [2006, 10, 28], [2006, 11, 28], [2006, 12, 28], [2007, 1, 28], [2007, 2, 28], [2007, 3, 28], [2007, 4, 28], [2007, 5, 28], [2007, 6, 28], [2007, 7, 28], [2007, 8, 28], [2007, 9, 28], [2007, 10, 28], [2007, 11, 28], [2007, 12, 28], [2008, 1, 28], [2008, 2, 28], [2008, 3, 28], [2008, 4, 28], [2008, 5, 28], [2008, 6, 28], [2008, 7, 28], [2008, 8, 28], [2008, 9, 28], [2008, 10, 28], [2008, 11, 28], [2008, 12, 28], [2009, 1, 28], [2009, 2, 28]]], ['boundary control 1', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['boundary control 2', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['normal control 1', [[2027, 9, 25], [2027, 9, 30], 1, True], [[2027, 9, 30]]], ['normal control 2', [[2038, 4, 7], [2038, 4, 21], 6, False], [[2038, 4, 21]]]]]\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":"2cb6a8e99628590f4d7f43516cff9f7015d3b2381f2dee78055894cfce704a6b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport datetime\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(issue, maturity, months, eom):\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    def shift(y, m, k):\n        t = y * 12 + (m - 1) - k\n        return t // 12, t % 12 + 1\n    I = datetime.date(*issue)\n    my, mm, md = maturity\n    end_eom = md == mlen(my, mm)\n    out = []\n    k = 0\n    while True:\n        y, m = shift(my, mm, k * months)\n        d = min(md, mlen(y, m))\n        if datetime.date(y, m, d) <= I:\n            break\n        out.append([y, m, d])\n        k += 1\n    out.reverse()\n    if len(out) > 1 and (datetime.date(*out[0]) - I).days < 15:\n        out.pop(0)\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression end-of-month flag 1', [[2016, 10, 14], [2019, 9, 30], 6, True], [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]]], ['regression end-of-month flag 2', [[2008, 4, 3], [2011, 9, 30], 3, True], [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]]], ['partial repair probe 1', [[2035, 9, 1], [2036, 6, 30], 6, False], [[2035, 12, 30], [2036, 6, 30]]], ['partial repair probe 2', [[2006, 8, 13], [2009, 6, 30], 1, False], [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]]], ['boundary control 1', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2003, 5, 3], [2005, 4, 30], 12, False], [[2004, 4, 30], [2005, 4, 30]]], ['normal control 2', [[2026, 3, 1], [2028, 9, 1], 6, True], [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]]]], [['regression end-of-month flag 1', [[2027, 9, 4], [2029, 6, 30], 6, True], [[2027, 12, 31], [2028, 6, 30], [2028, 12, 31], [2029, 6, 30]]], ['regression end-of-month flag 2', [[2034, 4, 30], [2035, 9, 30], 6, True], [[2034, 9, 30], [2035, 3, 31], [2035, 9, 30]]], ['partial repair probe 1', [[2010, 6, 19], [2011, 11, 30], 6, False], [[2010, 11, 30], [2011, 5, 30], [2011, 11, 30]]], ['partial repair probe 2', [[2030, 11, 28], [2033, 2, 28], 3, False], [[2031, 2, 28], [2031, 5, 28], [2031, 8, 28], [2031, 11, 28], [2032, 2, 28], [2032, 5, 28], [2032, 8, 28], [2032, 11, 28], [2033, 2, 28]]], ['boundary control 1', [[2024, 3, 1], [2025, 3, 15], 6, False], [[2024, 9, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2022, 8, 18], [2024, 9, 30], 12, True], [[2022, 9, 30], [2023, 9, 30], [2024, 9, 30]]], ['normal control 2', [[2035, 6, 17], [2036, 5, 31], 6, False], [[2035, 11, 30], [2036, 5, 31]]]], [['regression end-of-month flag 1', [[2034, 3, 3], [2034, 9, 30], 3, True], [[2034, 3, 31], [2034, 6, 30], [2034, 9, 30]]], ['regression end-of-month flag 2', [[2015, 3, 25], [2016, 6, 30], 3, True], [[2015, 6, 30], [2015, 9, 30], [2015, 12, 31], [2016, 3, 31], [2016, 6, 30]]], ['partial repair probe 1', [[2035, 6, 29], [2037, 4, 30], 3, False], [[2035, 7, 30], [2035, 10, 30], [2036, 1, 30], [2036, 4, 30], [2036, 7, 30], [2036, 10, 30], [2037, 1, 30], [2037, 4, 30]]], ['partial repair probe 2', [[2014, 6, 8], [2015, 2, 28], 3, False], [[2014, 8, 28], [2014, 11, 28], [2015, 2, 28]]], ['boundary control 1', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2030, 4, 20], [2033, 5, 1], 3, True], [[2030, 8, 1], [2030, 11, 1], [2031, 2, 1], [2031, 5, 1], [2031, 8, 1], [2031, 11, 1], [2032, 2, 1], [2032, 5, 1], [2032, 8, 1], [2032, 11, 1], [2033, 2, 1], [2033, 5, 1]]], ['normal control 2', [[2009, 3, 15], [2013, 3, 1], 12, False], [[2010, 3, 1], [2011, 3, 1], [2012, 3, 1], [2013, 3, 1]]]], [['regression end-of-month flag 1', [[2028, 3, 15], [2031, 6, 30], 3, True], [[2028, 3, 31], [2028, 6, 30], [2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31], [2030, 6, 30], [2030, 9, 30], [2030, 12, 31], [2031, 3, 31], [2031, 6, 30]]], ['regression end-of-month flag 2', [[2031, 2, 15], [2031, 9, 30], 3, True], [[2031, 3, 31], [2031, 6, 30], [2031, 9, 30]]], ['partial repair probe 1', [[2009, 4, 25], [2011, 4, 30], 1, False], [[2009, 5, 30], [2009, 6, 30], [2009, 7, 30], [2009, 8, 30], [2009, 9, 30], [2009, 10, 30], [2009, 11, 30], [2009, 12, 30], [2010, 1, 30], [2010, 2, 28], [2010, 3, 30], [2010, 4, 30], [2010, 5, 30], [2010, 6, 30], [2010, 7, 30], [2010, 8, 30], [2010, 9, 30], [2010, 10, 30], [2010, 11, 30], [2010, 12, 30], [2011, 1, 30], [2011, 2, 28], [2011, 3, 30], [2011, 4, 30]]], ['partial repair probe 2', [[2002, 3, 19], [2004, 6, 30], 1, False], [[2002, 4, 30], [2002, 5, 30], [2002, 6, 30], [2002, 7, 30], [2002, 8, 30], [2002, 9, 30], [2002, 10, 30], [2002, 11, 30], [2002, 12, 30], [2003, 1, 30], [2003, 2, 28], [2003, 3, 30], [2003, 4, 30], [2003, 5, 30], [2003, 6, 30], [2003, 7, 30], [2003, 8, 30], [2003, 9, 30], [2003, 10, 30], [2003, 11, 30], [2003, 12, 30], [2004, 1, 30], [2004, 2, 29], [2004, 3, 30], [2004, 4, 30], [2004, 5, 30], [2004, 6, 30]]], ['boundary control 1', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['boundary control 2', [[2024, 3, 1], [2025, 3, 15], 6, False], [[2024, 9, 15], [2025, 3, 15]]], ['normal control 1', [[2027, 9, 10], [2030, 3, 31], 3, True], [[2027, 9, 30], [2027, 12, 31], [2028, 3, 31], [2028, 6, 30], [2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31]]], ['normal control 2', [[2019, 6, 13], [2019, 6, 30], 6, False], [[2019, 6, 30]]]], [['regression end-of-month flag 1', [[2028, 7, 26], [2031, 6, 30], 3, True], [[2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31], [2030, 6, 30], [2030, 9, 30], [2030, 12, 31], [2031, 3, 31], [2031, 6, 30]]], ['regression end-of-month flag 2', [[2037, 7, 29], [2040, 4, 30], 6, True], [[2037, 10, 31], [2038, 4, 30], [2038, 10, 31], [2039, 4, 30], [2039, 10, 31], [2040, 4, 30]]], ['partial repair probe 1', [[2005, 11, 4], [2008, 4, 30], 1, False], [[2005, 11, 30], [2005, 12, 30], [2006, 1, 30], [2006, 2, 28], [2006, 3, 30], [2006, 4, 30], [2006, 5, 30], [2006, 6, 30], [2006, 7, 30], [2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30]]], ['partial repair probe 2', [[2005, 8, 13], [2009, 2, 28], 1, False], [[2005, 8, 28], [2005, 9, 28], [2005, 10, 28], [2005, 11, 28], [2005, 12, 28], [2006, 1, 28], [2006, 2, 28], [2006, 3, 28], [2006, 4, 28], [2006, 5, 28], [2006, 6, 28], [2006, 7, 28], [2006, 8, 28], [2006, 9, 28], [2006, 10, 28], [2006, 11, 28], [2006, 12, 28], [2007, 1, 28], [2007, 2, 28], [2007, 3, 28], [2007, 4, 28], [2007, 5, 28], [2007, 6, 28], [2007, 7, 28], [2007, 8, 28], [2007, 9, 28], [2007, 10, 28], [2007, 11, 28], [2007, 12, 28], [2008, 1, 28], [2008, 2, 28], [2008, 3, 28], [2008, 4, 28], [2008, 5, 28], [2008, 6, 28], [2008, 7, 28], [2008, 8, 28], [2008, 9, 28], [2008, 10, 28], [2008, 11, 28], [2008, 12, 28], [2009, 1, 28], [2009, 2, 28]]], ['boundary control 1', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['boundary control 2', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['normal control 1', [[2027, 9, 25], [2027, 9, 30], 1, True], [[2027, 9, 30]]], ['normal control 2', [[2038, 4, 7], [2038, 4, 21], 6, False], [[2038, 4, 21]]]]]\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-backward-coupon-schedule-end-of-month-flag","generated_at":"2026-09-29T14:46:50.633844+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 day rule always clamps the maturity day and never applies month-end rolling.","sha256":"209db2f3013678a3b7873096644ac48b8cd9233a520e9761d2f44afc655d8853","title":"Backward coupon schedule generation: the end-of-month flag is not consulted · 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":47.941,"exit_code":1,"observations":[{"actual":[[2017,3,31],[2017,9,30],[2018,3,31],[2018,9,30],[2019,3,31],[2019,9,30]],"check":"regression end-of-month flag 1","expected":[[2017,3,31],[2017,9,30],[2018,3,31],[2018,9,30],[2019,3,31],[2019,9,30]],"passed":true},{"actual":[[2008,6,30],[2008,9,30],[2008,12,31],[2009,3,31],[2009,6,30],[2009,9,30],[2009,12,31],[2010,3,31],[2010,6,30],[2010,9,30],[2010,12,31],[2011,3,31],[2011,6,30],[2011,9,30]],"check":"regression end-of-month flag 2","expected":[[2008,6,30],[2008,9,30],[2008,12,31],[2009,3,31],[2009,6,30],[2009,9,30],[2009,12,31],[2010,3,31],[2010,6,30],[2010,9,30],[2010,12,31],[2011,3,31],[2011,6,30],[2011,9,30]],"passed":true},{"actual":[[2035,12,31],[2036,6,30]],"check":"partial repair probe 1","expected":[[2035,12,30],[2036,6,30]],"passed":false},{"actual":[[2006,8,31],[2006,9,30],[2006,10,31],[2006,11,30],[2006,12,31],[2007,1,31],[2007,2,28],[2007,3,31],[2007,4,30],[2007,5,31],[2007,6,30],[2007,7,31],[2007,8,31],[2007,9,30],[2007,10,31],[2007,11,30],[2007,12,31],[2008,1,31],[2008,2,29],[2008,3,31],[2008,4,30],[2008,5,31],[2008,6,30],[2008,7,31],[2008,8,31],[2008,9,30],[2008,10,31],[2008,11,30],[2008,12,31],[2009,1,31],[2009,2,28],[2009,3,31],[2009,4,30],[2009,5,31],[2009,6,30]],"check":"partial repair probe 2","expected":[[2006,8,30],[2006,9,30],[2006,10,30],[2006,11,30],[2006,12,30],[2007,1,30],[2007,2,28],[2007,3,30],[2007,4,30],[2007,5,30],[2007,6,30],[2007,7,30],[2007,8,30],[2007,9,30],[2007,10,30],[2007,11,30],[2007,12,30],[2008,1,30],[2008,2,29],[2008,3,30],[2008,4,30],[2008,5,30],[2008,6,30],[2008,7,30],[2008,8,30],[2008,9,30],[2008,10,30],[2008,11,30],[2008,12,30],[2009,1,30],[2009,2,28],[2009,3,30],[2009,4,30],[2009,5,30],[2009,6,30]],"passed":false},{"actual":[[2024,6,15],[2024,9,15],[2024,12,15],[2025,3,15]],"check":"boundary control 1","expected":[[2024,6,15],[2024,9,15],[2024,12,15],[2025,3,15]],"passed":true},{"actual":[[2024,2,29],[2024,8,31],[2025,2,28],[2025,8,31]],"check":"boundary control 2","expected":[[2024,2,29],[2024,8,31],[2025,2,28],[2025,8,31]],"passed":true},{"actual":[[2004,4,30],[2005,4,30]],"check":"normal control 1","expected":[[2004,4,30],[2005,4,30]],"passed":true},{"actual":[[2026,9,1],[2027,3,1],[2027,9,1],[2028,3,1],[2028,9,1]],"check":"normal control 2","expected":[[2026,9,1],[2027,3,1],[2027,9,1],[2028,3,1],[2028,9,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression end-of-month flag 1\", \"actual\": [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]], \"expected\": [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]], \"passed\": true}, {\"check\": \"regression end-of-month flag 2\", \"actual\": [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]], \"expected\": [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]], \"passed\": true}, {\"check\": \"partial repair probe 1\", \"actual\": [[2035, 12, 31], [2036, 6, 30]], \"expected\": [[2035, 12, 30], [2036, 6, 30]], \"passed\": false}, {\"check\": \"partial repair probe 2\", \"actual\": [[2006, 8, 31], [2006, 9, 30], [2006, 10, 31], [2006, 11, 30], [2006, 12, 31], [2007, 1, 31], [2007, 2, 28], [2007, 3, 31], [2007, 4, 30], [2007, 5, 31], [2007, 6, 30], [2007, 7, 31], [2007, 8, 31], [2007, 9, 30], [2007, 10, 31], [2007, 11, 30], [2007, 12, 31], [2008, 1, 31], [2008, 2, 29], [2008, 3, 31], [2008, 4, 30], [2008, 5, 31], [2008, 6, 30], [2008, 7, 31], [2008, 8, 31], [2008, 9, 30], [2008, 10, 31], [2008, 11, 30], [2008, 12, 31], [2009, 1, 31], [2009, 2, 28], [2009, 3, 31], [2009, 4, 30], [2009, 5, 31], [2009, 6, 30]], \"expected\": [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]], \"passed\": false}, {\"check\": \"boundary control 1\", \"actual\": [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]], \"expected\": [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]], \"expected\": [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [[2004, 4, 30], [2005, 4, 30]], \"expected\": [[2004, 4, 30], [2005, 4, 30]], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]], \"expected\": [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.5,"exit_code":1,"observations":[{"actual":[[2017,3,30],[2017,9,30],[2018,3,30],[2018,9,30],[2019,3,30],[2019,9,30]],"check":"regression end-of-month flag 1","expected":[[2017,3,31],[2017,9,30],[2018,3,31],[2018,9,30],[2019,3,31],[2019,9,30]],"passed":false},{"actual":[[2008,6,30],[2008,9,30],[2008,12,30],[2009,3,30],[2009,6,30],[2009,9,30],[2009,12,30],[2010,3,30],[2010,6,30],[2010,9,30],[2010,12,30],[2011,3,30],[2011,6,30],[2011,9,30]],"check":"regression end-of-month flag 2","expected":[[2008,6,30],[2008,9,30],[2008,12,31],[2009,3,31],[2009,6,30],[2009,9,30],[2009,12,31],[2010,3,31],[2010,6,30],[2010,9,30],[2010,12,31],[2011,3,31],[2011,6,30],[2011,9,30]],"passed":false},{"actual":[[2035,12,30],[2036,6,30]],"check":"partial repair probe 1","expected":[[2035,12,30],[2036,6,30]],"passed":true},{"actual":[[2006,8,30],[2006,9,30],[2006,10,30],[2006,11,30],[2006,12,30],[2007,1,30],[2007,2,28],[2007,3,30],[2007,4,30],[2007,5,30],[2007,6,30],[2007,7,30],[2007,8,30],[2007,9,30],[2007,10,30],[2007,11,30],[2007,12,30],[2008,1,30],[2008,2,29],[2008,3,30],[2008,4,30],[2008,5,30],[2008,6,30],[2008,7,30],[2008,8,30],[2008,9,30],[2008,10,30],[2008,11,30],[2008,12,30],[2009,1,30],[2009,2,28],[2009,3,30],[2009,4,30],[2009,5,30],[2009,6,30]],"check":"partial repair probe 2","expected":[[2006,8,30],[2006,9,30],[2006,10,30],[2006,11,30],[2006,12,30],[2007,1,30],[2007,2,28],[2007,3,30],[2007,4,30],[2007,5,30],[2007,6,30],[2007,7,30],[2007,8,30],[2007,9,30],[2007,10,30],[2007,11,30],[2007,12,30],[2008,1,30],[2008,2,29],[2008,3,30],[2008,4,30],[2008,5,30],[2008,6,30],[2008,7,30],[2008,8,30],[2008,9,30],[2008,10,30],[2008,11,30],[2008,12,30],[2009,1,30],[2009,2,28],[2009,3,30],[2009,4,30],[2009,5,30],[2009,6,30]],"passed":true},{"actual":[[2024,6,15],[2024,9,15],[2024,12,15],[2025,3,15]],"check":"boundary control 1","expected":[[2024,6,15],[2024,9,15],[2024,12,15],[2025,3,15]],"passed":true},{"actual":[[2024,2,29],[2024,8,31],[2025,2,28],[2025,8,31]],"check":"boundary control 2","expected":[[2024,2,29],[2024,8,31],[2025,2,28],[2025,8,31]],"passed":true},{"actual":[[2004,4,30],[2005,4,30]],"check":"normal control 1","expected":[[2004,4,30],[2005,4,30]],"passed":true},{"actual":[[2026,9,1],[2027,3,1],[2027,9,1],[2028,3,1],[2028,9,1]],"check":"normal control 2","expected":[[2026,9,1],[2027,3,1],[2027,9,1],[2028,3,1],[2028,9,1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression end-of-month flag 1\", \"actual\": [[2017, 3, 30], [2017, 9, 30], [2018, 3, 30], [2018, 9, 30], [2019, 3, 30], [2019, 9, 30]], \"expected\": [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]], \"passed\": false}, {\"check\": \"regression end-of-month flag 2\", \"actual\": [[2008, 6, 30], [2008, 9, 30], [2008, 12, 30], [2009, 3, 30], [2009, 6, 30], [2009, 9, 30], [2009, 12, 30], [2010, 3, 30], [2010, 6, 30], [2010, 9, 30], [2010, 12, 30], [2011, 3, 30], [2011, 6, 30], [2011, 9, 30]], \"expected\": [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]], \"passed\": false}, {\"check\": \"partial repair probe 1\", \"actual\": [[2035, 12, 30], [2036, 6, 30]], \"expected\": [[2035, 12, 30], [2036, 6, 30]], \"passed\": true}, {\"check\": \"partial repair probe 2\", \"actual\": [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]], \"expected\": [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]], \"passed\": true}, {\"check\": \"boundary control 1\", \"actual\": [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]], \"expected\": [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]], \"passed\": true}, {\"check\": \"boundary control 2\", \"actual\": [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]], \"expected\": [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]], \"passed\": true}, {\"check\": \"normal control 1\", \"actual\": [[2004, 4, 30], [2005, 4, 30]], \"expected\": [[2004, 4, 30], [2005, 4, 30]], \"passed\": true}, {\"check\": \"normal control 2\", \"actual\": [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]], \"expected\": [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]], \"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."}}