FA-61416 / Options payoff and settlement / Open access
Arithmetic Asian payoff with disrupted fixings: disrupted fixings are dropped from the average · case 01
Averages over fewer observations overweight the remaining fixings.
ROOT CAUSE
The average is taken over valid fixings only instead of filling disruptions.
VERIFIED REPAIR
Fill each disrupted fixing and average over the full schedule.
Unsuccessful approach: Counting disruptions as zero drags the average down.
Case contract
Inputs kind (price-call, price-put, strike-call), fixings (None = disrupted), strike and final price. A disrupted fixing takes the last preceding filled value; if none precedes, the next valid fixing. avg = mean of the filled fixings. price-call pays max(avg-K,0), price-put max(K-avg,0), strike-call max(final-avg,0). Round 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
N = 1
observations = []
def solve(kind, fixings, strike, final):
vals = list(fixings)
filled = []
for i, v in enumerate(vals):
if v is None:
prev = [x for x in filled if x is not None]
later = [x for x in vals[i + 1:] if x is not None]
v = prev[-1] if prev else later[0]
filled.append(v)
avg = sum(v for v in fixings if v is not None) / len([v for v in fixings if v is not None])
if kind == 'price-call':
pay = max(avg - strike, 0.0)
elif kind == 'price-put':
pay = max(strike - avg, 0.0)
else:
pay = max(final - avg, 0.0)
return round(pay, 6)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression disrupted fixing handling 1', ['strike-call', [None, 87.52, 112.04, 81.76, 108.63, 98.66, 109.85, None], 110, 119.83], 20.35125], ['regression disrupted fixing handling 2', ['price-call', [None, 117.16, 81.52], 90, 95.95], 15.28], ['partial repair probe 1', ['price-put', [None, 92.96], 100, 104.63], 7.04], ['partial repair probe 2', ['price-call', [None, 111.0], 105, 107.34], 6.0], ['normal control 1', ['price-call', [107.13, None, None, 105.03, None, 100.25, None], 110, 104.13], 0.0], ['normal control 2', ['price-call', [104.5, 99.92, 114.23, 95.28], 105, 89.1], 0.0], ['normal control 3', ['price-put', [114.44, 99.53, 94.81], 105, 117.35], 2.073333], ['normal control 4', ['price-call', [90.6, None, 99.94, 92.36, 97.01, 110.32, 105.44, 114.87], 105, 99.53], 0.0]], [['regression disrupted fixing handling 1', ['price-put', [111.81, 89.43, 91.67, None], 100, 119.46], 3.855], ['regression disrupted fixing handling 2', ['price-put', [93.24, 117.39, 94.36, 88.27, None], 105, 96.62], 8.694], ['partial repair probe 1', ['price-put', [114.77, 90.96, 110.13, None, 116.07], 90, 91.76], 0.0], ['partial repair probe 2', ['strike-call', [110.79, 87.87, 85.41, 113.03, None, 93.27], 100, 84.57], 0.0], ['normal control 1', ['price-put', [93.25, 93.38], 110, 115.05], 16.685], ['normal control 2', ['price-call', [101.0, 102.82, 91.23], 90, 82.29], 8.35], ['normal control 3', ['strike-call', [84.17, 113.94, 108.91, 109.85, 112.59, 112.54], 90, 93.23], 0.0], ['normal control 4', ['price-put', [86.22, 80.69, 101.45, 101.34, 86.33, 103.13], 100, 87.56], 6.806667]], [['regression disrupted fixing handling 1', ['price-call', [106.0, 108.3, 96.37, None], 90, 103.03], 11.76], ['regression disrupted fixing handling 2', ['price-call', [99.86, None, 85.17, None, 106.07, 119.67, None, 115.98], 105, 102.54], 0.0], ['partial repair probe 1', ['price-put', [98.13, 107.51, None, 98.65, None], 100, 104.68], 0.0], ['partial repair probe 2', ['strike-call', [None, None, 106.81, 111.64, None, None], 90, 116.42], 7.195], ['normal control 1', ['price-call', [None, None, None, 96.07], 100, 115.84], 0.0], ['normal control 2', ['price-call', [84.48, 87.17, 106.28], 105, 89.71], 0.0], ['normal control 3', ['price-put', [110.16, 105.89, 83.97], 105, 95.8], 4.993333], ['normal control 4', ['price-call', [117.25, 109.64, 94.89, 91.58, 110.73], 105, 84.9], 0.0]], [['regression disrupted fixing handling 1', ['strike-call', [80.95, 115.9, 96.86, None, 91.95, None, None], 105, 102.79], 7.587143], ['regression disrupted fixing handling 2', ['price-call', [None, None, None, 105.25, None, None, 101.32, 112.49], 100, 92.33], 5.66375], ['partial repair probe 1', ['strike-call', [None, 86.49, 95.99, None, 98.83, None, 102.22, None], 105, 119.83], 23.9475], ['partial repair probe 2', ['strike-call', [None, 113.88], 100, 91.48], 0.0], ['normal control 1', ['price-call', [108.16, 89.04, None, 118.06, 104.39, None], 110, 107.4], 0.0], ['normal control 2', ['price-call', [117.04, 101.03, 116.99], 110, 86.66], 1.686667], ['normal control 3', ['strike-call', [109.16, 113.24, 117.9], 105, 84.08], 0.0], ['normal control 4', ['price-call', [113.22, 83.42, 84.09, 87.55, 101.17, 82.4, 102.33, None], 100, 105.59], 0.0]], [['regression disrupted fixing handling 1', ['price-put', [None, 80.26, 110.32, 91.41, 93.3, 83.63, None, None], 100, 96.26], 11.695], ['regression disrupted fixing handling 2', ['strike-call', [80.07, None, 84.32, None, None, 101.78, 117.54, None], 105, 101.59], 7.845], ['partial repair probe 1', ['strike-call', [None, 90.87, 88.7], 90, 81.72], 0.0], ['partial repair probe 2', ['strike-call', [None, 111.73, None, 100.17, 92.24], 105, 87.14], 0.0], ['normal control 1', ['price-call', [100.0, None], 100, 94.42], 0.0], ['normal control 2', ['price-call', [99.74, 116.93], 105, 95.76], 3.335], ['normal control 3', ['price-call', [114.28, 88.93], 105, 88.52], 0.0], ['normal control 4', ['price-call', [118.94, 103.57, None, 86.07, 107.68, None, 98.85], 110, 98.85], 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 disrupted fixing handling 1 | 20.086667 | 20.35125 | Failed |
| regression disrupted fixing handling 2 | 9.34 | 15.28 | Failed |
| partial repair probe 1 | 7.04 | 7.04 | Passed |
| partial repair probe 2 | 6.0 | 6.0 | Passed |
| normal control 1 | 0.0 | 0.0 | Passed |
| normal control 2 | 0.0 | 0.0 | Passed |
| normal control 3 | 2.073333 | 2.073333 | Passed |
| normal control 4 | 0.0 | 0.0 | Passed |
SHA-256 / c851637daa720d17ee04ba3e8fdaf1ec06c5953e1475732e55b80ae17b843160
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(kind, fixings, strike, final):
vals = list(fixings)
filled = []
for i, v in enumerate(vals):
if v is None:
prev = [x for x in filled if x is not None]
later = [x for x in vals[i + 1:] if x is not None]
v = prev[-1] if prev else later[0]
filled.append(v)
avg = sum(v or 0 for v in fixings) / len(fixings)
if kind == 'price-call':
pay = max(avg - strike, 0.0)
elif kind == 'price-put':
pay = max(strike - avg, 0.0)
else:
pay = max(final - avg, 0.0)
return round(pay, 6)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression disrupted fixing handling 1', ['strike-call', [None, 87.52, 112.04, 81.76, 108.63, 98.66, 109.85, None], 110, 119.83], 20.35125], ['regression disrupted fixing handling 2', ['price-call', [None, 117.16, 81.52], 90, 95.95], 15.28], ['partial repair probe 1', ['price-put', [None, 92.96], 100, 104.63], 7.04], ['partial repair probe 2', ['price-call', [None, 111.0], 105, 107.34], 6.0], ['normal control 1', ['price-call', [107.13, None, None, 105.03, None, 100.25, None], 110, 104.13], 0.0], ['normal control 2', ['price-call', [104.5, 99.92, 114.23, 95.28], 105, 89.1], 0.0], ['normal control 3', ['price-put', [114.44, 99.53, 94.81], 105, 117.35], 2.073333], ['normal control 4', ['price-call', [90.6, None, 99.94, 92.36, 97.01, 110.32, 105.44, 114.87], 105, 99.53], 0.0]], [['regression disrupted fixing handling 1', ['price-put', [111.81, 89.43, 91.67, None], 100, 119.46], 3.855], ['regression disrupted fixing handling 2', ['price-put', [93.24, 117.39, 94.36, 88.27, None], 105, 96.62], 8.694], ['partial repair probe 1', ['price-put', [114.77, 90.96, 110.13, None, 116.07], 90, 91.76], 0.0], ['partial repair probe 2', ['strike-call', [110.79, 87.87, 85.41, 113.03, None, 93.27], 100, 84.57], 0.0], ['normal control 1', ['price-put', [93.25, 93.38], 110, 115.05], 16.685], ['normal control 2', ['price-call', [101.0, 102.82, 91.23], 90, 82.29], 8.35], ['normal control 3', ['strike-call', [84.17, 113.94, 108.91, 109.85, 112.59, 112.54], 90, 93.23], 0.0], ['normal control 4', ['price-put', [86.22, 80.69, 101.45, 101.34, 86.33, 103.13], 100, 87.56], 6.806667]], [['regression disrupted fixing handling 1', ['price-call', [106.0, 108.3, 96.37, None], 90, 103.03], 11.76], ['regression disrupted fixing handling 2', ['price-call', [99.86, None, 85.17, None, 106.07, 119.67, None, 115.98], 105, 102.54], 0.0], ['partial repair probe 1', ['price-put', [98.13, 107.51, None, 98.65, None], 100, 104.68], 0.0], ['partial repair probe 2', ['strike-call', [None, None, 106.81, 111.64, None, None], 90, 116.42], 7.195], ['normal control 1', ['price-call', [None, None, None, 96.07], 100, 115.84], 0.0], ['normal control 2', ['price-call', [84.48, 87.17, 106.28], 105, 89.71], 0.0], ['normal control 3', ['price-put', [110.16, 105.89, 83.97], 105, 95.8], 4.993333], ['normal control 4', ['price-call', [117.25, 109.64, 94.89, 91.58, 110.73], 105, 84.9], 0.0]], [['regression disrupted fixing handling 1', ['strike-call', [80.95, 115.9, 96.86, None, 91.95, None, None], 105, 102.79], 7.587143], ['regression disrupted fixing handling 2', ['price-call', [None, None, None, 105.25, None, None, 101.32, 112.49], 100, 92.33], 5.66375], ['partial repair probe 1', ['strike-call', [None, 86.49, 95.99, None, 98.83, None, 102.22, None], 105, 119.83], 23.9475], ['partial repair probe 2', ['strike-call', [None, 113.88], 100, 91.48], 0.0], ['normal control 1', ['price-call', [108.16, 89.04, None, 118.06, 104.39, None], 110, 107.4], 0.0], ['normal control 2', ['price-call', [117.04, 101.03, 116.99], 110, 86.66], 1.686667], ['normal control 3', ['strike-call', [109.16, 113.24, 117.9], 105, 84.08], 0.0], ['normal control 4', ['price-call', [113.22, 83.42, 84.09, 87.55, 101.17, 82.4, 102.33, None], 100, 105.59], 0.0]], [['regression disrupted fixing handling 1', ['price-put', [None, 80.26, 110.32, 91.41, 93.3, 83.63, None, None], 100, 96.26], 11.695], ['regression disrupted fixing handling 2', ['strike-call', [80.07, None, 84.32, None, None, 101.78, 117.54, None], 105, 101.59], 7.845], ['partial repair probe 1', ['strike-call', [None, 90.87, 88.7], 90, 81.72], 0.0], ['partial repair probe 2', ['strike-call', [None, 111.73, None, 100.17, 92.24], 105, 87.14], 0.0], ['normal control 1', ['price-call', [100.0, None], 100, 94.42], 0.0], ['normal control 2', ['price-call', [99.74, 116.93], 105, 95.76], 3.335], ['normal control 3', ['price-call', [114.28, 88.93], 105, 88.52], 0.0], ['normal control 4', ['price-call', [118.94, 103.57, None, 86.07, 107.68, None, 98.85], 110, 98.85], 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 disrupted fixing handling 1 | 45.0225 | 20.35125 | Failed |
| regression disrupted fixing handling 2 | 0.0 | 15.28 | Failed |
| partial repair probe 1 | 53.52 | 7.04 | Failed |
| partial repair probe 2 | 0.0 | 6.0 | Failed |
| normal control 1 | 0.0 | 0.0 | Passed |
| normal control 2 | 0.0 | 0.0 | Passed |
| normal control 3 | 2.073333 | 2.073333 | Passed |
| normal control 4 | 0.0 | 0.0 | Passed |
SHA-256 / deff69521fd891ddbb5acd03c9d855b8ce9e1fec85cfdb95920cb679e1cb53b7
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(kind, fixings, strike, final):
vals = list(fixings)
filled = []
for i, v in enumerate(vals):
if v is None:
prev = [x for x in filled if x is not None]
later = [x for x in vals[i + 1:] if x is not None]
v = prev[-1] if prev else later[0]
filled.append(v)
avg = sum(filled) / len(filled)
if kind == 'price-call':
pay = max(avg - strike, 0.0)
elif kind == 'price-put':
pay = max(strike - avg, 0.0)
else:
pay = max(final - avg, 0.0)
return round(pay, 6)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression disrupted fixing handling 1', ['strike-call', [None, 87.52, 112.04, 81.76, 108.63, 98.66, 109.85, None], 110, 119.83], 20.35125], ['regression disrupted fixing handling 2', ['price-call', [None, 117.16, 81.52], 90, 95.95], 15.28], ['partial repair probe 1', ['price-put', [None, 92.96], 100, 104.63], 7.04], ['partial repair probe 2', ['price-call', [None, 111.0], 105, 107.34], 6.0], ['normal control 1', ['price-call', [107.13, None, None, 105.03, None, 100.25, None], 110, 104.13], 0.0], ['normal control 2', ['price-call', [104.5, 99.92, 114.23, 95.28], 105, 89.1], 0.0], ['normal control 3', ['price-put', [114.44, 99.53, 94.81], 105, 117.35], 2.073333], ['normal control 4', ['price-call', [90.6, None, 99.94, 92.36, 97.01, 110.32, 105.44, 114.87], 105, 99.53], 0.0]], [['regression disrupted fixing handling 1', ['price-put', [111.81, 89.43, 91.67, None], 100, 119.46], 3.855], ['regression disrupted fixing handling 2', ['price-put', [93.24, 117.39, 94.36, 88.27, None], 105, 96.62], 8.694], ['partial repair probe 1', ['price-put', [114.77, 90.96, 110.13, None, 116.07], 90, 91.76], 0.0], ['partial repair probe 2', ['strike-call', [110.79, 87.87, 85.41, 113.03, None, 93.27], 100, 84.57], 0.0], ['normal control 1', ['price-put', [93.25, 93.38], 110, 115.05], 16.685], ['normal control 2', ['price-call', [101.0, 102.82, 91.23], 90, 82.29], 8.35], ['normal control 3', ['strike-call', [84.17, 113.94, 108.91, 109.85, 112.59, 112.54], 90, 93.23], 0.0], ['normal control 4', ['price-put', [86.22, 80.69, 101.45, 101.34, 86.33, 103.13], 100, 87.56], 6.806667]], [['regression disrupted fixing handling 1', ['price-call', [106.0, 108.3, 96.37, None], 90, 103.03], 11.76], ['regression disrupted fixing handling 2', ['price-call', [99.86, None, 85.17, None, 106.07, 119.67, None, 115.98], 105, 102.54], 0.0], ['partial repair probe 1', ['price-put', [98.13, 107.51, None, 98.65, None], 100, 104.68], 0.0], ['partial repair probe 2', ['strike-call', [None, None, 106.81, 111.64, None, None], 90, 116.42], 7.195], ['normal control 1', ['price-call', [None, None, None, 96.07], 100, 115.84], 0.0], ['normal control 2', ['price-call', [84.48, 87.17, 106.28], 105, 89.71], 0.0], ['normal control 3', ['price-put', [110.16, 105.89, 83.97], 105, 95.8], 4.993333], ['normal control 4', ['price-call', [117.25, 109.64, 94.89, 91.58, 110.73], 105, 84.9], 0.0]], [['regression disrupted fixing handling 1', ['strike-call', [80.95, 115.9, 96.86, None, 91.95, None, None], 105, 102.79], 7.587143], ['regression disrupted fixing handling 2', ['price-call', [None, None, None, 105.25, None, None, 101.32, 112.49], 100, 92.33], 5.66375], ['partial repair probe 1', ['strike-call', [None, 86.49, 95.99, None, 98.83, None, 102.22, None], 105, 119.83], 23.9475], ['partial repair probe 2', ['strike-call', [None, 113.88], 100, 91.48], 0.0], ['normal control 1', ['price-call', [108.16, 89.04, None, 118.06, 104.39, None], 110, 107.4], 0.0], ['normal control 2', ['price-call', [117.04, 101.03, 116.99], 110, 86.66], 1.686667], ['normal control 3', ['strike-call', [109.16, 113.24, 117.9], 105, 84.08], 0.0], ['normal control 4', ['price-call', [113.22, 83.42, 84.09, 87.55, 101.17, 82.4, 102.33, None], 100, 105.59], 0.0]], [['regression disrupted fixing handling 1', ['price-put', [None, 80.26, 110.32, 91.41, 93.3, 83.63, None, None], 100, 96.26], 11.695], ['regression disrupted fixing handling 2', ['strike-call', [80.07, None, 84.32, None, None, 101.78, 117.54, None], 105, 101.59], 7.845], ['partial repair probe 1', ['strike-call', [None, 90.87, 88.7], 90, 81.72], 0.0], ['partial repair probe 2', ['strike-call', [None, 111.73, None, 100.17, 92.24], 105, 87.14], 0.0], ['normal control 1', ['price-call', [100.0, None], 100, 94.42], 0.0], ['normal control 2', ['price-call', [99.74, 116.93], 105, 95.76], 3.335], ['normal control 3', ['price-call', [114.28, 88.93], 105, 88.52], 0.0], ['normal control 4', ['price-call', [118.94, 103.57, None, 86.07, 107.68, None, 98.85], 110, 98.85], 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 disrupted fixing handling 1 | 20.35125 | 20.35125 | Passed |
| regression disrupted fixing handling 2 | 15.28 | 15.28 | Passed |
| partial repair probe 1 | 7.04 | 7.04 | Passed |
| partial repair probe 2 | 6.0 | 6.0 | Passed |
| normal control 1 | 0.0 | 0.0 | Passed |
| normal control 2 | 0.0 | 0.0 | Passed |
| normal control 3 | 2.073333 | 2.073333 | Passed |
| normal control 4 | 0.0 | 0.0 | Passed |
SHA-256 / e5cbe48221982620bd1454f5b294eea71a4f7e34a51a5121589c275615a24772
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:55.056235+00:00.
Case digest / 66c041f6a624824d5d79a62270e3567d775b8a384f2674c970288b4292ccdcbc