FAILURE MAP
← Case archive

FA-61346 / Options payoff and settlement / Open access

Cash-settled expiry with exercise by exception: moneyness magnitude is used regardless of option type · case 01

Out-of-the-money options are exercised and paid as if in the money.

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

ROOT CAUSE

Intrinsic value is computed as |S-K| for both calls and puts.

VERIFIED REPAIR

Use max(0, S-K) for calls and max(0, K-S) for puts.

Unsuccessful approach: Fixing only the call branch leaves puts paying on the wrong side of the strike.

Case contract

Inputs kind C/P, strike, settlement price, signed contracts (+long, -short), multiplier, a minimum in-the-money amount and a long-holder instruction (auto, exercise, dnx). Work in integer cents. Intrinsic is max(0, S-K) for calls, max(0, K-S) for puts. The automatic rule exercises when intrinsic >= threshold. Longs follow their instruction (exercise always exercises, dnx never, auto uses the rule); shorts are assigned by the automatic rule. Cash = intrinsic*multiplier*|contracts| if exercised, negative for shorts. Return [exercised, cash in currency units].

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

N = 1
observations = []
def solve(kind, strike, settle, contracts, multiplier, min_itm, instruction):
    k = round(strike * 100)
    s = round(settle * 100)
    thr = round(min_itm * 100)
    intrinsic = abs(s - k)
    auto = intrinsic >= thr
    if contracts > 0:
        if instruction == 'exercise':
            ex = True
        elif instruction == 'dnx':
            ex = False
        else:
            ex = auto
    else:
        ex = auto
    cash = intrinsic * multiplier * abs(contracts) if ex else 0
    if contracts < 0:
        cash = -cash
    return [ex, cash / 100]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression put intrinsic value 1', ['C', 101.5, 101.45, -4, 100, 0.02, 'auto'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 50, 51.37, 10, 100, 0.02, 'exercise'], [True, 0.0]], ['partial repair probe 1', ['P', 150, 150.02, -4, 50, 0.01, 'exercise'], [False, 0.0]], ['partial repair probe 2', ['P', 150, 150.05, 3, 100, 0.02, 'auto'], [False, 0.0]], ['boundary control 1', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 2', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['normal control 1', ['C', 50, 50.02, 10, 100, 0.05, 'auto'], [False, 0.0]], ['normal control 2', ['P', 150, 150, -4, 10, 0.01, 'auto'], [False, 0.0]]], [['regression put intrinsic value 1', ['P', 101.5, 102.87, -10, 50, 0.01, 'dnx'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 50, 50.01, -1, 50, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 1', ['P', 4500, 4512.25, -10, 100, 0.01, 'dnx'], [False, 0.0]], ['partial repair probe 2', ['P', 4500, 4500.1, -1, 50, 0.01, 'exercise'], [False, 0.0]], ['boundary control 1', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['boundary control 2', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['normal control 1', ['C', 212.5, 212.5, 1, 100, 0.01, 'auto'], [False, 0.0]], ['normal control 2', ['C', 50, 50.01, 3, 10, 0.01, 'dnx'], [False, 0.0]]], [['regression put intrinsic value 1', ['P', 150, 150.05, -10, 100, 0.05, 'dnx'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 25, 25.1, -10, 50, 0.02, 'exercise'], [False, 0.0]], ['partial repair probe 1', ['P', 50, 50.1, -1, 50, 0.05, 'dnx'], [False, 0.0]], ['partial repair probe 2', ['P', 4500, 4500.1, -4, 100, 0.01, 'exercise'], [False, 0.0]], ['boundary control 1', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['boundary control 2', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['normal control 1', ['C', 212.5, 212.6, 10, 100, 0.05, 'dnx'], [False, 0.0]], ['normal control 2', ['C', 101.5, 101.5, 10, 50, 0.02, 'dnx'], [False, 0.0]]], [['regression put intrinsic value 1', ['C', 4500, 4499.99, -4, 100, 0.01, 'auto'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 50, 50.05, -10, 10, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 1', ['P', 100, 100.1, -10, 10, 0.05, 'dnx'], [False, 0.0]], ['partial repair probe 2', ['P', 50, 50.05, -10, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 1', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['boundary control 2', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['normal control 1', ['C', 50, 50.02, -4, 100, 0.01, 'dnx'], [True, -8.0]], ['normal control 2', ['P', 25, 25, 3, 100, 0.02, 'exercise'], [True, 0.0]]], [['regression put intrinsic value 1', ['C', 4500, 4499.98, 1, 10, 0.01, 'exercise'], [True, 0.0]], ['regression put intrinsic value 2', ['P', 212.5, 213.87, -1, 50, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 1', ['P', 50, 50.05, 3, 100, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 2', ['P', 50, 50.05, -10, 50, 0.01, 'dnx'], [False, 0.0]], ['boundary control 1', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 2', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['normal control 1', ['P', 101.5, 101.5, 1, 50, 0.01, 'exercise'], [True, 0.0]], ['normal control 2', ['P', 101.5, 101.49, 10, 100, 0.02, 'auto'], [False, 0.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 put intrinsic value 1[True, -20.0][False, 0.0]Failed
regression put intrinsic value 2[True, 1370.0][True, 0.0]Failed
partial repair probe 1[True, -4.0][False, 0.0]Failed
partial repair probe 2[True, 15.0][False, 0.0]Failed
boundary control 1[False, 0.0][False, 0.0]Passed
boundary control 2[False, 0.0][False, 0.0]Passed
normal control 1[False, 0.0][False, 0.0]Passed
normal control 2[False, 0.0][False, 0.0]Passed

SHA-256 / 85b87e8350f34b5a9fa1e80501af6efa18303af50e31616b9b56af9e3188b88d

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kind, strike, settle, contracts, multiplier, min_itm, instruction):
    k = round(strike * 100)
    s = round(settle * 100)
    thr = round(min_itm * 100)
    intrinsic = max(0, s - k) if kind == 'C' else abs(k - s)
    auto = intrinsic >= thr
    if contracts > 0:
        if instruction == 'exercise':
            ex = True
        elif instruction == 'dnx':
            ex = False
        else:
            ex = auto
    else:
        ex = auto
    cash = intrinsic * multiplier * abs(contracts) if ex else 0
    if contracts < 0:
        cash = -cash
    return [ex, cash / 100]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression put intrinsic value 1', ['C', 101.5, 101.45, -4, 100, 0.02, 'auto'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 50, 51.37, 10, 100, 0.02, 'exercise'], [True, 0.0]], ['partial repair probe 1', ['P', 150, 150.02, -4, 50, 0.01, 'exercise'], [False, 0.0]], ['partial repair probe 2', ['P', 150, 150.05, 3, 100, 0.02, 'auto'], [False, 0.0]], ['boundary control 1', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 2', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['normal control 1', ['C', 50, 50.02, 10, 100, 0.05, 'auto'], [False, 0.0]], ['normal control 2', ['P', 150, 150, -4, 10, 0.01, 'auto'], [False, 0.0]]], [['regression put intrinsic value 1', ['P', 101.5, 102.87, -10, 50, 0.01, 'dnx'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 50, 50.01, -1, 50, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 1', ['P', 4500, 4512.25, -10, 100, 0.01, 'dnx'], [False, 0.0]], ['partial repair probe 2', ['P', 4500, 4500.1, -1, 50, 0.01, 'exercise'], [False, 0.0]], ['boundary control 1', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['boundary control 2', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['normal control 1', ['C', 212.5, 212.5, 1, 100, 0.01, 'auto'], [False, 0.0]], ['normal control 2', ['C', 50, 50.01, 3, 10, 0.01, 'dnx'], [False, 0.0]]], [['regression put intrinsic value 1', ['P', 150, 150.05, -10, 100, 0.05, 'dnx'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 25, 25.1, -10, 50, 0.02, 'exercise'], [False, 0.0]], ['partial repair probe 1', ['P', 50, 50.1, -1, 50, 0.05, 'dnx'], [False, 0.0]], ['partial repair probe 2', ['P', 4500, 4500.1, -4, 100, 0.01, 'exercise'], [False, 0.0]], ['boundary control 1', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['boundary control 2', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['normal control 1', ['C', 212.5, 212.6, 10, 100, 0.05, 'dnx'], [False, 0.0]], ['normal control 2', ['C', 101.5, 101.5, 10, 50, 0.02, 'dnx'], [False, 0.0]]], [['regression put intrinsic value 1', ['C', 4500, 4499.99, -4, 100, 0.01, 'auto'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 50, 50.05, -10, 10, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 1', ['P', 100, 100.1, -10, 10, 0.05, 'dnx'], [False, 0.0]], ['partial repair probe 2', ['P', 50, 50.05, -10, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 1', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['boundary control 2', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['normal control 1', ['C', 50, 50.02, -4, 100, 0.01, 'dnx'], [True, -8.0]], ['normal control 2', ['P', 25, 25, 3, 100, 0.02, 'exercise'], [True, 0.0]]], [['regression put intrinsic value 1', ['C', 4500, 4499.98, 1, 10, 0.01, 'exercise'], [True, 0.0]], ['regression put intrinsic value 2', ['P', 212.5, 213.87, -1, 50, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 1', ['P', 50, 50.05, 3, 100, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 2', ['P', 50, 50.05, -10, 50, 0.01, 'dnx'], [False, 0.0]], ['boundary control 1', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 2', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['normal control 1', ['P', 101.5, 101.5, 1, 50, 0.01, 'exercise'], [True, 0.0]], ['normal control 2', ['P', 101.5, 101.49, 10, 100, 0.02, 'auto'], [False, 0.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 put intrinsic value 1[False, 0.0][False, 0.0]Passed
regression put intrinsic value 2[True, 1370.0][True, 0.0]Failed
partial repair probe 1[True, -4.0][False, 0.0]Failed
partial repair probe 2[True, 15.0][False, 0.0]Failed
boundary control 1[False, 0.0][False, 0.0]Passed
boundary control 2[False, 0.0][False, 0.0]Passed
normal control 1[False, 0.0][False, 0.0]Passed
normal control 2[False, 0.0][False, 0.0]Passed

SHA-256 / e4f0a9508748c4018f577e1b6d1f34442b65e0a16dec1b0dbb6b33b8a0da23a3

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(kind, strike, settle, contracts, multiplier, min_itm, instruction):
    k = round(strike * 100)
    s = round(settle * 100)
    thr = round(min_itm * 100)
    intrinsic = max(0, s - k) if kind == 'C' else max(0, k - s)
    auto = intrinsic >= thr
    if contracts > 0:
        if instruction == 'exercise':
            ex = True
        elif instruction == 'dnx':
            ex = False
        else:
            ex = auto
    else:
        ex = auto
    cash = intrinsic * multiplier * abs(contracts) if ex else 0
    if contracts < 0:
        cash = -cash
    return [ex, cash / 100]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression put intrinsic value 1', ['C', 101.5, 101.45, -4, 100, 0.02, 'auto'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 50, 51.37, 10, 100, 0.02, 'exercise'], [True, 0.0]], ['partial repair probe 1', ['P', 150, 150.02, -4, 50, 0.01, 'exercise'], [False, 0.0]], ['partial repair probe 2', ['P', 150, 150.05, 3, 100, 0.02, 'auto'], [False, 0.0]], ['boundary control 1', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 2', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['normal control 1', ['C', 50, 50.02, 10, 100, 0.05, 'auto'], [False, 0.0]], ['normal control 2', ['P', 150, 150, -4, 10, 0.01, 'auto'], [False, 0.0]]], [['regression put intrinsic value 1', ['P', 101.5, 102.87, -10, 50, 0.01, 'dnx'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 50, 50.01, -1, 50, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 1', ['P', 4500, 4512.25, -10, 100, 0.01, 'dnx'], [False, 0.0]], ['partial repair probe 2', ['P', 4500, 4500.1, -1, 50, 0.01, 'exercise'], [False, 0.0]], ['boundary control 1', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['boundary control 2', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['normal control 1', ['C', 212.5, 212.5, 1, 100, 0.01, 'auto'], [False, 0.0]], ['normal control 2', ['C', 50, 50.01, 3, 10, 0.01, 'dnx'], [False, 0.0]]], [['regression put intrinsic value 1', ['P', 150, 150.05, -10, 100, 0.05, 'dnx'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 25, 25.1, -10, 50, 0.02, 'exercise'], [False, 0.0]], ['partial repair probe 1', ['P', 50, 50.1, -1, 50, 0.05, 'dnx'], [False, 0.0]], ['partial repair probe 2', ['P', 4500, 4500.1, -4, 100, 0.01, 'exercise'], [False, 0.0]], ['boundary control 1', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['boundary control 2', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['normal control 1', ['C', 212.5, 212.6, 10, 100, 0.05, 'dnx'], [False, 0.0]], ['normal control 2', ['C', 101.5, 101.5, 10, 50, 0.02, 'dnx'], [False, 0.0]]], [['regression put intrinsic value 1', ['C', 4500, 4499.99, -4, 100, 0.01, 'auto'], [False, 0.0]], ['regression put intrinsic value 2', ['P', 50, 50.05, -10, 10, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 1', ['P', 100, 100.1, -10, 10, 0.05, 'dnx'], [False, 0.0]], ['partial repair probe 2', ['P', 50, 50.05, -10, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 1', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['boundary control 2', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['normal control 1', ['C', 50, 50.02, -4, 100, 0.01, 'dnx'], [True, -8.0]], ['normal control 2', ['P', 25, 25, 3, 100, 0.02, 'exercise'], [True, 0.0]]], [['regression put intrinsic value 1', ['C', 4500, 4499.98, 1, 10, 0.01, 'exercise'], [True, 0.0]], ['regression put intrinsic value 2', ['P', 212.5, 213.87, -1, 50, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 1', ['P', 50, 50.05, 3, 100, 0.01, 'auto'], [False, 0.0]], ['partial repair probe 2', ['P', 50, 50.05, -10, 50, 0.01, 'dnx'], [False, 0.0]], ['boundary control 1', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 2', ['C', 100, 100.01, 1, 100, 0.01, 'auto'], [True, 1.0]], ['normal control 1', ['P', 101.5, 101.5, 1, 50, 0.01, 'exercise'], [True, 0.0]], ['normal control 2', ['P', 101.5, 101.49, 10, 100, 0.02, 'auto'], [False, 0.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 put intrinsic value 1[False, 0.0][False, 0.0]Passed
regression put intrinsic value 2[True, 0.0][True, 0.0]Passed
partial repair probe 1[False, 0.0][False, 0.0]Passed
partial repair probe 2[False, 0.0][False, 0.0]Passed
boundary control 1[False, 0.0][False, 0.0]Passed
boundary control 2[False, 0.0][False, 0.0]Passed
normal control 1[False, 0.0][False, 0.0]Passed
normal control 2[False, 0.0][False, 0.0]Passed

SHA-256 / 66934b9fd15a69a4e90f14da0239e7c16898015aed1ac9454205f57038219778

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

Case digest / 020af40496594b545b231e5ee39697469ed4cda2b95dce234c96fa696c14a219