FAILURE MAP
← Case archive

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

Street-convention yield to price with fractional first period: accrued interest uses the remaining fraction · case 01

Clean prices move the wrong way through the coupon period.

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

ROOT CAUSE

Accrued is computed as c*w rather than c*(1-w).

VERIFIED REPAIR

Accrued equals the periodic coupon times the elapsed fraction 1-w.

Unsuccessful approach: Using the annual coupon with the right fraction overstates accrued by the frequency.

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 + w) for k in range(n)) + 100 * v ** (n - 1 + w)
    accrued = c * 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 clean price accrued 1', [[2005, 9, 6], [2005, 7, 14], [2006, 1, 14], 7, 0.045, 0.035, 2], [103.794442, 103.134116]], ['regression clean price accrued 2', [[2005, 3, 30], [2005, 1, 16], [2005, 7, 16], 5, 0.03, 0.035, 2], [99.506852, 98.90188]], ['partial repair probe 1', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2007, 2, 2], [2006, 8, 30], [2007, 2, 28], 13, 0.0, 0.05, 2], [74.09376, 74.09376]], ['normal control 2', [[2032, 7, 21], [2032, 5, 7], [2032, 8, 7], 26, 0.0, 0.05, 4], [73.135342, 73.135342]], ['normal control 3', [[2029, 1, 14], [2028, 7, 27], [2029, 1, 27], 1, 0.0, 0.005, 2], [99.982361, 99.982361]], ['normal control 4', [[2036, 2, 29], [2036, 2, 29], [2037, 2, 28], 13, 0.0, 0.11, 1], [25.751426, 25.751426]], ['normal control 5', [[2028, 1, 27], [2027, 9, 30], [2028, 9, 30], 2, 0.0, 0.035, 1], [94.401078, 94.401078]]], [['regression clean price accrued 1', [[2036, 12, 21], [2036, 8, 6], [2037, 8, 6], 21, 0.06, 0.05, 1], [114.906283, 112.654228]], ['regression clean price accrued 2', [[2026, 1, 11], [2025, 11, 22], [2026, 2, 22], 27, 0.015, 0.005, 4], [106.70571, 106.501905]], ['partial repair probe 1', [[2031, 1, 15], [2030, 12, 1], [2031, 3, 1], 15, 0.06, 0.035, 4], [109.224794, 108.474794]], ['partial repair probe 2', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2039, 10, 14], [2039, 5, 14], [2039, 11, 14], 24, 0.0, 0.11, 2], [28.925168, 28.925168]], ['normal control 2', [[2022, 5, 11], [2022, 2, 27], [2022, 5, 27], 18, 0.0, 0.11, 4], [62.746687, 62.746687]], ['normal control 3', [[2018, 5, 31], [2018, 3, 29], [2019, 3, 29], 7, 0.0, 0.11, 1], [49.041305, 49.041305]], ['normal control 4', [[2012, 4, 9], [2012, 2, 25], [2012, 8, 25], 21, 0.0, 0.005, 2], [94.948947, 94.948947]]], [['regression clean price accrued 1', [[2019, 4, 11], [2018, 8, 25], [2019, 8, 25], 17, 0.075, 0.08, 1], [100.160544, 95.455065]], ['regression clean price accrued 2', [[2029, 9, 23], [2029, 8, 31], [2029, 11, 30], 30, 0.045, 0.05, 4], [97.193572, 96.909232]], ['partial repair probe 1', [[2010, 1, 17], [2009, 10, 18], [2010, 4, 18], 25, 0.075, 0.035, 2], [141.439146, 139.564146]], ['partial repair probe 2', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2008, 1, 22], [2007, 11, 28], [2008, 11, 28], 13, 0.0, 0.08, 1], [37.19751, 37.19751]], ['normal control 2', [[2013, 1, 27], [2012, 8, 31], [2013, 2, 28], 14, 0.0, 0.05, 2], [72.226042, 72.226042]], ['normal control 3', [[2015, 12, 22], [2015, 11, 30], [2016, 5, 30], 3, 0.0, 0.02, 2], [97.175826, 97.175826]], ['normal control 4', [[2013, 1, 15], [2012, 11, 30], [2013, 2, 28], 1, 0.0, 0.005, 4], [99.938946, 99.938946]]], [['regression clean price accrued 1', [[2010, 9, 26], [2010, 8, 29], [2010, 11, 29], 19, 0.015, 0.005, 4], [104.730952, 104.616821]], ['regression clean price accrued 2', [[2031, 7, 12], [2031, 4, 29], [2031, 10, 29], 30, 0.045, 0.02, 2], [132.792871, 131.883035]], ['partial repair probe 1', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2035, 10, 4], [2034, 10, 12], [2035, 10, 12], 22, 0.0, 0.08, 1], [19.832093, 19.832093]], ['normal control 2', [[2032, 9, 17], [2032, 6, 29], [2032, 9, 29], 28, 0.0, 0.11, 4], [47.902019, 47.902019]], ['normal control 3', [[2040, 9, 6], [2040, 7, 5], [2040, 10, 5], 11, 0.0, 0.035, 4], [91.405406, 91.405406]], ['normal control 4', [[2011, 8, 31], [2011, 8, 31], [2012, 2, 29], 9, 0.0, 0.11, 2], [61.762926, 61.762926]], ['normal control 5', [[2022, 5, 4], [2022, 2, 28], [2022, 8, 28], 15, 0.0, 0.005, 2], [96.410359, 96.410359]]], [['regression clean price accrued 1', [[2018, 4, 8], [2018, 2, 28], [2018, 5, 28], 12, 0.015, 0.005, 4], [103.032152, 102.867826]], ['regression clean price accrued 2', [[2018, 8, 15], [2017, 12, 4], [2018, 12, 4], 3, 0.03, 0.11, 1], [86.510216, 84.422545]], ['partial repair probe 1', [[2029, 2, 22], [2029, 1, 8], [2029, 4, 8], 22, 0.06, 0.035, 4], [112.949126, 112.199126]], ['partial repair probe 2', [[2031, 5, 13], [2031, 3, 28], [2031, 6, 28], 1, 0.045, 0.08, 4], [100.12867, 99.56617]], ['normal control 1', [[2015, 3, 22], [2014, 12, 28], [2015, 3, 28], 9, 0.0, 0.11, 4], [80.345193, 80.345193]], ['normal control 2', [[2031, 11, 26], [2031, 7, 6], [2032, 1, 6], 28, 0.0, 0.035, 2], [62.357953, 62.357953]], ['normal control 3', [[2012, 2, 6], [2011, 9, 30], [2012, 3, 30], 6, 0.0, 0.11, 2], [75.329725, 75.329725]], ['normal control 4', [[2028, 1, 19], [2027, 11, 30], [2028, 2, 29], 28, 0.0, 0.11, 4], [47.487825, 47.487825]]]]
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 clean price accrued 1[103.794442, 102.204768][103.794442, 103.134116]Failed
regression clean price accrued 2[99.506852, 98.611824][99.506852, 98.90188]Failed
partial repair probe 1[100.995049, 99.995049][100.995049, 99.995049]Passed
normal control 1[74.09376, 74.09376][74.09376, 74.09376]Passed
normal control 2[73.135342, 73.135342][73.135342, 73.135342]Passed
normal control 3[99.982361, 99.982361][99.982361, 99.982361]Passed
normal control 4[25.751426, 25.751426][25.751426, 25.751426]Passed
normal control 5[94.401078, 94.401078][94.401078, 94.401078]Passed

