FA-61391 / Options payoff and settlement / Open access
Contract adjustment for splits and special dividends: the adjusted strike is truncated to cents · case 01
Strikes whose division leaves half a cent or more are a cent too low.
ROOT CAUSE
The strike division uses floor division.
VERIFIED REPAIR
Round the divided strike half-up to cents.
Unsuccessful approach: Python round() uses banker's rounding and still lowers exact half cents to even.
Case contract
Inputs strike, contracts, deliverable, action and value. split [new, old]: if new is a multiple of old (ratio r), strike becomes strike/r rounded half-up to cents and contracts become contracts*r; otherwise the deliverable becomes floor(deliverable*new/old) with strike and contracts unchanged. special_div of at least 0.125 per share reduces the strike by the amount (rounded half-up to cents). Other actions, including ordinary_div, change nothing. Return [strike, contracts, deliverable].
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(strike, contracts, deliverable, action, value):
k = round(strike * 100)
if action == 'split':
new, old = value
if new % old == 0:
r = new // old
k = k // r
contracts = contracts * r
else:
deliverable = deliverable * new // old
elif action == 'special_div':
amt = round(value * 1000)
if amt >= 125:
k = (k * 10 - amt + 5) // 10
return [k / 100, contracts, deliverable]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression adjusted strike rounding 1', [33.33, 1, 100, 'split', [2, 1]], [16.67, 2, 100]], ['regression adjusted strike rounding 2', [25.25, 10, 100, 'split', [4, 2]], [12.63, 20, 100]], ['partial repair probe 1', [33.33, 3, 100, 'split', [4, 2]], [16.67, 6, 100]], ['partial repair probe 2', [25.25, 1, 150, 'split', [2, 1]], [12.63, 2, 150]], ['boundary control 1', [40, 1, 100, 'ordinary_div', 1.0], [40.0, 1, 100]], ['boundary control 2', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['normal control 1', [33.33, 1, 100, 'merger', 0.125], [33.33, 1, 100]], ['normal control 2', [47.5, 3, 100, 'special_div', 1.25], [46.25, 3, 100]]], [['regression adjusted strike rounding 1', [25.25, 1, 100, 'split', [3, 1]], [8.42, 3, 100]], ['regression adjusted strike rounding 2', [33.33, 10, 100, 'split', [4, 2]], [16.67, 20, 100]], ['partial repair probe 1', [150.05, 1, 150, 'split', [4, 2]], [75.03, 2, 150]], ['partial repair probe 2', [150.05, 3, 150, 'split', [2, 1]], [75.03, 6, 150]], ['boundary control 1', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['boundary control 2', [40, 1, 100, 'split', [3, 2]], [40.0, 1, 150]], ['normal control 1', [40, 10, 150, 'split', [3, 1]], [13.33, 30, 150]], ['normal control 2', [47.5, 3, 100, 'split', [2, 1]], [23.75, 6, 100]]], [['regression adjusted strike rounding 1', [33.33, 1, 100, 'split', [4, 2]], [16.67, 2, 100]], ['regression adjusted strike rounding 2', [25.25, 10, 150, 'split', [2, 1]], [12.63, 20, 150]], ['partial repair probe 1', [150.05, 10, 150, 'split', [2, 1]], [75.03, 20, 150]], ['partial repair probe 2', [33.33, 10, 100, 'split', [6, 3]], [16.67, 20, 100]], ['boundary control 1', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['boundary control 2', [40, 1, 100, 'ordinary_div', 1.0], [40.0, 1, 100]], ['normal control 1', [33.33, 3, 100, 'special_div', 0.125], [33.21, 3, 100]], ['normal control 2', [40, 10, 100, 'special_div', 0.5], [39.5, 10, 100]]], [['regression adjusted strike rounding 1', [150.05, 1, 150, 'split', [2, 1]], [75.03, 2, 150]], ['regression adjusted strike rounding 2', [25.25, 1, 100, 'split', [6, 3]], [12.63, 2, 100]], ['partial repair probe 1', [33.33, 3, 100, 'split', [4, 2]], [16.67, 6, 100]], ['partial repair probe 2', [150.05, 3, 100, 'split', [4, 2]], [75.03, 6, 100]], ['boundary control 1', [40, 1, 100, 'ordinary_div', 1.0], [40.0, 1, 100]], ['boundary control 2', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['normal control 1', [40, 1, 150, 'split', [2, 1]], [20.0, 2, 150]], ['normal control 2', [87.75, 3, 100, 'ordinary_div', 0.126], [87.75, 3, 100]]], [['regression adjusted strike rounding 1', [25.25, 10, 150, 'split', [2, 1]], [12.63, 20, 150]], ['regression adjusted strike rounding 2', [150.05, 1, 100, 'split', [4, 2]], [75.03, 2, 100]], ['partial repair probe 1', [25.25, 3, 100, 'split', [4, 2]], [12.63, 6, 100]], ['partial repair probe 2', [25.25, 3, 150, 'split', [2, 1]], [12.63, 6, 150]], ['boundary control 1', [40, 1, 100, 'split', [3, 2]], [40.0, 1, 150]], ['boundary control 2', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['normal control 1', [25.25, 1, 100, 'merger', 1.25], [25.25, 1, 100]], ['normal control 2', [12.5, 10, 100, 'split', [5, 4]], [12.5, 10, 125]]]]
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 adjusted strike rounding 1 | [16.66, 2, 100] | [16.67, 2, 100] | Failed |
| regression adjusted strike rounding 2 | [12.62, 20, 100] | [12.63, 20, 100] | Failed |
| partial repair probe 1 | [16.66, 6, 100] | [16.67, 6, 100] | Failed |
| partial repair probe 2 | [12.62, 2, 150] | [12.63, 2, 150] | Failed |
| boundary control 1 | [40.0, 1, 100] | [40.0, 1, 100] | Passed |
| boundary control 2 | [39.88, 1, 100] | [39.88, 1, 100] | Passed |
| normal control 1 | [33.33, 1, 100] | [33.33, 1, 100] | Passed |
| normal control 2 | [46.25, 3, 100] | [46.25, 3, 100] | Passed |
SHA-256 / 8ec042c86ca3059cee3ef14fa785ffd092ce86d4d4579a5f6eb830d483f4e30c
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(strike, contracts, deliverable, action, value):
k = round(strike * 100)
if action == 'split':
new, old = value
if new % old == 0:
r = new // old
k = round(k / r)
contracts = contracts * r
else:
deliverable = deliverable * new // old
elif action == 'special_div':
amt = round(value * 1000)
if amt >= 125:
k = (k * 10 - amt + 5) // 10
return [k / 100, contracts, deliverable]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression adjusted strike rounding 1', [33.33, 1, 100, 'split', [2, 1]], [16.67, 2, 100]], ['regression adjusted strike rounding 2', [25.25, 10, 100, 'split', [4, 2]], [12.63, 20, 100]], ['partial repair probe 1', [33.33, 3, 100, 'split', [4, 2]], [16.67, 6, 100]], ['partial repair probe 2', [25.25, 1, 150, 'split', [2, 1]], [12.63, 2, 150]], ['boundary control 1', [40, 1, 100, 'ordinary_div', 1.0], [40.0, 1, 100]], ['boundary control 2', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['normal control 1', [33.33, 1, 100, 'merger', 0.125], [33.33, 1, 100]], ['normal control 2', [47.5, 3, 100, 'special_div', 1.25], [46.25, 3, 100]]], [['regression adjusted strike rounding 1', [25.25, 1, 100, 'split', [3, 1]], [8.42, 3, 100]], ['regression adjusted strike rounding 2', [33.33, 10, 100, 'split', [4, 2]], [16.67, 20, 100]], ['partial repair probe 1', [150.05, 1, 150, 'split', [4, 2]], [75.03, 2, 150]], ['partial repair probe 2', [150.05, 3, 150, 'split', [2, 1]], [75.03, 6, 150]], ['boundary control 1', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['boundary control 2', [40, 1, 100, 'split', [3, 2]], [40.0, 1, 150]], ['normal control 1', [40, 10, 150, 'split', [3, 1]], [13.33, 30, 150]], ['normal control 2', [47.5, 3, 100, 'split', [2, 1]], [23.75, 6, 100]]], [['regression adjusted strike rounding 1', [33.33, 1, 100, 'split', [4, 2]], [16.67, 2, 100]], ['regression adjusted strike rounding 2', [25.25, 10, 150, 'split', [2, 1]], [12.63, 20, 150]], ['partial repair probe 1', [150.05, 10, 150, 'split', [2, 1]], [75.03, 20, 150]], ['partial repair probe 2', [33.33, 10, 100, 'split', [6, 3]], [16.67, 20, 100]], ['boundary control 1', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['boundary control 2', [40, 1, 100, 'ordinary_div', 1.0], [40.0, 1, 100]], ['normal control 1', [33.33, 3, 100, 'special_div', 0.125], [33.21, 3, 100]], ['normal control 2', [40, 10, 100, 'special_div', 0.5], [39.5, 10, 100]]], [['regression adjusted strike rounding 1', [150.05, 1, 150, 'split', [2, 1]], [75.03, 2, 150]], ['regression adjusted strike rounding 2', [25.25, 1, 100, 'split', [6, 3]], [12.63, 2, 100]], ['partial repair probe 1', [33.33, 3, 100, 'split', [4, 2]], [16.67, 6, 100]], ['partial repair probe 2', [150.05, 3, 100, 'split', [4, 2]], [75.03, 6, 100]], ['boundary control 1', [40, 1, 100, 'ordinary_div', 1.0], [40.0, 1, 100]], ['boundary control 2', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['normal control 1', [40, 1, 150, 'split', [2, 1]], [20.0, 2, 150]], ['normal control 2', [87.75, 3, 100, 'ordinary_div', 0.126], [87.75, 3, 100]]], [['regression adjusted strike rounding 1', [25.25, 10, 150, 'split', [2, 1]], [12.63, 20, 150]], ['regression adjusted strike rounding 2', [150.05, 1, 100, 'split', [4, 2]], [75.03, 2, 100]], ['partial repair probe 1', [25.25, 3, 100, 'split', [4, 2]], [12.63, 6, 100]], ['partial repair probe 2', [25.25, 3, 150, 'split', [2, 1]], [12.63, 6, 150]], ['boundary control 1', [40, 1, 100, 'split', [3, 2]], [40.0, 1, 150]], ['boundary control 2', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['normal control 1', [25.25, 1, 100, 'merger', 1.25], [25.25, 1, 100]], ['normal control 2', [12.5, 10, 100, 'split', [5, 4]], [12.5, 10, 125]]]]
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 adjusted strike rounding 1 | [16.66, 2, 100] | [16.67, 2, 100] | Failed |
| regression adjusted strike rounding 2 | [12.62, 20, 100] | [12.63, 20, 100] | Failed |
| partial repair probe 1 | [16.66, 6, 100] | [16.67, 6, 100] | Failed |
| partial repair probe 2 | [12.62, 2, 150] | [12.63, 2, 150] | Failed |
| boundary control 1 | [40.0, 1, 100] | [40.0, 1, 100] | Passed |
| boundary control 2 | [39.88, 1, 100] | [39.88, 1, 100] | Passed |
| normal control 1 | [33.33, 1, 100] | [33.33, 1, 100] | Passed |
| normal control 2 | [46.25, 3, 100] | [46.25, 3, 100] | Passed |
SHA-256 / b2b16bf7ac71f64844140d76cf11715518921f44b2495fe05a776b4cee65406d
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(strike, contracts, deliverable, action, value):
k = round(strike * 100)
if action == 'split':
new, old = value
if new % old == 0:
r = new // old
k = (2 * k + r) // (2 * r)
contracts = contracts * r
else:
deliverable = deliverable * new // old
elif action == 'special_div':
amt = round(value * 1000)
if amt >= 125:
k = (k * 10 - amt + 5) // 10
return [k / 100, contracts, deliverable]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression adjusted strike rounding 1', [33.33, 1, 100, 'split', [2, 1]], [16.67, 2, 100]], ['regression adjusted strike rounding 2', [25.25, 10, 100, 'split', [4, 2]], [12.63, 20, 100]], ['partial repair probe 1', [33.33, 3, 100, 'split', [4, 2]], [16.67, 6, 100]], ['partial repair probe 2', [25.25, 1, 150, 'split', [2, 1]], [12.63, 2, 150]], ['boundary control 1', [40, 1, 100, 'ordinary_div', 1.0], [40.0, 1, 100]], ['boundary control 2', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['normal control 1', [33.33, 1, 100, 'merger', 0.125], [33.33, 1, 100]], ['normal control 2', [47.5, 3, 100, 'special_div', 1.25], [46.25, 3, 100]]], [['regression adjusted strike rounding 1', [25.25, 1, 100, 'split', [3, 1]], [8.42, 3, 100]], ['regression adjusted strike rounding 2', [33.33, 10, 100, 'split', [4, 2]], [16.67, 20, 100]], ['partial repair probe 1', [150.05, 1, 150, 'split', [4, 2]], [75.03, 2, 150]], ['partial repair probe 2', [150.05, 3, 150, 'split', [2, 1]], [75.03, 6, 150]], ['boundary control 1', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['boundary control 2', [40, 1, 100, 'split', [3, 2]], [40.0, 1, 150]], ['normal control 1', [40, 10, 150, 'split', [3, 1]], [13.33, 30, 150]], ['normal control 2', [47.5, 3, 100, 'split', [2, 1]], [23.75, 6, 100]]], [['regression adjusted strike rounding 1', [33.33, 1, 100, 'split', [4, 2]], [16.67, 2, 100]], ['regression adjusted strike rounding 2', [25.25, 10, 150, 'split', [2, 1]], [12.63, 20, 150]], ['partial repair probe 1', [150.05, 10, 150, 'split', [2, 1]], [75.03, 20, 150]], ['partial repair probe 2', [33.33, 10, 100, 'split', [6, 3]], [16.67, 20, 100]], ['boundary control 1', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['boundary control 2', [40, 1, 100, 'ordinary_div', 1.0], [40.0, 1, 100]], ['normal control 1', [33.33, 3, 100, 'special_div', 0.125], [33.21, 3, 100]], ['normal control 2', [40, 10, 100, 'special_div', 0.5], [39.5, 10, 100]]], [['regression adjusted strike rounding 1', [150.05, 1, 150, 'split', [2, 1]], [75.03, 2, 150]], ['regression adjusted strike rounding 2', [25.25, 1, 100, 'split', [6, 3]], [12.63, 2, 100]], ['partial repair probe 1', [33.33, 3, 100, 'split', [4, 2]], [16.67, 6, 100]], ['partial repair probe 2', [150.05, 3, 100, 'split', [4, 2]], [75.03, 6, 100]], ['boundary control 1', [40, 1, 100, 'ordinary_div', 1.0], [40.0, 1, 100]], ['boundary control 2', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['normal control 1', [40, 1, 150, 'split', [2, 1]], [20.0, 2, 150]], ['normal control 2', [87.75, 3, 100, 'ordinary_div', 0.126], [87.75, 3, 100]]], [['regression adjusted strike rounding 1', [25.25, 10, 150, 'split', [2, 1]], [12.63, 20, 150]], ['regression adjusted strike rounding 2', [150.05, 1, 100, 'split', [4, 2]], [75.03, 2, 100]], ['partial repair probe 1', [25.25, 3, 100, 'split', [4, 2]], [12.63, 6, 100]], ['partial repair probe 2', [25.25, 3, 150, 'split', [2, 1]], [12.63, 6, 150]], ['boundary control 1', [40, 1, 100, 'split', [3, 2]], [40.0, 1, 150]], ['boundary control 2', [40, 1, 100, 'special_div', 0.125], [39.88, 1, 100]], ['normal control 1', [25.25, 1, 100, 'merger', 1.25], [25.25, 1, 100]], ['normal control 2', [12.5, 10, 100, 'split', [5, 4]], [12.5, 10, 125]]]]
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 adjusted strike rounding 1 | [16.67, 2, 100] | [16.67, 2, 100] | Passed |
| regression adjusted strike rounding 2 | [12.63, 20, 100] | [12.63, 20, 100] | Passed |
| partial repair probe 1 | [16.67, 6, 100] | [16.67, 6, 100] | Passed |
| partial repair probe 2 | [12.63, 2, 150] | [12.63, 2, 150] | Passed |
| boundary control 1 | [40.0, 1, 100] | [40.0, 1, 100] | Passed |
| boundary control 2 | [39.88, 1, 100] | [39.88, 1, 100] | Passed |
| normal control 1 | [33.33, 1, 100] | [33.33, 1, 100] | Passed |
| normal control 2 | [46.25, 3, 100] | [46.25, 3, 100] | Passed |
SHA-256 / ab936af95b40bde9d258621b349e1432c115e5559b1bb985dc0c160b0078e795
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.859134+00:00.
Case digest / ee5eb6889fc766560a7fbe097a6290da589eeb653fe77e45ed95fcda04f89033