FAILURE MAP
← Case archive

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

Rate conversion across day-count basis and compounding: the basis rescaling is applied after compounding conversion · case 01

Combined basis and compounding conversions drift from the contract value.

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

ROOT CAUSE

The basis factor is applied to the converted output instead of the input nominal rate.

THE FAILURE

The basis factor is applied to the converted output instead of the input nominal rate.

Unsuccessful approach: Rescaling the effective annual rate instead of the nominal rate is still out of order.

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 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)
    return round(nominal(ear(rate, from_comp), to_comp) * to_basis / from_basis, 10)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression conversion order 1', [0.0125, 360, 365, 12, 0], 0.0126669233], ['regression conversion order 2', [0.03, 365, 360, 2, 0], 0.0293722984], ['partial repair probe 1', [0.001, 365, 360, 12, 12], 0.0009863014], ['partial repair probe 2', [0.03, 360, 365, 2, 2], 0.0304166667], ['boundary control 1', [0.05, 365, 365, 0, 0], 0.05], ['boundary control 2', [0.05, 360, 360, 2, 2], 0.05], ['normal control 1', [0.15, 365, 365, 2, 0], 0.1446413232], ['normal control 2', [0.15, 365, 365, 2, 2], 0.15]], [['regression conversion order 1', [0.0125, 360, 365, 4, 0], 0.0126535759], ['regression conversion order 2', [0.03, 365, 360, 1, 4], 0.0292662784], ['partial repair probe 1', [0.0125, 360, 365, 0, 0], 0.0126736111], ['partial repair probe 2', [0.0125, 365, 360, 12, 12], 0.0123287671], ['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.03, 360, 360, 0, 1], 0.030454534], ['normal control 2', [0.03, 365, 365, 1, 12], 0.0295952373]], [['regression conversion order 1', [0.0125, 360, 365, 0, 4], 0.0126937099], ['regression conversion order 2', [0.08, 365, 360, 1, 4], 0.0766713681], ['partial repair probe 1', [0.001, 365, 360, 0, 0], 0.0009863014], ['partial repair probe 2', [0.08, 360, 365, 4, 4], 0.0811111111], ['boundary control 1', [0.05, 360, 360, 2, 2], 0.05], ['boundary control 2', [0.05, 365, 365, 0, 0], 0.05], ['normal control 1', [0.03, 360, 360, 0, 2], 0.0302261292], ['normal control 2', [0.08, 365, 365, 4, 0], 0.0792105092]], [['regression conversion order 1', [0.15, 360, 365, 2, 12], 0.1474772429], ['regression conversion order 2', [0.08, 360, 365, 4, 0], 0.0802996855], ['partial repair probe 1', [0.0475, 365, 360, 4, 4], 0.0468493151], ['partial repair probe 2', [0.03, 360, 365, 12, 12], 0.0304166667], ['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.0125, 365, 365, 2, 1], 0.0125390625], ['normal control 2', [0.001, 365, 365, 4, 2], 0.001000125]], [['regression conversion order 1', [0.001, 365, 360, 1, 0], 0.0009858153], ['regression conversion order 2', [0.001, 360, 365, 2, 4], 0.0010137604], ['partial repair probe 1', [0.0125, 360, 365, 12, 12], 0.0126736111], ['partial repair probe 2', [0.08, 360, 365, 2, 2], 0.0811111111], ['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.0475, 365, 365, 1, 12], 0.0464962199], ['normal control 2', [0.0125, 360, 360, 1, 0], 0.01242252]]]
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 conversion order 10.01266701490.0126669233Failed
regression conversion order 20.02936931780.0293722984Failed
partial repair probe 10.00098630140.0009863014Passed
partial repair probe 20.03041666670.0304166667Passed
boundary control 10.050.05Passed
boundary control 20.050.05Passed
normal control 10.14464132320.1446413232Passed
normal control 20.150.15Passed

SHA-256 / 7a2994596344e2d33c5bd3b338970a56212b8d48eb5331597b0f9cd8c0ff4c00

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 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)
    return round(nominal(ear(rate, from_comp) * to_basis / from_basis, to_comp), 10)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression conversion order 1', [0.0125, 360, 365, 12, 0], 0.0126669233], ['regression conversion order 2', [0.03, 365, 360, 2, 0], 0.0293722984], ['partial repair probe 1', [0.001, 365, 360, 12, 12], 0.0009863014], ['partial repair probe 2', [0.03, 360, 365, 2, 2], 0.0304166667], ['boundary control 1', [0.05, 365, 365, 0, 0], 0.05], ['boundary control 2', [0.05, 360, 360, 2, 2], 0.05], ['normal control 1', [0.15, 365, 365, 2, 0], 0.1446413232], ['normal control 2', [0.15, 365, 365, 2, 2], 0.15]], [['regression conversion order 1', [0.0125, 360, 365, 4, 0], 0.0126535759], ['regression conversion order 2', [0.03, 365, 360, 1, 4], 0.0292662784], ['partial repair probe 1', [0.0125, 360, 365, 0, 0], 0.0126736111], ['partial repair probe 2', [0.0125, 365, 360, 12, 12], 0.0123287671], ['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.03, 360, 360, 0, 1], 0.030454534], ['normal control 2', [0.03, 365, 365, 1, 12], 0.0295952373]], [['regression conversion order 1', [0.0125, 360, 365, 0, 4], 0.0126937099], ['regression conversion order 2', [0.08, 365, 360, 1, 4], 0.0766713681], ['partial repair probe 1', [0.001, 365, 360, 0, 0], 0.0009863014], ['partial repair probe 2', [0.08, 360, 365, 4, 4], 0.0811111111], ['boundary control 1', [0.05, 360, 360, 2, 2], 0.05], ['boundary control 2', [0.05, 365, 365, 0, 0], 0.05], ['normal control 1', [0.03, 360, 360, 0, 2], 0.0302261292], ['normal control 2', [0.08, 365, 365, 4, 0], 0.0792105092]], [['regression conversion order 1', [0.15, 360, 365, 2, 12], 0.1474772429], ['regression conversion order 2', [0.08, 360, 365, 4, 0], 0.0802996855], ['partial repair probe 1', [0.0475, 365, 360, 4, 4], 0.0468493151], ['partial repair probe 2', [0.03, 360, 365, 12, 12], 0.0304166667], ['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.0125, 365, 365, 2, 1], 0.0125390625], ['normal control 2', [0.001, 365, 365, 4, 2], 0.001000125]], [['regression conversion order 1', [0.001, 365, 360, 1, 0], 0.0009858153], ['regression conversion order 2', [0.001, 360, 365, 2, 4], 0.0010137604], ['partial repair probe 1', [0.0125, 360, 365, 12, 12], 0.0126736111], ['partial repair probe 2', [0.08, 360, 365, 2, 2], 0.0811111111], ['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.0475, 365, 365, 1, 12], 0.0464962199], ['normal control 2', [0.0125, 360, 360, 1, 0], 0.01242252]]]
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 conversion order 10.01266592050.0126669233Failed
regression conversion order 20.02937525040.0293722984Failed
partial repair probe 10.00098630760.0009863014Failed
partial repair probe 20.03041354570.0304166667Failed
boundary control 10.050.05Passed
boundary control 20.050.05Passed
normal control 10.14464132320.1446413232Passed
normal control 20.150.15Passed

SHA-256 / 3a295e93d7b8dd2e0f0c09add58f8e1bd271bb6722654b872b7948e5f47ed288

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / 1a1cfaaff9ac23d0d6e96c40b2bd0ab8cc6218fa8cefdb10cade9a0b57c8ce76