FA-61361 / Options payoff and settlement / Open access
Cash-settled expiry with exercise by exception: the settlement amount ignores the contract multiplier · case 01
Cash settlement is a fraction of the correct amount.
ROOT CAUSE
The amount multiplies intrinsic by contracts only.
VERIFIED REPAIR
Multiply intrinsic by the contract multiplier and the number of contracts.
Unsuccessful approach: Hard-coding a multiplier of 100 is wrong for mini and index contracts.
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 = 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 * 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 contract multiplier 1', ['C', 212.5, 212.54, -1, 100, 0.01, 'dnx'], [True, -4.0]], ['regression contract multiplier 2', ['P', 50, 47.5, -10, 100, 0.05, 'dnx'], [True, -2500.0]], ['partial repair probe 1', ['P', 212.5, 212.49, -1, 50, 0.01, 'dnx'], [True, -0.5]], ['partial repair probe 2', ['C', 212.5, 224.75, -4, 10, 0.01, 'auto'], [True, -490.0]], ['boundary control 1', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['boundary control 2', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['normal control 1', ['P', 101.5, 101.5, -10, 10, 0.05, 'dnx'], [False, 0.0]], ['normal control 2', ['C', 25, 24.98, 1, 100, 0.01, 'auto'], [False, 0.0]]], [['regression contract multiplier 1', ['C', 100, 101.37, -1, 50, 0.05, 'auto'], [True, -68.5]], ['regression contract multiplier 2', ['P', 150, 149.95, -10, 10, 0.05, 'exercise'], [True, -5.0]], ['partial repair probe 1', ['P', 50, 49.98, 1, 10, 0.01, 'exercise'], [True, 0.2]], ['partial repair probe 2', ['P', 25, 22.5, -10, 50, 0.01, 'auto'], [True, -1250.0]], ['boundary control 1', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['boundary control 2', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['normal control 1', ['P', 4500, 4500.05, 1, 50, 0.02, 'exercise'], [True, 0.0]], ['normal control 2', ['P', 212.5, 224.75, -1, 50, 0.02, 'auto'], [False, 0.0]]], [['regression contract multiplier 1', ['C', 100, 112.25, -10, 10, 0.01, 'auto'], [True, -1225.0]], ['regression contract multiplier 2', ['P', 101.5, 101.45, -1, 50, 0.02, 'auto'], [True, -2.5]], ['partial repair probe 1', ['C', 212.5, 213.87, -10, 10, 0.01, 'dnx'], [True, -137.0]], ['partial repair probe 2', ['P', 150, 147.5, -10, 10, 0.01, 'auto'], [True, -250.0]], ['boundary control 1', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 2', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['normal control 1', ['P', 101.5, 101.6, -10, 100, 0.05, 'auto'], [False, 0.0]], ['normal control 2', ['C', 25, 25, -1, 100, 0.05, 'exercise'], [False, 0.0]]], [['regression contract multiplier 1', ['P', 212.5, 212.45, -10, 10, 0.02, 'auto'], [True, -5.0]], ['regression contract multiplier 2', ['C', 100, 100.05, 1, 10, 0.01, 'auto'], [True, 0.5]], ['partial repair probe 1', ['C', 50, 62.25, -4, 50, 0.01, 'dnx'], [True, -2450.0]], ['partial repair probe 2', ['C', 25, 37.25, -4, 50, 0.02, 'exercise'], [True, -2450.0]], ['boundary control 1', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['boundary control 2', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['normal control 1', ['P', 100, 100.02, 10, 100, 0.02, 'auto'], [False, 0.0]], ['normal control 2', ['P', 212.5, 212.55, -1, 50, 0.05, 'dnx'], [False, 0.0]]], [['regression contract multiplier 1', ['C', 4500, 4501.37, -10, 50, 0.02, 'dnx'], [True, -685.0]], ['regression contract multiplier 2', ['C', 100, 112.25, -10, 50, 0.01, 'dnx'], [True, -6125.0]], ['partial repair probe 1', ['C', 4500, 4500.02, 1, 10, 0.02, 'auto'], [True, 0.2]], ['partial repair probe 2', ['C', 212.5, 212.51, -1, 50, 0.01, 'auto'], [True, -0.5]], ['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', 4500, 4497.5, -10, 50, 0.01, 'exercise'], [False, 0.0]], ['normal control 2', ['P', 50, 49.98, -1, 100, 0.05, 'dnx'], [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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression contract multiplier 1 | [True, -0.04] | [True, -4.0] | Failed |
| regression contract multiplier 2 | [True, -25.0] | [True, -2500.0] | Failed |
| partial repair probe 1 | [True, -0.01] | [True, -0.5] | Failed |
| partial repair probe 2 | [True, -49.0] | [True, -490.0] | Failed |
| boundary control 1 | [False, 0.0] | [False, 0.0] | Passed |
| boundary control 2 | [True, 0.0] | [True, 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 / e5240967fb93e2cf4d022d2b166ff16d434a529797783f9165220fad10e05ef8
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 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 * 100 * 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 contract multiplier 1', ['C', 212.5, 212.54, -1, 100, 0.01, 'dnx'], [True, -4.0]], ['regression contract multiplier 2', ['P', 50, 47.5, -10, 100, 0.05, 'dnx'], [True, -2500.0]], ['partial repair probe 1', ['P', 212.5, 212.49, -1, 50, 0.01, 'dnx'], [True, -0.5]], ['partial repair probe 2', ['C', 212.5, 224.75, -4, 10, 0.01, 'auto'], [True, -490.0]], ['boundary control 1', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['boundary control 2', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['normal control 1', ['P', 101.5, 101.5, -10, 10, 0.05, 'dnx'], [False, 0.0]], ['normal control 2', ['C', 25, 24.98, 1, 100, 0.01, 'auto'], [False, 0.0]]], [['regression contract multiplier 1', ['C', 100, 101.37, -1, 50, 0.05, 'auto'], [True, -68.5]], ['regression contract multiplier 2', ['P', 150, 149.95, -10, 10, 0.05, 'exercise'], [True, -5.0]], ['partial repair probe 1', ['P', 50, 49.98, 1, 10, 0.01, 'exercise'], [True, 0.2]], ['partial repair probe 2', ['P', 25, 22.5, -10, 50, 0.01, 'auto'], [True, -1250.0]], ['boundary control 1', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['boundary control 2', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['normal control 1', ['P', 4500, 4500.05, 1, 50, 0.02, 'exercise'], [True, 0.0]], ['normal control 2', ['P', 212.5, 224.75, -1, 50, 0.02, 'auto'], [False, 0.0]]], [['regression contract multiplier 1', ['C', 100, 112.25, -10, 10, 0.01, 'auto'], [True, -1225.0]], ['regression contract multiplier 2', ['P', 101.5, 101.45, -1, 50, 0.02, 'auto'], [True, -2.5]], ['partial repair probe 1', ['C', 212.5, 213.87, -10, 10, 0.01, 'dnx'], [True, -137.0]], ['partial repair probe 2', ['P', 150, 147.5, -10, 10, 0.01, 'auto'], [True, -250.0]], ['boundary control 1', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 2', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['normal control 1', ['P', 101.5, 101.6, -10, 100, 0.05, 'auto'], [False, 0.0]], ['normal control 2', ['C', 25, 25, -1, 100, 0.05, 'exercise'], [False, 0.0]]], [['regression contract multiplier 1', ['P', 212.5, 212.45, -10, 10, 0.02, 'auto'], [True, -5.0]], ['regression contract multiplier 2', ['C', 100, 100.05, 1, 10, 0.01, 'auto'], [True, 0.5]], ['partial repair probe 1', ['C', 50, 62.25, -4, 50, 0.01, 'dnx'], [True, -2450.0]], ['partial repair probe 2', ['C', 25, 37.25, -4, 50, 0.02, 'exercise'], [True, -2450.0]], ['boundary control 1', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['boundary control 2', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['normal control 1', ['P', 100, 100.02, 10, 100, 0.02, 'auto'], [False, 0.0]], ['normal control 2', ['P', 212.5, 212.55, -1, 50, 0.05, 'dnx'], [False, 0.0]]], [['regression contract multiplier 1', ['C', 4500, 4501.37, -10, 50, 0.02, 'dnx'], [True, -685.0]], ['regression contract multiplier 2', ['C', 100, 112.25, -10, 50, 0.01, 'dnx'], [True, -6125.0]], ['partial repair probe 1', ['C', 4500, 4500.02, 1, 10, 0.02, 'auto'], [True, 0.2]], ['partial repair probe 2', ['C', 212.5, 212.51, -1, 50, 0.01, 'auto'], [True, -0.5]], ['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', 4500, 4497.5, -10, 50, 0.01, 'exercise'], [False, 0.0]], ['normal control 2', ['P', 50, 49.98, -1, 100, 0.05, 'dnx'], [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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression contract multiplier 1 | [True, -4.0] | [True, -4.0] | Passed |
| regression contract multiplier 2 | [True, -2500.0] | [True, -2500.0] | Passed |
| partial repair probe 1 | [True, -1.0] | [True, -0.5] | Failed |
| partial repair probe 2 | [True, -4900.0] | [True, -490.0] | Failed |
| boundary control 1 | [False, 0.0] | [False, 0.0] | Passed |
| boundary control 2 | [True, 0.0] | [True, 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 / 5a9205fb4b7f76be49e0edb719ec3135e11131e4092e3203724f56e90b9c09f2
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 contract multiplier 1', ['C', 212.5, 212.54, -1, 100, 0.01, 'dnx'], [True, -4.0]], ['regression contract multiplier 2', ['P', 50, 47.5, -10, 100, 0.05, 'dnx'], [True, -2500.0]], ['partial repair probe 1', ['P', 212.5, 212.49, -1, 50, 0.01, 'dnx'], [True, -0.5]], ['partial repair probe 2', ['C', 212.5, 224.75, -4, 10, 0.01, 'auto'], [True, -490.0]], ['boundary control 1', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['boundary control 2', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['normal control 1', ['P', 101.5, 101.5, -10, 10, 0.05, 'dnx'], [False, 0.0]], ['normal control 2', ['C', 25, 24.98, 1, 100, 0.01, 'auto'], [False, 0.0]]], [['regression contract multiplier 1', ['C', 100, 101.37, -1, 50, 0.05, 'auto'], [True, -68.5]], ['regression contract multiplier 2', ['P', 150, 149.95, -10, 10, 0.05, 'exercise'], [True, -5.0]], ['partial repair probe 1', ['P', 50, 49.98, 1, 10, 0.01, 'exercise'], [True, 0.2]], ['partial repair probe 2', ['P', 25, 22.5, -10, 50, 0.01, 'auto'], [True, -1250.0]], ['boundary control 1', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['boundary control 2', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['normal control 1', ['P', 4500, 4500.05, 1, 50, 0.02, 'exercise'], [True, 0.0]], ['normal control 2', ['P', 212.5, 224.75, -1, 50, 0.02, 'auto'], [False, 0.0]]], [['regression contract multiplier 1', ['C', 100, 112.25, -10, 10, 0.01, 'auto'], [True, -1225.0]], ['regression contract multiplier 2', ['P', 101.5, 101.45, -1, 50, 0.02, 'auto'], [True, -2.5]], ['partial repair probe 1', ['C', 212.5, 213.87, -10, 10, 0.01, 'dnx'], [True, -137.0]], ['partial repair probe 2', ['P', 150, 147.5, -10, 10, 0.01, 'auto'], [True, -250.0]], ['boundary control 1', ['P', 100, 100, 1, 100, 0.01, 'auto'], [False, 0.0]], ['boundary control 2', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['normal control 1', ['P', 101.5, 101.6, -10, 100, 0.05, 'auto'], [False, 0.0]], ['normal control 2', ['C', 25, 25, -1, 100, 0.05, 'exercise'], [False, 0.0]]], [['regression contract multiplier 1', ['P', 212.5, 212.45, -10, 10, 0.02, 'auto'], [True, -5.0]], ['regression contract multiplier 2', ['C', 100, 100.05, 1, 10, 0.01, 'auto'], [True, 0.5]], ['partial repair probe 1', ['C', 50, 62.25, -4, 50, 0.01, 'dnx'], [True, -2450.0]], ['partial repair probe 2', ['C', 25, 37.25, -4, 50, 0.02, 'exercise'], [True, -2450.0]], ['boundary control 1', ['C', 100, 99.0, 2, 100, 0.01, 'exercise'], [True, 0.0]], ['boundary control 2', ['C', 100, 105, 1, 100, 0.01, 'dnx'], [False, 0.0]], ['normal control 1', ['P', 100, 100.02, 10, 100, 0.02, 'auto'], [False, 0.0]], ['normal control 2', ['P', 212.5, 212.55, -1, 50, 0.05, 'dnx'], [False, 0.0]]], [['regression contract multiplier 1', ['C', 4500, 4501.37, -10, 50, 0.02, 'dnx'], [True, -685.0]], ['regression contract multiplier 2', ['C', 100, 112.25, -10, 50, 0.01, 'dnx'], [True, -6125.0]], ['partial repair probe 1', ['C', 4500, 4500.02, 1, 10, 0.02, 'auto'], [True, 0.2]], ['partial repair probe 2', ['C', 212.5, 212.51, -1, 50, 0.01, 'auto'], [True, -0.5]], ['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', 4500, 4497.5, -10, 50, 0.01, 'exercise'], [False, 0.0]], ['normal control 2', ['P', 50, 49.98, -1, 100, 0.05, 'dnx'], [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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression contract multiplier 1 | [True, -4.0] | [True, -4.0] | Passed |
| regression contract multiplier 2 | [True, -2500.0] | [True, -2500.0] | Passed |
| partial repair probe 1 | [True, -0.5] | [True, -0.5] | Passed |
| partial repair probe 2 | [True, -490.0] | [True, -490.0] | Passed |
| boundary control 1 | [False, 0.0] | [False, 0.0] | Passed |
| boundary control 2 | [True, 0.0] | [True, 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 / 7ebfe2217b46063a40c698bdde10c3efba2e3f97a102f6ab7954e1ebc26c5ac3
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.477002+00:00.
Case digest / e4a3f36856a12d691a6b646a3cc070429f95b0c2b08434d36c01aedbb15a2758