FA-61286 / Bond day-count conventions / Open access
Rate conversion across day-count basis and compounding: a continuous source rate is treated as annual effective · case 01
Converting from continuous compounding understates the effective rate.
ROOT CAUSE
The forward conversion returns r itself for m = 0.
VERIFIED REPAIR
Use e^r - 1 for a continuously compounded source.
Unsuccessful approach: Approximating with daily compounding still differs from continuous compounding.
Case contract
Inputs a nominal rate, from/to day-count year basis (360 or 365), from/to compounding frequency (0 = continuous). First rescale the nominal rate by to_basis/from_basis, then convert compounding through the effective annual rate: EAR = (1+r/m)^m - 1 or e^r - 1; target nominal = m*((1+EAR)^(1/m)-1) or ln(1+EAR). Return rounded to 10 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 math
N = 1
observations = []
def solve(rate, from_basis, to_basis, from_comp, to_comp):
def ear(r, m):
return r if m == 0 else (1 + r / m) ** m - 1
def nominal(e, m):
return math.log(1 + e) if m == 0 else m * ((1 + e) ** (1 / m) - 1)
scaled = rate * to_basis / from_basis
return round(nominal(ear(scaled, from_comp), to_comp), 10)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression continuous source 1', [0.001, 360, 360, 0, 4], 0.001000125], ['regression continuous source 2', [0.08, 360, 365, 0, 2], 0.0827783261], ['partial repair probe 1', [0.0475, 365, 360, 0, 1], 0.0479640848], ['partial repair probe 2', [0.15, 365, 365, 0, 0], 0.15], ['boundary control 1', [0.05, 360, 360, 2, 2], 0.05], ['boundary control 2', [0.05, 360, 365, 1, 1], 0.0506944444], ['normal control 1', [0.0125, 360, 360, 1, 2], 0.0124611797], ['normal control 2', [0.0475, 365, 360, 4, 0], 0.0465770814]], [['regression continuous source 1', [0.001, 365, 360, 0, 4], 0.000986423], ['regression continuous source 2', [0.001, 360, 360, 0, 2], 0.00100025], ['partial repair probe 1', [0.0125, 360, 365, 0, 4], 0.0126937099], ['partial repair probe 2', [0.15, 365, 360, 0, 12], 0.148860956], ['boundary control 1', [0.05, 360, 360, 2, 2], 0.05], ['boundary control 2', [0.05, 360, 365, 1, 1], 0.0506944444], ['normal control 1', [0.08, 360, 365, 4, 1], 0.0836117618], ['normal control 2', [0.08, 360, 360, 1, 0], 0.0769610411]], [['regression continuous source 1', [0.08, 365, 365, 0, 2], 0.0816215484], ['regression continuous source 2', [0.0125, 365, 360, 0, 12], 0.0123351026], ['partial repair probe 1', [0.08, 360, 365, 0, 12], 0.0813858553], ['partial repair probe 2', [0.03, 365, 365, 0, 2], 0.0302261292], ['boundary control 1', [0.05, 360, 365, 1, 1], 0.0506944444], ['boundary control 2', [0.05, 360, 360, 2, 2], 0.05], ['normal control 1', [0.15, 360, 365, 12, 1], 0.1631451552], ['normal control 2', [0.001, 360, 360, 4, 0], 0.000999875]], [['regression continuous source 1', [0.001, 360, 360, 0, 0], 0.001], ['regression continuous source 2', [0.03, 360, 360, 0, 2], 0.0302261292], ['partial repair probe 1', [0.15, 365, 360, 0, 0], 0.1479452055], ['partial repair probe 2', [0.03, 365, 360, 0, 1], 0.0300311465], ['boundary control 1', [0.05, 360, 360, 2, 2], 0.05], ['boundary control 2', [0.05, 360, 365, 1, 1], 0.0506944444], ['normal control 1', [0.15, 360, 360, 4, 0], 0.1472558925], ['normal control 2', [0.08, 365, 360, 4, 1], 0.0812696608]], [['regression continuous source 1', [0.0125, 365, 365, 0, 4], 0.0125195516], ['regression continuous source 2', [0.001, 360, 360, 0, 2], 0.00100025], ['partial repair probe 1', [0.08, 360, 365, 0, 0], 0.0811111111], ['partial repair probe 2', [0.03, 365, 365, 0, 0], 0.03], ['boundary control 1', [0.05, 360, 365, 1, 1], 0.0506944444], ['boundary control 2', [0.05, 360, 360, 2, 2], 0.05], ['normal control 1', [0.08, 360, 360, 2, 12], 0.0786983632], ['normal control 2', [0.0125, 360, 365, 4, 1], 0.0127339711]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression continuous source 1 | 0.0009996252 | 0.001000125 | Failed |
| regression continuous source 2 | 0.0795298614 | 0.0827783261 | Failed |
| partial repair probe 1 | 0.0468493151 | 0.0479640848 | Failed |
| partial repair probe 2 | 0.1397619424 | 0.15 | Failed |
| boundary control 1 | 0.05 | 0.05 | Passed |
| boundary control 2 | 0.0506944444 | 0.0506944444 | Passed |
| normal control 1 | 0.0124611797 | 0.0124611797 | Passed |
| normal control 2 | 0.0465770814 | 0.0465770814 | Passed |
SHA-256 / 269767dc339acbfc25d6eb3a3bd506d85cdf7212c599f1e0134a4a92fd4a7b51
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(rate, from_basis, to_basis, from_comp, to_comp):
def ear(r, m):
return (1 + r / 365) ** 365 - 1 if m == 0 else (1 + r / m) ** m - 1
def nominal(e, m):
return math.log(1 + e) if m == 0 else m * ((1 + e) ** (1 / m) - 1)
scaled = rate * to_basis / from_basis
return round(nominal(ear(scaled, from_comp), to_comp), 10)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression continuous source 1', [0.001, 360, 360, 0, 4], 0.001000125], ['regression continuous source 2', [0.08, 360, 365, 0, 2], 0.0827783261], ['partial repair probe 1', [0.0475, 365, 360, 0, 1], 0.0479640848], ['partial repair probe 2', [0.15, 365, 365, 0, 0], 0.15], ['boundary control 1', [0.05, 360, 360, 2, 2], 0.05], ['boundary control 2', [0.05, 360, 365, 1, 1], 0.0506944444], ['normal control 1', [0.0125, 360, 360, 1, 2], 0.0124611797], ['normal control 2', [0.0475, 365, 360, 4, 0], 0.0465770814]], [['regression continuous source 1', [0.001, 365, 360, 0, 4], 0.000986423], ['regression continuous source 2', [0.001, 360, 360, 0, 2], 0.00100025], ['partial repair probe 1', [0.0125, 360, 365, 0, 4], 0.0126937099], ['partial repair probe 2', [0.15, 365, 360, 0, 12], 0.148860956], ['boundary control 1', [0.05, 360, 360, 2, 2], 0.05], ['boundary control 2', [0.05, 360, 365, 1, 1], 0.0506944444], ['normal control 1', [0.08, 360, 365, 4, 1], 0.0836117618], ['normal control 2', [0.08, 360, 360, 1, 0], 0.0769610411]], [['regression continuous source 1', [0.08, 365, 365, 0, 2], 0.0816215484], ['regression continuous source 2', [0.0125, 365, 360, 0, 12], 0.0123351026], ['partial repair probe 1', [0.08, 360, 365, 0, 12], 0.0813858553], ['partial repair probe 2', [0.03, 365, 365, 0, 2], 0.0302261292], ['boundary control 1', [0.05, 360, 365, 1, 1], 0.0506944444], ['boundary control 2', [0.05, 360, 360, 2, 2], 0.05], ['normal control 1', [0.15, 360, 365, 12, 1], 0.1631451552], ['normal control 2', [0.001, 360, 360, 4, 0], 0.000999875]], [['regression continuous source 1', [0.001, 360, 360, 0, 0], 0.001], ['regression continuous source 2', [0.03, 360, 360, 0, 2], 0.0302261292], ['partial repair probe 1', [0.15, 365, 360, 0, 0], 0.1479452055], ['partial repair probe 2', [0.03, 365, 360, 0, 1], 0.0300311465], ['boundary control 1', [0.05, 360, 360, 2, 2], 0.05], ['boundary control 2', [0.05, 360, 365, 1, 1], 0.0506944444], ['normal control 1', [0.15, 360, 360, 4, 0], 0.1472558925], ['normal control 2', [0.08, 365, 360, 4, 1], 0.0812696608]], [['regression continuous source 1', [0.0125, 365, 365, 0, 4], 0.0125195516], ['regression continuous source 2', [0.001, 360, 360, 0, 2], 0.00100025], ['partial repair probe 1', [0.08, 360, 365, 0, 0], 0.0811111111], ['partial repair probe 2', [0.03, 365, 365, 0, 0], 0.03], ['boundary control 1', [0.05, 360, 365, 1, 1], 0.0506944444], ['boundary control 2', [0.05, 360, 360, 2, 2], 0.05], ['normal control 1', [0.08, 360, 360, 2, 12], 0.0786983632], ['normal control 2', [0.0125, 360, 365, 4, 1], 0.0127339711]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression continuous source 1 | 0.0010001236 | 0.001000125 | Failed |
| regression continuous source 2 | 0.0827689422 | 0.0827783261 | Failed |
| partial repair probe 1 | 0.0479609342 | 0.0479640848 | Failed |
| partial repair probe 2 | 0.1499691865 | 0.15 | Failed |
| boundary control 1 | 0.05 | 0.05 | Passed |
| boundary control 2 | 0.0506944444 | 0.0506944444 | Passed |
| normal control 1 | 0.0124611797 | 0.0124611797 | Passed |
| normal control 2 | 0.0465770814 | 0.0465770814 | Passed |
SHA-256 / 43942f7d41056f9ab8fc20ab64e1fc7fa7b5bf342162c640e83fcb7843e08b1c
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(rate, from_basis, to_basis, from_comp, to_comp):
def ear(r, m):
return math.exp(r) - 1 if m == 0 else (1 + r / m) ** m - 1
def nominal(e, m):
return math.log(1 + e) if m == 0 else m * ((1 + e) ** (1 / m) - 1)
scaled = rate * to_basis / from_basis
return round(nominal(ear(scaled, from_comp), to_comp), 10)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression continuous source 1', [0.001, 360, 360, 0, 4], 0.001000125], ['regression continuous source 2', [0.08, 360, 365, 0, 2], 0.0827783261], ['partial repair probe 1', [0.0475, 365, 360, 0, 1], 0.0479640848], ['partial repair probe 2', [0.15, 365, 365, 0, 0], 0.15], ['boundary control 1', [0.05, 360, 360, 2, 2], 0.05], ['boundary control 2', [0.05, 360, 365, 1, 1], 0.0506944444], ['normal control 1', [0.0125, 360, 360, 1, 2], 0.0124611797], ['normal control 2', [0.0475, 365, 360, 4, 0], 0.0465770814]], [['regression continuous source 1', [0.001, 365, 360, 0, 4], 0.000986423], ['regression continuous source 2', [0.001, 360, 360, 0, 2], 0.00100025], ['partial repair probe 1', [0.0125, 360, 365, 0, 4], 0.0126937099], ['partial repair probe 2', [0.15, 365, 360, 0, 12], 0.148860956], ['boundary control 1', [0.05, 360, 360, 2, 2], 0.05], ['boundary control 2', [0.05, 360, 365, 1, 1], 0.0506944444], ['normal control 1', [0.08, 360, 365, 4, 1], 0.0836117618], ['normal control 2', [0.08, 360, 360, 1, 0], 0.0769610411]], [['regression continuous source 1', [0.08, 365, 365, 0, 2], 0.0816215484], ['regression continuous source 2', [0.0125, 365, 360, 0, 12], 0.0123351026], ['partial repair probe 1', [0.08, 360, 365, 0, 12], 0.0813858553], ['partial repair probe 2', [0.03, 365, 365, 0, 2], 0.0302261292], ['boundary control 1', [0.05, 360, 365, 1, 1], 0.0506944444], ['boundary control 2', [0.05, 360, 360, 2, 2], 0.05], ['normal control 1', [0.15, 360, 365, 12, 1], 0.1631451552], ['normal control 2', [0.001, 360, 360, 4, 0], 0.000999875]], [['regression continuous source 1', [0.001, 360, 360, 0, 0], 0.001], ['regression continuous source 2', [0.03, 360, 360, 0, 2], 0.0302261292], ['partial repair probe 1', [0.15, 365, 360, 0, 0], 0.1479452055], ['partial repair probe 2', [0.03, 365, 360, 0, 1], 0.0300311465], ['boundary control 1', [0.05, 360, 360, 2, 2], 0.05], ['boundary control 2', [0.05, 360, 365, 1, 1], 0.0506944444], ['normal control 1', [0.15, 360, 360, 4, 0], 0.1472558925], ['normal control 2', [0.08, 365, 360, 4, 1], 0.0812696608]], [['regression continuous source 1', [0.0125, 365, 365, 0, 4], 0.0125195516], ['regression continuous source 2', [0.001, 360, 360, 0, 2], 0.00100025], ['partial repair probe 1', [0.08, 360, 365, 0, 0], 0.0811111111], ['partial repair probe 2', [0.03, 365, 365, 0, 0], 0.03], ['boundary control 1', [0.05, 360, 365, 1, 1], 0.0506944444], ['boundary control 2', [0.05, 360, 360, 2, 2], 0.05], ['normal control 1', [0.08, 360, 360, 2, 12], 0.0786983632], ['normal control 2', [0.0125, 360, 365, 4, 1], 0.0127339711]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression continuous source 1 | 0.001000125 | 0.001000125 | Passed |
| regression continuous source 2 | 0.0827783261 | 0.0827783261 | Passed |
| partial repair probe 1 | 0.0479640848 | 0.0479640848 | Passed |
| partial repair probe 2 | 0.15 | 0.15 | Passed |
| boundary control 1 | 0.05 | 0.05 | Passed |
| boundary control 2 | 0.0506944444 | 0.0506944444 | Passed |
| normal control 1 | 0.0124611797 | 0.0124611797 | Passed |
| normal control 2 | 0.0465770814 | 0.0465770814 | Passed |
SHA-256 / 5126dc44ea3f9614c6c415d9dc2bf6652e95c819a13e700027dd11fbaf083edf
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:53.817053+00:00.
Case digest / e38369fd51032c6fa195a1b9b2c6aa561d998d35c49969288d5bd1fa20ddd5da