SHA-256 / f727ad431a01d66080e26206ea6ab4782d383b1062198978aa6b17fbcec521e0

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 + w) for k in range(n)) + 100 * v ** (n - 1 + w)
    accrued = 100 * rate * (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 clean price accrued 1', [[2005, 9, 6], [2005, 7, 14], [2006, 1, 14], 7, 0.045, 0.035, 2], [103.794442, 103.134116]], ['regression clean price accrued 2', [[2005, 3, 30], [2005, 1, 16], [2005, 7, 16], 5, 0.03, 0.035, 2], [99.506852, 98.90188]], ['partial repair probe 1', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2007, 2, 2], [2006, 8, 30], [2007, 2, 28], 13, 0.0, 0.05, 2], [74.09376, 74.09376]], ['normal control 2', [[2032, 7, 21], [2032, 5, 7], [2032, 8, 7], 26, 0.0, 0.05, 4], [73.135342, 73.135342]], ['normal control 3', [[2029, 1, 14], [2028, 7, 27], [2029, 1, 27], 1, 0.0, 0.005, 2], [99.982361, 99.982361]], ['normal control 4', [[2036, 2, 29], [2036, 2, 29], [2037, 2, 28], 13, 0.0, 0.11, 1], [25.751426, 25.751426]], ['normal control 5', [[2028, 1, 27], [2027, 9, 30], [2028, 9, 30], 2, 0.0, 0.035, 1], [94.401078, 94.401078]]], [['regression clean price accrued 1', [[2036, 12, 21], [2036, 8, 6], [2037, 8, 6], 21, 0.06, 0.05, 1], [114.906283, 112.654228]], ['regression clean price accrued 2', [[2026, 1, 11], [2025, 11, 22], [2026, 2, 22], 27, 0.015, 0.005, 4], [106.70571, 106.501905]], ['partial repair probe 1', [[2031, 1, 15], [2030, 12, 1], [2031, 3, 1], 15, 0.06, 0.035, 4], [109.224794, 108.474794]], ['partial repair probe 2', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2039, 10, 14], [2039, 5, 14], [2039, 11, 14], 24, 0.0, 0.11, 2], [28.925168, 28.925168]], ['normal control 2', [[2022, 5, 11], [2022, 2, 27], [2022, 5, 27], 18, 0.0, 0.11, 4], [62.746687, 62.746687]], ['normal control 3', [[2018, 5, 31], [2018, 3, 29], [2019, 3, 29], 7, 0.0, 0.11, 1], [49.041305, 49.041305]], ['normal control 4', [[2012, 4, 9], [2012, 2, 25], [2012, 8, 25], 21, 0.0, 0.005, 2], [94.948947, 94.948947]]], [['regression clean price accrued 1', [[2019, 4, 11], [2018, 8, 25], [2019, 8, 25], 17, 0.075, 0.08, 1], [100.160544, 95.455065]], ['regression clean price accrued 2', [[2029, 9, 23], [2029, 8, 31], [2029, 11, 30], 30, 0.045, 0.05, 4], [97.193572, 96.909232]], ['partial repair probe 1', [[2010, 1, 17], [2009, 10, 18], [2010, 4, 18], 25, 0.075, 0.035, 2], [141.439146, 139.564146]], ['partial repair probe 2', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2008, 1, 22], [2007, 11, 28], [2008, 11, 28], 13, 0.0, 0.08, 1], [37.19751, 37.19751]], ['normal control 2', [[2013, 1, 27], [2012, 8, 31], [2013, 2, 28], 14, 0.0, 0.05, 2], [72.226042, 72.226042]], ['normal control 3', [[2015, 12, 22], [2015, 11, 30], [2016, 5, 30], 3, 0.0, 0.02, 2], [97.175826, 97.175826]], ['normal control 4', [[2013, 1, 15], [2012, 11, 30], [2013, 2, 28], 1, 0.0, 0.005, 4], [99.938946, 99.938946]]], [['regression clean price accrued 1', [[2010, 9, 26], [2010, 8, 29], [2010, 11, 29], 19, 0.015, 0.005, 4], [104.730952, 104.616821]], ['regression clean price accrued 2', [[2031, 7, 12], [2031, 4, 29], [2031, 10, 29], 30, 0.045, 0.02, 2], [132.792871, 131.883035]], ['partial repair probe 1', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2035, 10, 4], [2034, 10, 12], [2035, 10, 12], 22, 0.0, 0.08, 1], [19.832093, 19.832093]], ['normal control 2', [[2032, 9, 17], [2032, 6, 29], [2032, 9, 29], 28, 0.0, 0.11, 4], [47.902019, 47.902019]], ['normal control 3', [[2040, 9, 6], [2040, 7, 5], [2040, 10, 5], 11, 0.0, 0.035, 4], [91.405406, 91.405406]], ['normal control 4', [[2011, 8, 31], [2011, 8, 31], [2012, 2, 29], 9, 0.0, 0.11, 2], [61.762926, 61.762926]], ['normal control 5', [[2022, 5, 4], [2022, 2, 28], [2022, 8, 28], 15, 0.0, 0.005, 2], [96.410359, 96.410359]]], [['regression clean price accrued 1', [[2018, 4, 8], [2018, 2, 28], [2018, 5, 28], 12, 0.015, 0.005, 4], [103.032152, 102.867826]], ['regression clean price accrued 2', [[2018, 8, 15], [2017, 12, 4], [2018, 12, 4], 3, 0.03, 0.11, 1], [86.510216, 84.422545]], ['partial repair probe 1', [[2029, 2, 22], [2029, 1, 8], [2029, 4, 8], 22, 0.06, 0.035, 4], [112.949126, 112.199126]], ['partial repair probe 2', [[2031, 5, 13], [2031, 3, 28], [2031, 6, 28], 1, 0.045, 0.08, 4], [100.12867, 99.56617]], ['normal control 1', [[2015, 3, 22], [2014, 12, 28], [2015, 3, 28], 9, 0.0, 0.11, 4], [80.345193, 80.345193]], ['normal control 2', [[2031, 11, 26], [2031, 7, 6], [2032, 1, 6], 28, 0.0, 0.035, 2], [62.357953, 62.357953]], ['normal control 3', [[2012, 2, 6], [2011, 9, 30], [2012, 3, 30], 6, 0.0, 0.11, 2], [75.329725, 75.329725]], ['normal control 4', [[2028, 1, 19], [2027, 11, 30], [2028, 2, 29], 28, 0.0, 0.11, 4], [47.487825, 47.487825]]]]
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 clean price accrued 1[103.794442, 102.47379][103.794442, 103.134116]Failed
regression clean price accrued 2[99.506852, 98.296907][99.506852, 98.90188]Failed
partial repair probe 1[100.995049, 98.995049][100.995049, 99.995049]Failed
normal control 1[74.09376, 74.09376][74.09376, 74.09376]Passed
normal control 2[73.135342, 73.135342][73.135342, 73.135342]Passed
normal control 3[99.982361, 99.982361][99.982361, 99.982361]Passed
normal control 4[25.751426, 25.751426][25.751426, 25.751426]Passed
normal control 5[94.401078, 94.401078][94.401078, 94.401078]Passed

SHA-256 / 37e04521d026b6e5ed4d8d591aa400ec9d6dae23740f5039fc50c857fc435d6e

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 clean price accrued 1', [[2005, 9, 6], [2005, 7, 14], [2006, 1, 14], 7, 0.045, 0.035, 2], [103.794442, 103.134116]], ['regression clean price accrued 2', [[2005, 3, 30], [2005, 1, 16], [2005, 7, 16], 5, 0.03, 0.035, 2], [99.506852, 98.90188]], ['partial repair probe 1', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2007, 2, 2], [2006, 8, 30], [2007, 2, 28], 13, 0.0, 0.05, 2], [74.09376, 74.09376]], ['normal control 2', [[2032, 7, 21], [2032, 5, 7], [2032, 8, 7], 26, 0.0, 0.05, 4], [73.135342, 73.135342]], ['normal control 3', [[2029, 1, 14], [2028, 7, 27], [2029, 1, 27], 1, 0.0, 0.005, 2], [99.982361, 99.982361]], ['normal control 4', [[2036, 2, 29], [2036, 2, 29], [2037, 2, 28], 13, 0.0, 0.11, 1], [25.751426, 25.751426]], ['normal control 5', [[2028, 1, 27], [2027, 9, 30], [2028, 9, 30], 2, 0.0, 0.035, 1], [94.401078, 94.401078]]], [['regression clean price accrued 1', [[2036, 12, 21], [2036, 8, 6], [2037, 8, 6], 21, 0.06, 0.05, 1], [114.906283, 112.654228]], ['regression clean price accrued 2', [[2026, 1, 11], [2025, 11, 22], [2026, 2, 22], 27, 0.015, 0.005, 4], [106.70571, 106.501905]], ['partial repair probe 1', [[2031, 1, 15], [2030, 12, 1], [2031, 3, 1], 15, 0.06, 0.035, 4], [109.224794, 108.474794]], ['partial repair probe 2', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2039, 10, 14], [2039, 5, 14], [2039, 11, 14], 24, 0.0, 0.11, 2], [28.925168, 28.925168]], ['normal control 2', [[2022, 5, 11], [2022, 2, 27], [2022, 5, 27], 18, 0.0, 0.11, 4], [62.746687, 62.746687]], ['normal control 3', [[2018, 5, 31], [2018, 3, 29], [2019, 3, 29], 7, 0.0, 0.11, 1], [49.041305, 49.041305]], ['normal control 4', [[2012, 4, 9], [2012, 2, 25], [2012, 8, 25], 21, 0.0, 0.005, 2], [94.948947, 94.948947]]], [['regression clean price accrued 1', [[2019, 4, 11], [2018, 8, 25], [2019, 8, 25], 17, 0.075, 0.08, 1], [100.160544, 95.455065]], ['regression clean price accrued 2', [[2029, 9, 23], [2029, 8, 31], [2029, 11, 30], 30, 0.045, 0.05, 4], [97.193572, 96.909232]], ['partial repair probe 1', [[2010, 1, 17], [2009, 10, 18], [2010, 4, 18], 25, 0.075, 0.035, 2], [141.439146, 139.564146]], ['partial repair probe 2', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2008, 1, 22], [2007, 11, 28], [2008, 11, 28], 13, 0.0, 0.08, 1], [37.19751, 37.19751]], ['normal control 2', [[2013, 1, 27], [2012, 8, 31], [2013, 2, 28], 14, 0.0, 0.05, 2], [72.226042, 72.226042]], ['normal control 3', [[2015, 12, 22], [2015, 11, 30], [2016, 5, 30], 3, 0.0, 0.02, 2], [97.175826, 97.175826]], ['normal control 4', [[2013, 1, 15], [2012, 11, 30], [2013, 2, 28], 1, 0.0, 0.005, 4], [99.938946, 99.938946]]], [['regression clean price accrued 1', [[2010, 9, 26], [2010, 8, 29], [2010, 11, 29], 19, 0.015, 0.005, 4], [104.730952, 104.616821]], ['regression clean price accrued 2', [[2031, 7, 12], [2031, 4, 29], [2031, 10, 29], 30, 0.045, 0.02, 2], [132.792871, 131.883035]], ['partial repair probe 1', [[2024, 4, 15], [2024, 1, 15], [2024, 7, 15], 1, 0.04, 0.04, 2], [100.995049, 99.995049]], ['normal control 1', [[2035, 10, 4], [2034, 10, 12], [2035, 10, 12], 22, 0.0, 0.08, 1], [19.832093, 19.832093]], ['normal control 2', [[2032, 9, 17], [2032, 6, 29], [2032, 9, 29], 28, 0.0, 0.11, 4], [47.902019, 47.902019]], ['normal control 3', [[2040, 9, 6], [2040, 7, 5], [2040, 10, 5], 11, 0.0, 0.035, 4], [91.405406, 91.405406]], ['normal control 4', [[2011, 8, 31], [2011, 8, 31], [2012, 2, 29], 9, 0.0, 0.11, 2], [61.762926, 61.762926]], ['normal control 5', [[2022, 5, 4], [2022, 2, 28], [2022, 8, 28], 15, 0.0, 0.005, 2], [96.410359, 96.410359]]], [['regression clean price accrued 1', [[2018, 4, 8], [2018, 2, 28], [2018, 5, 28], 12, 0.015, 0.005, 4], [103.032152, 102.867826]], ['regression clean price accrued 2', [[2018, 8, 15], [2017, 12, 4], [2018, 12, 4], 3, 0.03, 0.11, 1], [86.510216, 84.422545]], ['partial repair probe 1', [[2029, 2, 22], [2029, 1, 8], [2029, 4, 8], 22, 0.06, 0.035, 4], [112.949126, 112.199126]], ['partial repair probe 2', [[2031, 5, 13], [2031, 3, 28], [2031, 6, 28], 1, 0.045, 0.08, 4], [100.12867, 99.56617]], ['normal control 1', [[2015, 3, 22], [2014, 12, 28], [2015, 3, 28], 9, 0.0, 0.11, 4], [80.345193, 80.345193]], ['normal control 2', [[2031, 11, 26], [2031, 7, 6], [2032, 1, 6], 28, 0.0, 0.035, 2], [62.357953, 62.357953]], ['normal control 3', [[2012, 2, 6], [2011, 9, 30], [2012, 3, 30], 6, 0.0, 0.11, 2], [75.329725, 75.329725]], ['normal control 4', [[2028, 1, 19], [2027, 11, 30], [2028, 2, 29], 28, 0.0, 0.11, 4], [47.487825, 47.487825]]]]
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 clean price accrued 1[103.794442, 103.134116][103.794442, 103.134116]Passed
regression clean price accrued 2[99.506852, 98.90188][99.506852, 98.90188]Passed
partial repair probe 1[100.995049, 99.995049][100.995049, 99.995049]Passed
normal control 1[74.09376, 74.09376][74.09376, 74.09376]Passed
normal control 2[73.135342, 73.135342][73.135342, 73.135342]Passed
normal control 3[99.982361, 99.982361][99.982361, 99.982361]Passed
normal control 4[25.751426, 25.751426][25.751426, 25.751426]Passed
normal control 5[94.401078, 94.401078][94.401078, 94.401078]Passed

SHA-256 / 842cbeca07722e5524ea47102d0bf6217402f9ceff01f74d0c0127f78ce6ece5

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.949769+00:00.

Case digest / 63c3d741126c31ed18f714a62907c0d9f51f9981137d540f490581a8a7c098cc