FAILURE MAP
← Case archive

FA-61531 / Options payoff and settlement / Open access

Cox-Ross-Rubinstein American option tree: the down factor is arithmetic instead of reciprocal · case 01

The lattice does not recombine on the stated log grid.

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

ROOT CAUSE

d = 1 - (u - 1) rather than 1/u.

THE FAILURE

d = 1 - (u - 1) rather than 1/u.

Unsuccessful approach: Dropping the square root of dt in u mis-scales volatility.

Case contract

Inputs kind, spot S, strike K, rate r, volatility sigma, maturity T in years and steps. dt=T/steps, u=exp(sigma*sqrt(dt)), d=1/u, p=(exp(r*dt)-d)/(u-d), disc=exp(-r*dt). Roll back from terminal payoffs; at each node take max(continuation, immediate exercise at that node's price). Return the root rounded to 6.

Why this case matters

Option expiry, exercise and settlement engines move cash and shares; a wrong branch misstates obligations.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(kind, S, K, r, sigma, T, steps):
    dt = T / steps
    u = math.exp(sigma * math.sqrt(dt))
    d = 1 - (u - 1)
    p = (math.exp(r * dt) - d) / (u - d)
    disc = math.exp(-r * dt)
    def pay(s):
        return max(s - K, 0.0) if kind == 'C' else max(K - s, 0.0)
    vals = [pay(S * u ** j * d ** (steps - j)) for j in range(steps + 1)]
    for i in range(steps - 1, -1, -1):
        vals = [max(disc * (p * vals[j + 1] + (1 - p) * vals[j]), pay(S * u ** j * d ** (i - j))) for j in range(i + 1)]
    return round(vals[0], 6)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression lattice factors 1', ['P', 110.0, 90.0, 0.08, 0.4, 2.0, 12], 9.247277], ['regression lattice factors 2', ['P', 80.0, 100.0, 0.0, 0.15, 0.25, 12], 20.0008], ['partial repair probe 1', ['C', 95.0, 105.0, 0.05, 0.4, 0.25, 5], 4.05722], ['partial repair probe 2', ['C', 95.0, 105.0, 0.0, 0.25, 0.25, 12], 1.544677], ['normal control 1', ['P', 80.0, 105.0, 0.01, 0.15, 0.25, 25], 25.0], ['normal control 2', ['P', 80.0, 100.0, 0.08, 0.15, 1.0, 5], 20.0], ['normal control 3', ['P', 80.0, 105.0, 0.08, 0.25, 1.0, 12], 25.0], ['normal control 4', ['C', 80.0, 105.0, 0.01, 0.15, 0.25, 5], 0.0]], [['regression lattice factors 1', ['C', 100.0, 105.0, 0.05, 0.4, 1.0, 12], 15.997965], ['regression lattice factors 2', ['C', 110.0, 90.0, 0.05, 0.4, 0.25, 25], 22.508919], ['partial repair probe 1', ['P', 110.0, 105.0, 0.08, 0.4, 2.0, 5], 15.892366], ['partial repair probe 2', ['C', 80.0, 90.0, 0.08, 0.25, 0.5, 5], 3.211596], ['normal control 1', ['P', 80.0, 100.0, 0.08, 0.25, 1.0, 5], 20.0], ['normal control 2', ['P', 80.0, 105.0, 0.01, 0.15, 0.25, 25], 25.0], ['normal control 3', ['P', 80.0, 100.0, 0.01, 0.15, 0.5, 5], 20.0], ['normal control 4', ['P', 110.0, 90.0, 0.05, 0.15, 0.25, 3], 0.0]], [['regression lattice factors 1', ['P', 110.0, 105.0, 0.01, 0.4, 0.25, 3], 6.698169], ['regression lattice factors 2', ['P', 110.0, 90.0, 0.0, 0.25, 2.0, 3], 5.203766], ['partial repair probe 1', ['P', 110.0, 90.0, 0.0, 0.4, 0.5, 3], 3.573892], ['partial repair probe 2', ['P', 110.0, 100.0, 0.0, 0.25, 0.5, 5], 3.300661], ['normal control 1', ['P', 80.0, 105.0, 0.01, 0.15, 0.25, 12], 25.0], ['normal control 2', ['P', 110.0, 90.0, 0.08, 0.15, 0.25, 3], 0.0], ['normal control 3', ['P', 95.0, 105.0, 0.08, 0.15, 0.25, 25], 10.0], ['normal control 4', ['P', 80.0, 100.0, 0.05, 0.15, 2.0, 25], 20.0]], [['regression lattice factors 1', ['P', 80.0, 100.0, 0.0, 0.15, 1.0, 3], 20.408789], ['regression lattice factors 2', ['C', 110.0, 100.0, 0.08, 0.15, 0.25, 5], 12.162574], ['partial repair probe 1', ['P', 95.0, 90.0, 0.08, 0.15, 1.0, 3], 1.733738], ['partial repair probe 2', ['P', 100.0, 100.0, 0.01, 0.25, 0.5, 3], 7.419406], ['normal control 1', ['C', 80.0, 105.0, 0.05, 0.15, 0.5, 3], 0.0], ['normal control 2', ['P', 95.0, 105.0, 0.08, 0.15, 0.5, 5], 10.0], ['normal control 3', ['P', 80.0, 100.0, 0.08, 0.25, 0.25, 25], 20.0], ['normal control 4', ['P', 80.0, 105.0, 0.0, 0.15, 0.25, 5], 25.0]], [['regression lattice factors 1', ['C', 80.0, 105.0, 0.05, 0.4, 1.0, 5], 6.543033], ['regression lattice factors 2', ['P', 110.0, 100.0, 0.08, 0.25, 1.0, 12], 4.097253], ['partial repair probe 1', ['C', 80.0, 105.0, 0.05, 0.25, 1.0, 3], 2.482907], ['partial repair probe 2', ['P', 110.0, 100.0, 0.0, 0.4, 0.25, 12], 4.313904], ['normal control 1', ['P', 80.0, 105.0, 0.05, 0.25, 1.0, 12], 25.0], ['normal control 2', ['P', 80.0, 105.0, 0.05, 0.25, 0.25, 3], 25.0], ['normal control 3', ['P', 80.0, 100.0, 0.0, 0.15, 0.5, 3], 20.0], ['normal control 4', ['P', 95.0, 105.0, 0.08, 0.15, 0.5, 3], 10.0]]]
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 lattice factors 110.4572439.247277Failed
regression lattice factors 220.00091220.0008Failed
partial repair probe 14.5641534.05722Failed
partial repair probe 21.6202531.544677Failed
normal control 125.025.0Passed
normal control 220.020.0Passed
normal control 325.025.0Passed
normal control 40.00.0Passed

SHA-256 / 01995bab27f1533e6d218db8299edc1d60e24759526a6a6768ee470c40aa5786

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(kind, S, K, r, sigma, T, steps):
    dt = T / steps
    u = math.exp(sigma * dt)
    d = 1 / u
    p = (math.exp(r * dt) - d) / (u - d)
    disc = math.exp(-r * dt)
    def pay(s):
        return max(s - K, 0.0) if kind == 'C' else max(K - s, 0.0)
    vals = [pay(S * u ** j * d ** (steps - j)) for j in range(steps + 1)]
    for i in range(steps - 1, -1, -1):
        vals = [max(disc * (p * vals[j + 1] + (1 - p) * vals[j]), pay(S * u ** j * d ** (i - j))) for j in range(i + 1)]
    return round(vals[0], 6)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression lattice factors 1', ['P', 110.0, 90.0, 0.08, 0.4, 2.0, 12], 9.247277], ['regression lattice factors 2', ['P', 80.0, 100.0, 0.0, 0.15, 0.25, 12], 20.0008], ['partial repair probe 1', ['C', 95.0, 105.0, 0.05, 0.4, 0.25, 5], 4.05722], ['partial repair probe 2', ['C', 95.0, 105.0, 0.0, 0.25, 0.25, 12], 1.544677], ['normal control 1', ['P', 80.0, 105.0, 0.01, 0.15, 0.25, 25], 25.0], ['normal control 2', ['P', 80.0, 100.0, 0.08, 0.15, 1.0, 5], 20.0], ['normal control 3', ['P', 80.0, 105.0, 0.08, 0.25, 1.0, 12], 25.0], ['normal control 4', ['C', 80.0, 105.0, 0.01, 0.15, 0.25, 5], 0.0]], [['regression lattice factors 1', ['C', 100.0, 105.0, 0.05, 0.4, 1.0, 12], 15.997965], ['regression lattice factors 2', ['C', 110.0, 90.0, 0.05, 0.4, 0.25, 25], 22.508919], ['partial repair probe 1', ['P', 110.0, 105.0, 0.08, 0.4, 2.0, 5], 15.892366], ['partial repair probe 2', ['C', 80.0, 90.0, 0.08, 0.25, 0.5, 5], 3.211596], ['normal control 1', ['P', 80.0, 100.0, 0.08, 0.25, 1.0, 5], 20.0], ['normal control 2', ['P', 80.0, 105.0, 0.01, 0.15, 0.25, 25], 25.0], ['normal control 3', ['P', 80.0, 100.0, 0.01, 0.15, 0.5, 5], 20.0], ['normal control 4', ['P', 110.0, 90.0, 0.05, 0.15, 0.25, 3], 0.0]], [['regression lattice factors 1', ['P', 110.0, 105.0, 0.01, 0.4, 0.25, 3], 6.698169], ['regression lattice factors 2', ['P', 110.0, 90.0, 0.0, 0.25, 2.0, 3], 5.203766], ['partial repair probe 1', ['P', 110.0, 90.0, 0.0, 0.4, 0.5, 3], 3.573892], ['partial repair probe 2', ['P', 110.0, 100.0, 0.0, 0.25, 0.5, 5], 3.300661], ['normal control 1', ['P', 80.0, 105.0, 0.01, 0.15, 0.25, 12], 25.0], ['normal control 2', ['P', 110.0, 90.0, 0.08, 0.15, 0.25, 3], 0.0], ['normal control 3', ['P', 95.0, 105.0, 0.08, 0.15, 0.25, 25], 10.0], ['normal control 4', ['P', 80.0, 100.0, 0.05, 0.15, 2.0, 25], 20.0]], [['regression lattice factors 1', ['P', 80.0, 100.0, 0.0, 0.15, 1.0, 3], 20.408789], ['regression lattice factors 2', ['C', 110.0, 100.0, 0.08, 0.15, 0.25, 5], 12.162574], ['partial repair probe 1', ['P', 95.0, 90.0, 0.08, 0.15, 1.0, 3], 1.733738], ['partial repair probe 2', ['P', 100.0, 100.0, 0.01, 0.25, 0.5, 3], 7.419406], ['normal control 1', ['C', 80.0, 105.0, 0.05, 0.15, 0.5, 3], 0.0], ['normal control 2', ['P', 95.0, 105.0, 0.08, 0.15, 0.5, 5], 10.0], ['normal control 3', ['P', 80.0, 100.0, 0.08, 0.25, 0.25, 25], 20.0], ['normal control 4', ['P', 80.0, 105.0, 0.0, 0.15, 0.25, 5], 25.0]], [['regression lattice factors 1', ['C', 80.0, 105.0, 0.05, 0.4, 1.0, 5], 6.543033], ['regression lattice factors 2', ['P', 110.0, 100.0, 0.08, 0.25, 1.0, 12], 4.097253], ['partial repair probe 1', ['C', 80.0, 105.0, 0.05, 0.25, 1.0, 3], 2.482907], ['partial repair probe 2', ['P', 110.0, 100.0, 0.0, 0.4, 0.25, 12], 4.313904], ['normal control 1', ['P', 80.0, 105.0, 0.05, 0.25, 1.0, 12], 25.0], ['normal control 2', ['P', 80.0, 105.0, 0.05, 0.25, 0.25, 3], 25.0], ['normal control 3', ['P', 80.0, 100.0, 0.0, 0.15, 0.5, 3], 20.0], ['normal control 4', ['P', 95.0, 105.0, 0.08, 0.15, 0.5, 3], 10.0]]]
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 lattice factors 10.7007989.247277Failed
regression lattice factors 220.020.0008Failed
partial repair probe 10.04.05722Failed
partial repair probe 20.01.544677Failed
normal control 125.025.0Passed
normal control 220.020.0Passed
normal control 325.025.0Passed
normal control 40.00.0Passed

SHA-256 / d6c9422cda6d24d7a75010b2a16c152cabb00b2ee13d95b00dd95b19b0f5d7c3

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 exchange or clearing rulebook. 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:56.132503+00:00.

Case digest / 6b5714dd517855d1d53b3d3a72b28604f909ed0567cd26e88296dafb969d02ad