FA-61456 / Options payoff and settlement / Open access
Discretely monitored barrier option payoff: barrier direction is inferred from the option type · case 01
Up-and-out puts and down-and-in calls monitor the wrong side of the barrier.
ROOT CAUSE
The direction flag is derived from call/put instead of the up/down prefix.
THE FAILURE
The direction flag is derived from call/put instead of the up/down prefix.
Unsuccessful approach: Inferring direction from the barrier relative to the initial price fails when the barrier is already breached at inception.
Case contract
Inputs kind (up/down, in/out, call/put), observed path including initial and final price, strike, barrier and rebate. The barrier is hit if any observation is >= barrier (up) or <= barrier (down). Knock-out: rebate if hit else vanilla on the final price. Knock-in: vanilla if hit else rebate. 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, path, strike, barrier, rebate):
up = kind.endswith('call')
hit = any(p >= barrier for p in path) if up else any(p <= barrier for p in path)
final = path[-1]
vanilla = max(final - strike, 0) if kind.endswith('call') else max(strike - final, 0)
if '-out-' in kind:
pay = rebate if hit else vanilla
else:
pay = vanilla if hit else rebate
return round(pay, 6)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression barrier direction 1', ['down-in-call', [100.0, 110.0, 121.0, 112.53, 106.9, 96.21, 101.02, 109.1], 100, 90.0, 0.0], 0.0], ['regression barrier direction 2', ['up-out-put', [100.0, 100.0, 93.0, 93.0, 88.35, 95.42, 100.19], 105, 120.0, 1.5], 4.81], ['partial repair probe 1', ['up-in-call', [100.0, 100.0, 100.0], 105, 95.0, 3.0], 0], ['partial repair probe 2', ['up-out-call', [100.0, 110.0, 102.3, 112.53, 112.53, 118.16, 124.07, 117.87], 100, 95.0, 0.0], 0.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['down-out-put', [100.0, 93.0, 83.7], 100, 85.0, 1.5], 1.5], ['normal control 2', ['down-out-put', [100.0, 93.0, 93.0, 83.7, 92.07, 85.63, 81.35, 73.22], 105, 90.0, 3.0], 3.0]], [['regression barrier direction 1', ['up-out-put', [100.0, 93.0, 93.0, 97.65, 107.42, 107.42], 100, 120.0, 1.5], 0], ['regression barrier direction 2', ['down-in-call', [100.0, 108.0, 116.64, 125.97, 132.27, 123.01, 129.16, 116.24], 100, 90.0, 0.0], 0.0], ['partial repair probe 1', ['up-in-call', [100.0, 108.0, 116.64, 122.47, 113.9], 105, 95.0, 1.5], 8.9], ['partial repair probe 2', ['up-out-call', [100.0, 108.0, 116.64, 128.3, 134.72, 125.29, 131.55], 100, 95.0, 3.0], 3.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['up-in-call', [100.0, 100.0, 90.0, 81.0, 89.1, 84.64, 76.18, 82.27], 95, 115.0, 3.0], 3.0], ['normal control 2', ['down-out-put', [100.0, 100.0, 108.0, 118.8, 128.3], 100, 90.0, 1.5], 0]], [['regression barrier direction 1', ['down-in-call', [100.0, 93.0, 97.65, 107.42, 118.16, 118.16, 127.61], 100, 90.0, 3.0], 3.0], ['regression barrier direction 2', ['up-out-put', [100.0, 93.0, 93.0, 88.35, 95.42, 88.74], 100, 110.0, 0.0], 11.26], ['partial repair probe 1', ['down-out-put', [100.0, 93.0, 102.3], 100, 105.0, 1.5], 1.5], ['partial repair probe 2', ['down-out-put', [100.0, 90.0, 81.0], 95, 105.0, 1.5], 1.5], ['boundary control 1', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['boundary control 2', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['normal control 1', ['up-out-put', [100.0, 108.0, 97.2], 95, 115.0, 0.0], 0], ['normal control 2', ['up-out-call', [100.0, 95.0, 104.5, 94.05, 101.57, 91.41], 95, 95.0, 3.0], 3.0]], [['regression barrier direction 1', ['up-out-put', [100.0, 100.0, 100.0], 95, 115.0, 3.0], 0], ['regression barrier direction 2', ['up-out-put', [100.0, 100.0, 110.0, 115.5, 103.95, 96.67, 96.67, 91.84], 100, 120.0, 3.0], 8.16], ['partial repair probe 1', ['up-in-call', [100.0, 108.0, 97.2, 106.92, 115.47, 115.47], 100, 95.0, 1.5], 15.47], ['partial repair probe 2', ['up-out-call', [100.0, 110.0, 110.0, 118.8, 106.92, 115.47], 95, 95.0, 0.0], 0.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['down-in-put', [100.0, 100.0, 100.0, 95.0, 102.6, 112.86], 100, 85.0, 3.0], 3.0], ['normal control 2', ['down-out-put', [100.0, 110.0, 99.0, 108.9, 117.61, 129.37], 105, 80.0, 3.0], 0]], [['regression barrier direction 1', ['down-in-call', [100.0, 95.0, 104.5], 95, 85.0, 0.0], 0.0], ['regression barrier direction 2', ['down-in-call', [100.0, 105.0, 110.25, 99.23, 92.28, 96.89, 96.89, 106.58], 100, 90.0, 3.0], 3.0], ['partial repair probe 1', ['up-out-call', [100.0, 110.0, 115.5, 115.5, 121.28, 109.15], 105, 95.0, 3.0], 3.0], ['partial repair probe 2', ['down-in-put', [100.0, 93.0, 88.35, 95.42], 105, 105.0, 0.0], 9.58], ['boundary control 1', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['boundary control 2', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['normal control 1', ['up-out-put', [100.0, 110.0, 115.5, 124.74, 116.01, 104.41, 109.63, 104.15], 105, 115.5, 3.0], 3.0], ['normal control 2', ['up-in-call', [100.0, 108.0, 116.64, 104.98, 113.38, 119.05], 105, 104.98, 1.5], 14.05]]]
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 barrier direction 1 | 9.1 | 0.0 | Failed |
| regression barrier direction 2 | 1.5 | 4.81 | Failed |
| partial repair probe 1 | 0 | 0 | Passed |
| partial repair probe 2 | 0.0 | 0.0 | Passed |
| boundary control 1 | 2.0 | 2.0 | Passed |
| boundary control 2 | 1.0 | 1.0 | Passed |
| normal control 1 | 1.5 | 1.5 | Passed |
| normal control 2 | 3.0 | 3.0 | Passed |
SHA-256 / 9f44ea1a4a9ea7fde27e1951854030aa5ba8f4fb28eca4978240c11fd51dda36
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(kind, path, strike, barrier, rebate):
up = barrier > path[0]
hit = any(p >= barrier for p in path) if up else any(p <= barrier for p in path)
final = path[-1]
vanilla = max(final - strike, 0) if kind.endswith('call') else max(strike - final, 0)
if '-out-' in kind:
pay = rebate if hit else vanilla
else:
pay = vanilla if hit else rebate
return round(pay, 6)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression barrier direction 1', ['down-in-call', [100.0, 110.0, 121.0, 112.53, 106.9, 96.21, 101.02, 109.1], 100, 90.0, 0.0], 0.0], ['regression barrier direction 2', ['up-out-put', [100.0, 100.0, 93.0, 93.0, 88.35, 95.42, 100.19], 105, 120.0, 1.5], 4.81], ['partial repair probe 1', ['up-in-call', [100.0, 100.0, 100.0], 105, 95.0, 3.0], 0], ['partial repair probe 2', ['up-out-call', [100.0, 110.0, 102.3, 112.53, 112.53, 118.16, 124.07, 117.87], 100, 95.0, 0.0], 0.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['down-out-put', [100.0, 93.0, 83.7], 100, 85.0, 1.5], 1.5], ['normal control 2', ['down-out-put', [100.0, 93.0, 93.0, 83.7, 92.07, 85.63, 81.35, 73.22], 105, 90.0, 3.0], 3.0]], [['regression barrier direction 1', ['up-out-put', [100.0, 93.0, 93.0, 97.65, 107.42, 107.42], 100, 120.0, 1.5], 0], ['regression barrier direction 2', ['down-in-call', [100.0, 108.0, 116.64, 125.97, 132.27, 123.01, 129.16, 116.24], 100, 90.0, 0.0], 0.0], ['partial repair probe 1', ['up-in-call', [100.0, 108.0, 116.64, 122.47, 113.9], 105, 95.0, 1.5], 8.9], ['partial repair probe 2', ['up-out-call', [100.0, 108.0, 116.64, 128.3, 134.72, 125.29, 131.55], 100, 95.0, 3.0], 3.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['up-in-call', [100.0, 100.0, 90.0, 81.0, 89.1, 84.64, 76.18, 82.27], 95, 115.0, 3.0], 3.0], ['normal control 2', ['down-out-put', [100.0, 100.0, 108.0, 118.8, 128.3], 100, 90.0, 1.5], 0]], [['regression barrier direction 1', ['down-in-call', [100.0, 93.0, 97.65, 107.42, 118.16, 118.16, 127.61], 100, 90.0, 3.0], 3.0], ['regression barrier direction 2', ['up-out-put', [100.0, 93.0, 93.0, 88.35, 95.42, 88.74], 100, 110.0, 0.0], 11.26], ['partial repair probe 1', ['down-out-put', [100.0, 93.0, 102.3], 100, 105.0, 1.5], 1.5], ['partial repair probe 2', ['down-out-put', [100.0, 90.0, 81.0], 95, 105.0, 1.5], 1.5], ['boundary control 1', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['boundary control 2', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['normal control 1', ['up-out-put', [100.0, 108.0, 97.2], 95, 115.0, 0.0], 0], ['normal control 2', ['up-out-call', [100.0, 95.0, 104.5, 94.05, 101.57, 91.41], 95, 95.0, 3.0], 3.0]], [['regression barrier direction 1', ['up-out-put', [100.0, 100.0, 100.0], 95, 115.0, 3.0], 0], ['regression barrier direction 2', ['up-out-put', [100.0, 100.0, 110.0, 115.5, 103.95, 96.67, 96.67, 91.84], 100, 120.0, 3.0], 8.16], ['partial repair probe 1', ['up-in-call', [100.0, 108.0, 97.2, 106.92, 115.47, 115.47], 100, 95.0, 1.5], 15.47], ['partial repair probe 2', ['up-out-call', [100.0, 110.0, 110.0, 118.8, 106.92, 115.47], 95, 95.0, 0.0], 0.0], ['boundary control 1', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['boundary control 2', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['normal control 1', ['down-in-put', [100.0, 100.0, 100.0, 95.0, 102.6, 112.86], 100, 85.0, 3.0], 3.0], ['normal control 2', ['down-out-put', [100.0, 110.0, 99.0, 108.9, 117.61, 129.37], 105, 80.0, 3.0], 0]], [['regression barrier direction 1', ['down-in-call', [100.0, 95.0, 104.5], 95, 85.0, 0.0], 0.0], ['regression barrier direction 2', ['down-in-call', [100.0, 105.0, 110.25, 99.23, 92.28, 96.89, 96.89, 106.58], 100, 90.0, 3.0], 3.0], ['partial repair probe 1', ['up-out-call', [100.0, 110.0, 115.5, 115.5, 121.28, 109.15], 105, 95.0, 3.0], 3.0], ['partial repair probe 2', ['down-in-put', [100.0, 93.0, 88.35, 95.42], 105, 105.0, 0.0], 9.58], ['boundary control 1', ['down-in-put', [100.0, 95.0], 100, 90.0, 1.0], 1.0], ['boundary control 2', ['up-out-call', [100.0, 110.0, 105.0], 100, 110.0, 2.0], 2.0], ['normal control 1', ['up-out-put', [100.0, 110.0, 115.5, 124.74, 116.01, 104.41, 109.63, 104.15], 105, 115.5, 3.0], 3.0], ['normal control 2', ['up-in-call', [100.0, 108.0, 116.64, 104.98, 113.38, 119.05], 105, 104.98, 1.5], 14.05]]]
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 barrier direction 1 | 0.0 | 0.0 | Passed |
| regression barrier direction 2 | 4.81 | 4.81 | Passed |
| partial repair probe 1 | 3.0 | 0 | Failed |
| partial repair probe 2 | 17.87 | 0.0 | Failed |
| boundary control 1 | 2.0 | 2.0 | Passed |
| boundary control 2 | 1.0 | 1.0 | Passed |
| normal control 1 | 1.5 | 1.5 | Passed |
| normal control 2 | 3.0 | 3.0 | Passed |
SHA-256 / 87732b73612f0f60af7e7ab574881b706f68b23ab53a522937a96922663a4f5e
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:55.495752+00:00.
Case digest / bd401f305a1c085a2a6b7e369465fea98c10354f911e82194be14e03d7ae8908