FAILURE MAP
← Case archive

FA-61081 / Bond day-count conventions / Open access

Street-convention yield to price with fractional first period: coupons are discounted by whole periods · case 01

Dirty prices ignore the partial first period and jump at each coupon date.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Each coupon exponent uses k+1 instead of k+w.

VERIFIED REPAIR

Discount the k-th remaining coupon by v^(k+w).

Unsuccessful approach: Using k+1-w reverses the fractional adjustment.

Case contract

Inputs settle, prev and next coupon dates [y,m,d], n remaining coupons (including next), annual coupon rate, annual yield y and frequency. w = days(settle, next)/days(prev, next); c = 100*rate/freq; v = 1/(1+y/freq). Dirty = sum_{k=0}^{n-1} c*v^(k+w) + 100*v^(n-1+w); accrued = c*(1-w); return [dirty, dirty-accrued] each rounded to 6 decimals.

Why this case matters

Bond accrual and pricing systems depend on exact day-count arithmetic; a single-day error changes settlement cash.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
N = 1
observations = []
def solve(settle, prev, nxt, n, rate, y, freq):
    S = datetime.date(*settle)
    P = datetime.date(*prev)
    Q = datetime.date(*nxt)
    w = (Q - S).days / (Q - P).days
    c = 100 * rate / freq
    v = 1 / (1 + y / freq)
    dirty = sum(c * v ** (k + 1) for k in range(n)) + 100 * v ** (n - 1 + w)
    accrued = c * (1 - w)
    return [round(dirty, 6), round(dirty - accrued, 6)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression coupon discount exponent 1', [[2037, 5, 31], [2036, 10, 15], [2037, 10, 15], 22, 0.015, 0.02, 1], [92.305752, 91.368766]], ['regression coupon discount exponent 2', [[2038, 7, 4], [2037, 12, 30], [2038, 12, 30], 5, 0.075, 0.005, 1], [134.823296, 131.001378]], ['partial repair probe 1', [[2027, 12, 5], [2027, 12, 5], [2028, 6, 5], 24, 0.03, 0.08, 2], [61.882592, 61.882592]], ['partial repair probe 2', [[2023, 2, 28], [2023, 2, 28], [2023, 8, 28], 29, 0.06, 0.05, 2], [110.226775, 110.226775]], ['normal control 1', [[2024, 8, 23], [2024, 5, 28], [2024, 8, 28], 13, 0.0, 0.11, 4], [72.107048, 72.107048]], ['normal control 2', [[2025, 1, 22], [2024, 12, 29], [2025, 3, 29], 21, 0.0, 0.005, 4], [97.443206, 97.443206]], ['normal control 3', [[2021, 9, 15], [2021, 9, 15], [2022, 3, 15], 7, 0.0, 0.035, 2], [88.564378, 88.564378]], ['normal control 4', [[2007, 9, 29], [2007, 8, 25], [2007, 11, 25], 18, 0.0, 0.005, 4], [97.822977, 97.822977]]], [['regression coupon discount exponent 1', [[2009, 3, 16], [2008, 9, 21], [2009, 9, 21], 6, 0.015, 0.035, 1], [90.837282, 90.113994]], ['regression coupon discount exponent 2', [[2036, 6, 14], [2036, 5, 5], [2036, 11, 5], 29, 0.015, 0.08, 2], [45.186561, 45.023518]], ['partial repair probe 1', [[2005, 9, 30], [2005, 9, 30], [2005, 12, 30], 11, 0.015, 0.11, 4], [77.717586, 77.717586]], ['partial repair probe 2', [[2009, 3, 31], [2009, 3, 31], [2010, 3, 31], 7, 0.015, 0.05, 1], [79.747693, 79.747693]], ['normal control 1', [[2027, 3, 9], [2026, 5, 4], [2027, 5, 4], 25, 0.0, 0.035, 1], [43.565167, 43.565167]], ['normal control 2', [[2034, 8, 18], [2034, 6, 30], [2034, 9, 30], 6, 0.0, 0.05, 4], [93.433636, 93.433636]], ['normal control 3', [[2034, 1, 15], [2034, 1, 15], [2034, 7, 15], 24, 0.0, 0.005, 2], [94.183505, 94.183505]], ['normal control 4', [[2037, 1, 9], [2036, 12, 28], [2037, 6, 28], 16, 0.0, 0.02, 2], [85.338095, 85.338095]]], [['regression coupon discount exponent 1', [[2006, 11, 24], [2006, 9, 30], [2007, 9, 30], 1, 0.03, 0.02, 1], [101.282163, 100.830109]], ['regression coupon discount exponent 2', [[2008, 12, 14], [2008, 10, 22], [2009, 4, 22], 6, 0.03, 0.11, 2], [81.275258, 80.838444]], ['partial repair probe 1', [[2038, 1, 2], [2038, 1, 2], [2038, 4, 2], 9, 0.03, 0.11, 4], [84.244643, 84.244643]], ['partial repair probe 2', [[2021, 2, 28], [2021, 2, 28], [2022, 2, 28], 18, 0.06, 0.005, 1], [194.450224, 194.450224]], ['normal control 1', [[2037, 9, 15], [2037, 6, 30], [2037, 9, 30], 21, 0.0, 0.005, 4], [97.512651, 97.512651]], ['normal control 2', [[2015, 10, 10], [2015, 9, 3], [2016, 3, 3], 15, 0.0, 0.035, 2], [77.359821, 77.359821]], ['normal control 3', [[2015, 6, 30], [2015, 6, 30], [2016, 6, 30], 30, 0.0, 0.02, 1], [55.207089, 55.207089]], ['normal control 4', [[2036, 10, 21], [2036, 8, 21], [2037, 8, 21], 5, 0.0, 0.035, 1], [84.682785, 84.682785]]], [['regression coupon discount exponent 1', [[2033, 11, 7], [2033, 9, 12], [2034, 3, 12], 2, 0.03, 0.005, 2], [102.569862, 102.105774]], ['regression coupon discount exponent 2', [[2009, 7, 12], [2009, 2, 28], [2009, 8, 28], 8, 0.045, 0.11, 2], [82.623631, 80.957885]], ['partial repair probe 1', [[2032, 11, 24], [2032, 11, 24], [2033, 5, 24], 20, 0.075, 0.035, 2], [133.505763, 133.505763]], ['partial repair probe 2', [[2030, 2, 16], [2030, 2, 16], [2030, 5, 16], 8, 0.075, 0.11, 4], [93.792475, 93.792475]], ['normal control 1', [[2034, 1, 24], [2033, 11, 9], [2034, 5, 9], 27, 0.0, 0.11, 2], [24.096116, 24.096116]], ['normal control 2', [[2008, 4, 30], [2007, 10, 25], [2008, 10, 25], 20, 0.0, 0.11, 1], [13.086427, 13.086427]], ['normal control 3', [[2006, 9, 12], [2006, 9, 4], [2006, 12, 4], 2, 0.0, 0.05, 4], [97.652693, 97.652693]], ['normal control 4', [[2019, 4, 30], [2018, 8, 14], [2019, 8, 14], 28, 0.0, 0.035, 1], [39.10855, 39.10855]]], [['regression coupon discount exponent 1', [[2009, 8, 21], [2009, 7, 27], [2009, 10, 27], 17, 0.045, 0.05, 4], [98.427962, 98.122255]], ['regression coupon discount exponent 2', [[2013, 4, 13], [2013, 2, 8], [2013, 5, 8], 30, 0.06, 0.11, 4], [76.159718, 75.081067]], ['partial repair probe 1', [[2019, 12, 28], [2019, 12, 28], [2020, 6, 28], 7, 0.03, 0.05, 2], [93.650609, 93.650609]], ['partial repair probe 2', [[2029, 5, 31], [2029, 5, 31], [2029, 11, 30], 12, 0.045, 0.11, 2], [71.989817, 71.989817]], ['normal control 1', [[2009, 10, 31], [2009, 10, 31], [2010, 10, 31], 12, 0.0, 0.02, 1], [78.849318, 78.849318]], ['normal control 2', [[2039, 1, 15], [2038, 12, 30], [2039, 12, 30], 22, 0.0, 0.005, 1], [89.627564, 89.627564]], ['normal control 3', [[2009, 5, 17], [2009, 2, 1], [2009, 8, 1], 16, 0.0, 0.08, 2], [54.619509, 54.619509]], ['normal control 4', [[2012, 6, 23], [2012, 3, 29], [2012, 6, 29], 19, 0.0, 0.02, 4], [91.383886, 91.383886]]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression coupon discount exponent 1[91.976076, 91.03909][92.305752, 91.368766]Failed
regression coupon discount exponent 2[134.729279, 130.907362][134.823296, 131.001378]Failed
partial repair probe 1[61.882592, 61.882592][61.882592, 61.882592]Passed
partial repair probe 2[110.226775, 110.226775][110.226775, 110.226775]Passed
normal control 1[72.107048, 72.107048][72.107048, 72.107048]Passed
normal control 2[97.443206, 97.443206][97.443206, 97.443206]Passed
normal control 3[88.564378, 88.564378][88.564378, 88.564378]Passed
normal control 4[97.822977, 97.822977][97.822977, 97.822977]Passed

SHA-256 / c613d519a024babcae1e6ec3fa1c5b21228cbc461309924de63ac4854777ac87

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
N = 1
observations = []
def solve(settle, prev, nxt, n, rate, y, freq):
    S = datetime.date(*settle)
    P = datetime.date(*prev)
    Q = datetime.date(*nxt)
    w = (Q - S).days / (Q - P).days
    c = 100 * rate / freq
    v = 1 / (1 + y / freq)
    dirty = sum(c * v ** (k + 1 - w) for k in range(n)) + 100 * v ** (n - 1 + w)
    accrued = c * (1 - w)
    return [round(dirty, 6), round(dirty - accrued, 6)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression coupon discount exponent 1', [[2037, 5, 31], [2036, 10, 15], [2037, 10, 15], 22, 0.015, 0.02, 1], [92.305752, 91.368766]], ['regression coupon discount exponent 2', [[2038, 7, 4], [2037, 12, 30], [2038, 12, 30], 5, 0.075, 0.005, 1], [134.823296, 131.001378]], ['partial repair probe 1', [[2027, 12, 5], [2027, 12, 5], [2028, 6, 5], 24, 0.03, 0.08, 2], [61.882592, 61.882592]], ['partial repair probe 2', [[2023, 2, 28], [2023, 2, 28], [2023, 8, 28], 29, 0.06, 0.05, 2], [110.226775, 110.226775]], ['normal control 1', [[2024, 8, 23], [2024, 5, 28], [2024, 8, 28], 13, 0.0, 0.11, 4], [72.107048, 72.107048]], ['normal control 2', [[2025, 1, 22], [2024, 12, 29], [2025, 3, 29], 21, 0.0, 0.005, 4], [97.443206, 97.443206]], ['normal control 3', [[2021, 9, 15], [2021, 9, 15], [2022, 3, 15], 7, 0.0, 0.035, 2], [88.564378, 88.564378]], ['normal control 4', [[2007, 9, 29], [2007, 8, 25], [2007, 11, 25], 18, 0.0, 0.005, 4], [97.822977, 97.822977]]], [['regression coupon discount exponent 1', [[2009, 3, 16], [2008, 9, 21], [2009, 9, 21], 6, 0.015, 0.035, 1], [90.837282, 90.113994]], ['regression coupon discount exponent 2', [[2036, 6, 14], [2036, 5, 5], [2036, 11, 5], 29, 0.015, 0.08, 2], [45.186561, 45.023518]], ['partial repair probe 1', [[2005, 9, 30], [2005, 9, 30], [2005, 12, 30], 11, 0.015, 0.11, 4], [77.717586, 77.717586]], ['partial repair probe 2', [[2009, 3, 31], [2009, 3, 31], [2010, 3, 31], 7, 0.015, 0.05, 1], [79.747693, 79.747693]], ['normal control 1', [[2027, 3, 9], [2026, 5, 4], [2027, 5, 4], 25, 0.0, 0.035, 1], [43.565167, 43.565167]], ['normal control 2', [[2034, 8, 18], [2034, 6, 30], [2034, 9, 30], 6, 0.0, 0.05, 4], [93.433636, 93.433636]], ['normal control 3', [[2034, 1, 15], [2034, 1, 15], [2034, 7, 15], 24, 0.0, 0.005, 2], [94.183505, 94.183505]], ['normal control 4', [[2037, 1, 9], [2036, 12, 28], [2037, 6, 28], 16, 0.0, 0.02, 2], [85.338095, 85.338095]]], [['regression coupon discount exponent 1', [[2006, 11, 24], [2006, 9, 30], [2007, 9, 30], 1, 0.03, 0.02, 1], [101.282163, 100.830109]], ['regression coupon discount exponent 2', [[2008, 12, 14], [2008, 10, 22], [2009, 4, 22], 6, 0.03, 0.11, 2], [81.275258, 80.838444]], ['partial repair probe 1', [[2038, 1, 2], [2038, 1, 2], [2038, 4, 2], 9, 0.03, 0.11, 4], [84.244643, 84.244643]], ['partial repair probe 2', [[2021, 2, 28], [2021, 2, 28], [2022, 2, 28], 18, 0.06, 0.005, 1], [194.450224, 194.450224]], ['normal control 1', [[2037, 9, 15], [2037, 6, 30], [2037, 9, 30], 21, 0.0, 0.005, 4], [97.512651, 97.512651]], ['normal control 2', [[2015, 10, 10], [2015, 9, 3], [2016, 3, 3], 15, 0.0, 0.035, 2], [77.359821, 77.359821]], ['normal control 3', [[2015, 6, 30], [2015, 6, 30], [2016, 6, 30], 30, 0.0, 0.02, 1], [55.207089, 55.207089]], ['normal control 4', [[2036, 10, 21], [2036, 8, 21], [2037, 8, 21], 5, 0.0, 0.035, 1], [84.682785, 84.682785]]], [['regression coupon discount exponent 1', [[2033, 11, 7], [2033, 9, 12], [2034, 3, 12], 2, 0.03, 0.005, 2], [102.569862, 102.105774]], ['regression coupon discount exponent 2', [[2009, 7, 12], [2009, 2, 28], [2009, 8, 28], 8, 0.045, 0.11, 2], [82.623631, 80.957885]], ['partial repair probe 1', [[2032, 11, 24], [2032, 11, 24], [2033, 5, 24], 20, 0.075, 0.035, 2], [133.505763, 133.505763]], ['partial repair probe 2', [[2030, 2, 16], [2030, 2, 16], [2030, 5, 16], 8, 0.075, 0.11, 4], [93.792475, 93.792475]], ['normal control 1', [[2034, 1, 24], [2033, 11, 9], [2034, 5, 9], 27, 0.0, 0.11, 2], [24.096116, 24.096116]], ['normal control 2', [[2008, 4, 30], [2007, 10, 25], [2008, 10, 25], 20, 0.0, 0.11, 1], [13.086427, 13.086427]], ['normal control 3', [[2006, 9, 12], [2006, 9, 4], [2006, 12, 4], 2, 0.0, 0.05, 4], [97.652693, 97.652693]], ['normal control 4', [[2019, 4, 30], [2018, 8, 14], [2019, 8, 14], 28, 0.0, 0.035, 1], [39.10855, 39.10855]]], [['regression coupon discount exponent 1', [[2009, 8, 21], [2009, 7, 27], [2009, 10, 27], 17, 0.045, 0.05, 4], [98.427962, 98.122255]], ['regression coupon discount exponent 2', [[2013, 4, 13], [2013, 2, 8], [2013, 5, 8], 30, 0.06, 0.11, 4], [76.159718, 75.081067]], ['partial repair probe 1', [[2019, 12, 28], [2019, 12, 28], [2020, 6, 28], 7, 0.03, 0.05, 2], [93.650609, 93.650609]], ['partial repair probe 2', [[2029, 5, 31], [2029, 5, 31], [2029, 11, 30], 12, 0.045, 0.11, 2], [71.989817, 71.989817]], ['normal control 1', [[2009, 10, 31], [2009, 10, 31], [2010, 10, 31], 12, 0.0, 0.02, 1], [78.849318, 78.849318]], ['normal control 2', [[2039, 1, 15], [2038, 12, 30], [2039, 12, 30], 22, 0.0, 0.005, 1], [89.627564, 89.627564]], ['normal control 3', [[2009, 5, 17], [2009, 2, 1], [2009, 8, 1], 16, 0.0, 0.08, 2], [54.619509, 54.619509]], ['normal control 4', [[2012, 6, 23], [2012, 3, 29], [2012, 6, 29], 19, 0.0, 0.02, 4], [91.383886, 91.383886]]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression coupon discount exponent 1[92.173682, 91.236695][92.305752, 91.368766]Failed
regression coupon discount exponent 2[134.819753, 130.997835][134.823296, 131.001378]Failed
partial repair probe 1[62.79741, 62.79741][61.882592, 61.882592]Failed
partial repair probe 2[111.760791, 111.760791][110.226775, 110.226775]Failed
normal control 1[72.107048, 72.107048][72.107048, 72.107048]Passed
normal control 2[97.443206, 97.443206][97.443206, 97.443206]Passed
normal control 3[88.564378, 88.564378][88.564378, 88.564378]Passed
normal control 4[97.822977, 97.822977][97.822977, 97.822977]Passed

SHA-256 / 9530fdc34ea1be81512b7d6ca199c47ffb1f8863c4dc1b9e5842d3b3572352d8

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
N = 1
observations = []
def solve(settle, prev, nxt, n, rate, y, freq):
    S = datetime.date(*settle)
    P = datetime.date(*prev)
    Q = datetime.date(*nxt)
    w = (Q - S).days / (Q - P).days
    c = 100 * rate / freq
    v = 1 / (1 + y / freq)
    dirty = sum(c * v ** (k + w) for k in range(n)) + 100 * v ** (n - 1 + w)
    accrued = c * (1 - w)
    return [round(dirty, 6), round(dirty - accrued, 6)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression coupon discount exponent 1', [[2037, 5, 31], [2036, 10, 15], [2037, 10, 15], 22, 0.015, 0.02, 1], [92.305752, 91.368766]], ['regression coupon discount exponent 2', [[2038, 7, 4], [2037, 12, 30], [2038, 12, 30], 5, 0.075, 0.005, 1], [134.823296, 131.001378]], ['partial repair probe 1', [[2027, 12, 5], [2027, 12, 5], [2028, 6, 5], 24, 0.03, 0.08, 2], [61.882592, 61.882592]], ['partial repair probe 2', [[2023, 2, 28], [2023, 2, 28], [2023, 8, 28], 29, 0.06, 0.05, 2], [110.226775, 110.226775]], ['normal control 1', [[2024, 8, 23], [2024, 5, 28], [2024, 8, 28], 13, 0.0, 0.11, 4], [72.107048, 72.107048]], ['normal control 2', [[2025, 1, 22], [2024, 12, 29], [2025, 3, 29], 21, 0.0, 0.005, 4], [97.443206, 97.443206]], ['normal control 3', [[2021, 9, 15], [2021, 9, 15], [2022, 3, 15], 7, 0.0, 0.035, 2], [88.564378, 88.564378]], ['normal control 4', [[2007, 9, 29], [2007, 8, 25], [2007, 11, 25], 18, 0.0, 0.005, 4], [97.822977, 97.822977]]], [['regression coupon discount exponent 1', [[2009, 3, 16], [2008, 9, 21], [2009, 9, 21], 6, 0.015, 0.035, 1], [90.837282, 90.113994]], ['regression coupon discount exponent 2', [[2036, 6, 14], [2036, 5, 5], [2036, 11, 5], 29, 0.015, 0.08, 2], [45.186561, 45.023518]], ['partial repair probe 1', [[2005, 9, 30], [2005, 9, 30], [2005, 12, 30], 11, 0.015, 0.11, 4], [77.717586, 77.717586]], ['partial repair probe 2', [[2009, 3, 31], [2009, 3, 31], [2010, 3, 31], 7, 0.015, 0.05, 1], [79.747693, 79.747693]], ['normal control 1', [[2027, 3, 9], [2026, 5, 4], [2027, 5, 4], 25, 0.0, 0.035, 1], [43.565167, 43.565167]], ['normal control 2', [[2034, 8, 18], [2034, 6, 30], [2034, 9, 30], 6, 0.0, 0.05, 4], [93.433636, 93.433636]], ['normal control 3', [[2034, 1, 15], [2034, 1, 15], [2034, 7, 15], 24, 0.0, 0.005, 2], [94.183505, 94.183505]], ['normal control 4', [[2037, 1, 9], [2036, 12, 28], [2037, 6, 28], 16, 0.0, 0.02, 2], [85.338095, 85.338095]]], [['regression coupon discount exponent 1', [[2006, 11, 24], [2006, 9, 30], [2007, 9, 30], 1, 0.03, 0.02, 1], [101.282163, 100.830109]], ['regression coupon discount exponent 2', [[2008, 12, 14], [2008, 10, 22], [2009, 4, 22], 6, 0.03, 0.11, 2], [81.275258, 80.838444]], ['partial repair probe 1', [[2038, 1, 2], [2038, 1, 2], [2038, 4, 2], 9, 0.03, 0.11, 4], [84.244643, 84.244643]], ['partial repair probe 2', [[2021, 2, 28], [2021, 2, 28], [2022, 2, 28], 18, 0.06, 0.005, 1], [194.450224, 194.450224]], ['normal control 1', [[2037, 9, 15], [2037, 6, 30], [2037, 9, 30], 21, 0.0, 0.005, 4], [97.512651, 97.512651]], ['normal control 2', [[2015, 10, 10], [2015, 9, 3], [2016, 3, 3], 15, 0.0, 0.035, 2], [77.359821, 77.359821]], ['normal control 3', [[2015, 6, 30], [2015, 6, 30], [2016, 6, 30], 30, 0.0, 0.02, 1], [55.207089, 55.207089]], ['normal control 4', [[2036, 10, 21], [2036, 8, 21], [2037, 8, 21], 5, 0.0, 0.035, 1], [84.682785, 84.682785]]], [['regression coupon discount exponent 1', [[2033, 11, 7], [2033, 9, 12], [2034, 3, 12], 2, 0.03, 0.005, 2], [102.569862, 102.105774]], ['regression coupon discount exponent 2', [[2009, 7, 12], [2009, 2, 28], [2009, 8, 28], 8, 0.045, 0.11, 2], [82.623631, 80.957885]], ['partial repair probe 1', [[2032, 11, 24], [2032, 11, 24], [2033, 5, 24], 20, 0.075, 0.035, 2], [133.505763, 133.505763]], ['partial repair probe 2', [[2030, 2, 16], [2030, 2, 16], [2030, 5, 16], 8, 0.075, 0.11, 4], [93.792475, 93.792475]], ['normal control 1', [[2034, 1, 24], [2033, 11, 9], [2034, 5, 9], 27, 0.0, 0.11, 2], [24.096116, 24.096116]], ['normal control 2', [[2008, 4, 30], [2007, 10, 25], [2008, 10, 25], 20, 0.0, 0.11, 1], [13.086427, 13.086427]], ['normal control 3', [[2006, 9, 12], [2006, 9, 4], [2006, 12, 4], 2, 0.0, 0.05, 4], [97.652693, 97.652693]], ['normal control 4', [[2019, 4, 30], [2018, 8, 14], [2019, 8, 14], 28, 0.0, 0.035, 1], [39.10855, 39.10855]]], [['regression coupon discount exponent 1', [[2009, 8, 21], [2009, 7, 27], [2009, 10, 27], 17, 0.045, 0.05, 4], [98.427962, 98.122255]], ['regression coupon discount exponent 2', [[2013, 4, 13], [2013, 2, 8], [2013, 5, 8], 30, 0.06, 0.11, 4], [76.159718, 75.081067]], ['partial repair probe 1', [[2019, 12, 28], [2019, 12, 28], [2020, 6, 28], 7, 0.03, 0.05, 2], [93.650609, 93.650609]], ['partial repair probe 2', [[2029, 5, 31], [2029, 5, 31], [2029, 11, 30], 12, 0.045, 0.11, 2], [71.989817, 71.989817]], ['normal control 1', [[2009, 10, 31], [2009, 10, 31], [2010, 10, 31], 12, 0.0, 0.02, 1], [78.849318, 78.849318]], ['normal control 2', [[2039, 1, 15], [2038, 12, 30], [2039, 12, 30], 22, 0.0, 0.005, 1], [89.627564, 89.627564]], ['normal control 3', [[2009, 5, 17], [2009, 2, 1], [2009, 8, 1], 16, 0.0, 0.08, 2], [54.619509, 54.619509]], ['normal control 4', [[2012, 6, 23], [2012, 3, 29], [2012, 6, 29], 19, 0.0, 0.02, 4], [91.383886, 91.383886]]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression coupon discount exponent 1[92.305752, 91.368766][92.305752, 91.368766]Passed
regression coupon discount exponent 2[134.823296, 131.001378][134.823296, 131.001378]Passed
partial repair probe 1[61.882592, 61.882592][61.882592, 61.882592]Passed
partial repair probe 2[110.226775, 110.226775][110.226775, 110.226775]Passed
normal control 1[72.107048, 72.107048][72.107048, 72.107048]Passed
normal control 2[97.443206, 97.443206][97.443206, 97.443206]Passed
normal control 3[88.564378, 88.564378][88.564378, 88.564378]Passed
normal control 4[97.822977, 97.822977][97.822977, 97.822977]Passed

SHA-256 / f22bcbda484a7b8e6830107e448593d3b933556586dbd84c007c63a8ad78b139

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:46:51.747193+00:00.

Case digest / 7ff9d28e86d229716299091f288334ea827fd2ba8953a0cb1160b3a8abf873d8