FAILURE MAP
← Case archive

FA-61701 / Options payoff and settlement / Open access

Cliquet payoff with local caps and a global floor: returns are measured from the initial level · case 01

Later periods compound earlier moves into their returns.

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

ROOT CAUSE

Each return divides by the first reset level instead of the previous one.

VERIFIED REPAIR

Measure each period against the previous reset.

Unsuccessful approach: Dividing the price change by the initial level still uses the wrong base.

Case contract

Inputs reset prices (first is the initial level), local cap, local floor, global floor and notional. Each period return is S_i/S_{i-1} - 1 clipped to [local floor, local cap]. Payoff = notional * max(global floor, sum of clipped returns), in exact fractions, rounded 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
from fractions import Fraction
N = 1
observations = []
def solve(resets, cap, floor, global_floor, notional):
    px = [Fraction(str(v)) for v in resets]
    c = Fraction(str(cap))
    f = Fraction(str(floor))
    total = Fraction(0)
    for prev, cur in zip(px, px[1:]):
        r = cur / px[0] - 1
        total += min(max(r, f), c)
    pay = notional * max(Fraction(str(global_floor)), total)
    return float(round(pay, 6))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression period return base 1', [[100.0, 107.0, 98.44, 90.56, 83.32, 95.82], 0.08, 0.0, 0.01, 1000], 150.0], ['regression period return base 2', [[100.0, 92.0, 78.2, 80.55, 92.63, 95.41, 109.72], 0.08, -0.05, 0.0, 1000000], 120063.026098], ['partial repair probe 1', [[100.0, 98.0, 96.04, 110.45], 0.05, -0.02, 0.0, 1000000], 10000.0], ['normal control 1', [[100.0, 98.0, 100.94, 98.92], 0.08, -0.05, 0.0, 1000000], 0.0], ['normal control 2', [[100.0, 85.0], 0.05, 0.0, 0.02, 1000], 20.0], ['normal control 3', [[100.0, 92.0, 94.76], 0.05, -0.05, 0.0, 1000], 0.0], ['normal control 4', [[100.0, 98.0], 0.08, -0.02, 0.01, 1000], 10.0], ['normal control 5', [[100.0, 85.0], 0.08, -0.02, 0.02, 1000], 20.0]], [['regression period return base 1', [[100.0, 107.0, 104.86, 120.59, 138.68, 138.68], 0.08, -0.05, 0.0, 1000], 210.0], ['regression period return base 2', [[100.0, 98.0, 98.0, 100.94, 92.86, 78.93, 84.46], 0.08, -0.02, 0.0, 1000000], 40062.080324], ['partial repair probe 1', [[100.0, 103.0, 106.09, 103.97, 119.57], 0.05, -0.02, 0.02, 1000], 90.016967], ['partial repair probe 2', [[100.0, 107.0, 110.21, 113.52], 0.08, -0.05, 0.01, 1000], 130.033572], ['normal control 1', [[100.0, 115.0], 0.05, -0.02, 0.0, 1000], 50.0], ['normal control 2', [[100.0, 115.0, 123.05], 0.05, 0.0, 0.01, 1000000], 100000.0], ['normal control 3', [[100.0, 100.0, 92.0, 90.16], 0.05, -0.02, 0.02, 1000], 20.0], ['normal control 4', [[100.0, 92.0, 92.0, 78.2, 66.47, 61.15, 65.43], 0.05, -0.05, 0.02, 1000000], 20000.0]], [['regression period return base 1', [[100.0, 98.0, 90.16, 96.47, 110.94, 94.3], 0.05, 0.0, 0.0, 1000], 100.0], ['regression period return base 2', [[100.0, 85.0, 97.75, 100.68, 115.78, 98.41], 0.05, -0.05, 0.02, 1000000], 29974.424552], ['partial repair probe 1', [[100.0, 92.0, 98.44, 96.47], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 1', [[100.0, 98.0, 90.16, 82.95], 0.08, 0.0, 0.0, 1000000], 0.0], ['normal control 2', [[100.0, 103.0, 110.21], 0.05, -0.05, 0.01, 1000], 80.0], ['normal control 3', [[100.0, 98.0, 90.16, 103.68, 95.39], 0.08, -0.05, 0.0, 1000000], 0.0], ['normal control 4', [[100.0, 92.0, 84.64, 82.95, 81.29, 74.79], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 5', [[100.0, 100.0, 100.0], 0.08, -0.02, 0.0, 1000000], 0.0]], [['regression period return base 1', [[100.0, 103.0, 110.21, 126.74, 145.75], 0.08, -0.02, 0.0, 1000000], 260000.0], ['regression period return base 2', [[100.0, 103.0, 103.0, 118.45], 0.05, 0.0, 0.0, 1000], 80.0], ['partial repair probe 1', [[100.0, 103.0, 103.0, 106.09, 90.18, 76.65, 82.02], 0.05, -0.05, 0.01, 1000], 10.0], ['normal control 1', [[100.0, 85.0, 97.75], 0.05, -0.05, 0.0, 1000], 0.0], ['normal control 2', [[100.0, 98.0, 83.3, 76.64], 0.08, 0.0, 0.02, 1000000], 20000.0], ['normal control 3', [[100.0, 98.0, 112.7, 95.8], 0.05, 0.0, 0.01, 1000000], 50000.0], ['normal control 4', [[100.0, 85.0, 72.25, 66.47, 56.5, 56.5], 0.08, -0.05, 0.02, 1000000], 20000.0], ['normal control 5', [[100.0, 100.0, 92.0], 0.05, -0.02, 0.01, 1000000], 10000.0]], [['regression period return base 1', [[100.0, 100.0, 107.0, 123.05, 104.59], 0.08, -0.02, 0.02, 1000], 130.0], ['regression period return base 2', [[100.0, 100.0, 85.0, 87.55, 90.18], 0.05, 0.0, 0.02, 1000], 60.039977], ['partial repair probe 1', [[100.0, 98.0, 112.7, 110.45, 113.76, 117.17], 0.08, -0.02, 0.02, 1000000], 99979.19069], ['partial repair probe 2', [[100.0, 103.0, 110.21, 93.68], 0.08, 0.0, 0.02, 1000000], 100000.0], ['normal control 1', [[100.0, 107.0], 0.08, -0.02, 0.0, 1000], 70.0], ['normal control 2', [[100.0, 98.0, 98.0], 0.05, -0.05, 0.0, 1000], 0.0], ['normal control 3', [[100.0, 85.0], 0.08, -0.02, 0.01, 1000000], 10000.0], ['normal control 4', [[100.0, 92.0, 78.2, 66.47], 0.05, 0.0, 0.01, 1000000], 10000.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 period return base 170.0150.0Failed
regression period return base 20.0120063.026098Failed
partial repair probe 110000.010000.0Passed
normal control 10.00.0Passed
normal control 220.020.0Passed
normal control 30.00.0Passed
normal control 410.010.0Passed
normal control 520.020.0Passed

SHA-256 / 887f19f7319d45a47259d08785f8f7b42fe1b2c2ab6b5894aafc67b276abe0bf

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(resets, cap, floor, global_floor, notional):
    px = [Fraction(str(v)) for v in resets]
    c = Fraction(str(cap))
    f = Fraction(str(floor))
    total = Fraction(0)
    for prev, cur in zip(px, px[1:]):
        r = (cur - prev) / px[0]
        total += min(max(r, f), c)
    pay = notional * max(Fraction(str(global_floor)), total)
    return float(round(pay, 6))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression period return base 1', [[100.0, 107.0, 98.44, 90.56, 83.32, 95.82], 0.08, 0.0, 0.01, 1000], 150.0], ['regression period return base 2', [[100.0, 92.0, 78.2, 80.55, 92.63, 95.41, 109.72], 0.08, -0.05, 0.0, 1000000], 120063.026098], ['partial repair probe 1', [[100.0, 98.0, 96.04, 110.45], 0.05, -0.02, 0.0, 1000000], 10000.0], ['normal control 1', [[100.0, 98.0, 100.94, 98.92], 0.08, -0.05, 0.0, 1000000], 0.0], ['normal control 2', [[100.0, 85.0], 0.05, 0.0, 0.02, 1000], 20.0], ['normal control 3', [[100.0, 92.0, 94.76], 0.05, -0.05, 0.0, 1000], 0.0], ['normal control 4', [[100.0, 98.0], 0.08, -0.02, 0.01, 1000], 10.0], ['normal control 5', [[100.0, 85.0], 0.08, -0.02, 0.02, 1000], 20.0]], [['regression period return base 1', [[100.0, 107.0, 104.86, 120.59, 138.68, 138.68], 0.08, -0.05, 0.0, 1000], 210.0], ['regression period return base 2', [[100.0, 98.0, 98.0, 100.94, 92.86, 78.93, 84.46], 0.08, -0.02, 0.0, 1000000], 40062.080324], ['partial repair probe 1', [[100.0, 103.0, 106.09, 103.97, 119.57], 0.05, -0.02, 0.02, 1000], 90.016967], ['partial repair probe 2', [[100.0, 107.0, 110.21, 113.52], 0.08, -0.05, 0.01, 1000], 130.033572], ['normal control 1', [[100.0, 115.0], 0.05, -0.02, 0.0, 1000], 50.0], ['normal control 2', [[100.0, 115.0, 123.05], 0.05, 0.0, 0.01, 1000000], 100000.0], ['normal control 3', [[100.0, 100.0, 92.0, 90.16], 0.05, -0.02, 0.02, 1000], 20.0], ['normal control 4', [[100.0, 92.0, 92.0, 78.2, 66.47, 61.15, 65.43], 0.05, -0.05, 0.02, 1000000], 20000.0]], [['regression period return base 1', [[100.0, 98.0, 90.16, 96.47, 110.94, 94.3], 0.05, 0.0, 0.0, 1000], 100.0], ['regression period return base 2', [[100.0, 85.0, 97.75, 100.68, 115.78, 98.41], 0.05, -0.05, 0.02, 1000000], 29974.424552], ['partial repair probe 1', [[100.0, 92.0, 98.44, 96.47], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 1', [[100.0, 98.0, 90.16, 82.95], 0.08, 0.0, 0.0, 1000000], 0.0], ['normal control 2', [[100.0, 103.0, 110.21], 0.05, -0.05, 0.01, 1000], 80.0], ['normal control 3', [[100.0, 98.0, 90.16, 103.68, 95.39], 0.08, -0.05, 0.0, 1000000], 0.0], ['normal control 4', [[100.0, 92.0, 84.64, 82.95, 81.29, 74.79], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 5', [[100.0, 100.0, 100.0], 0.08, -0.02, 0.0, 1000000], 0.0]], [['regression period return base 1', [[100.0, 103.0, 110.21, 126.74, 145.75], 0.08, -0.02, 0.0, 1000000], 260000.0], ['regression period return base 2', [[100.0, 103.0, 103.0, 118.45], 0.05, 0.0, 0.0, 1000], 80.0], ['partial repair probe 1', [[100.0, 103.0, 103.0, 106.09, 90.18, 76.65, 82.02], 0.05, -0.05, 0.01, 1000], 10.0], ['normal control 1', [[100.0, 85.0, 97.75], 0.05, -0.05, 0.0, 1000], 0.0], ['normal control 2', [[100.0, 98.0, 83.3, 76.64], 0.08, 0.0, 0.02, 1000000], 20000.0], ['normal control 3', [[100.0, 98.0, 112.7, 95.8], 0.05, 0.0, 0.01, 1000000], 50000.0], ['normal control 4', [[100.0, 85.0, 72.25, 66.47, 56.5, 56.5], 0.08, -0.05, 0.02, 1000000], 20000.0], ['normal control 5', [[100.0, 100.0, 92.0], 0.05, -0.02, 0.01, 1000000], 10000.0]], [['regression period return base 1', [[100.0, 100.0, 107.0, 123.05, 104.59], 0.08, -0.02, 0.02, 1000], 130.0], ['regression period return base 2', [[100.0, 100.0, 85.0, 87.55, 90.18], 0.05, 0.0, 0.02, 1000], 60.039977], ['partial repair probe 1', [[100.0, 98.0, 112.7, 110.45, 113.76, 117.17], 0.08, -0.02, 0.02, 1000000], 99979.19069], ['partial repair probe 2', [[100.0, 103.0, 110.21, 93.68], 0.08, 0.0, 0.02, 1000000], 100000.0], ['normal control 1', [[100.0, 107.0], 0.08, -0.02, 0.0, 1000], 70.0], ['normal control 2', [[100.0, 98.0, 98.0], 0.05, -0.05, 0.0, 1000], 0.0], ['normal control 3', [[100.0, 85.0], 0.08, -0.02, 0.01, 1000000], 10000.0], ['normal control 4', [[100.0, 92.0, 78.2, 66.47], 0.05, 0.0, 0.01, 1000000], 10000.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 period return base 1150.0150.0Passed
regression period return base 2111300.0120063.026098Failed
partial repair probe 110400.010000.0Failed
normal control 10.00.0Passed
normal control 220.020.0Passed
normal control 30.00.0Passed
normal control 410.010.0Passed
normal control 520.020.0Passed

SHA-256 / 92cfa4f760e73f718c3a63b32c71dfc297b143ed61bad07a8e9fd0eb757221a3

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(resets, cap, floor, global_floor, notional):
    px = [Fraction(str(v)) for v in resets]
    c = Fraction(str(cap))
    f = Fraction(str(floor))
    total = Fraction(0)
    for prev, cur in zip(px, px[1:]):
        r = cur / prev - 1
        total += min(max(r, f), c)
    pay = notional * max(Fraction(str(global_floor)), total)
    return float(round(pay, 6))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression period return base 1', [[100.0, 107.0, 98.44, 90.56, 83.32, 95.82], 0.08, 0.0, 0.01, 1000], 150.0], ['regression period return base 2', [[100.0, 92.0, 78.2, 80.55, 92.63, 95.41, 109.72], 0.08, -0.05, 0.0, 1000000], 120063.026098], ['partial repair probe 1', [[100.0, 98.0, 96.04, 110.45], 0.05, -0.02, 0.0, 1000000], 10000.0], ['normal control 1', [[100.0, 98.0, 100.94, 98.92], 0.08, -0.05, 0.0, 1000000], 0.0], ['normal control 2', [[100.0, 85.0], 0.05, 0.0, 0.02, 1000], 20.0], ['normal control 3', [[100.0, 92.0, 94.76], 0.05, -0.05, 0.0, 1000], 0.0], ['normal control 4', [[100.0, 98.0], 0.08, -0.02, 0.01, 1000], 10.0], ['normal control 5', [[100.0, 85.0], 0.08, -0.02, 0.02, 1000], 20.0]], [['regression period return base 1', [[100.0, 107.0, 104.86, 120.59, 138.68, 138.68], 0.08, -0.05, 0.0, 1000], 210.0], ['regression period return base 2', [[100.0, 98.0, 98.0, 100.94, 92.86, 78.93, 84.46], 0.08, -0.02, 0.0, 1000000], 40062.080324], ['partial repair probe 1', [[100.0, 103.0, 106.09, 103.97, 119.57], 0.05, -0.02, 0.02, 1000], 90.016967], ['partial repair probe 2', [[100.0, 107.0, 110.21, 113.52], 0.08, -0.05, 0.01, 1000], 130.033572], ['normal control 1', [[100.0, 115.0], 0.05, -0.02, 0.0, 1000], 50.0], ['normal control 2', [[100.0, 115.0, 123.05], 0.05, 0.0, 0.01, 1000000], 100000.0], ['normal control 3', [[100.0, 100.0, 92.0, 90.16], 0.05, -0.02, 0.02, 1000], 20.0], ['normal control 4', [[100.0, 92.0, 92.0, 78.2, 66.47, 61.15, 65.43], 0.05, -0.05, 0.02, 1000000], 20000.0]], [['regression period return base 1', [[100.0, 98.0, 90.16, 96.47, 110.94, 94.3], 0.05, 0.0, 0.0, 1000], 100.0], ['regression period return base 2', [[100.0, 85.0, 97.75, 100.68, 115.78, 98.41], 0.05, -0.05, 0.02, 1000000], 29974.424552], ['partial repair probe 1', [[100.0, 92.0, 98.44, 96.47], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 1', [[100.0, 98.0, 90.16, 82.95], 0.08, 0.0, 0.0, 1000000], 0.0], ['normal control 2', [[100.0, 103.0, 110.21], 0.05, -0.05, 0.01, 1000], 80.0], ['normal control 3', [[100.0, 98.0, 90.16, 103.68, 95.39], 0.08, -0.05, 0.0, 1000000], 0.0], ['normal control 4', [[100.0, 92.0, 84.64, 82.95, 81.29, 74.79], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 5', [[100.0, 100.0, 100.0], 0.08, -0.02, 0.0, 1000000], 0.0]], [['regression period return base 1', [[100.0, 103.0, 110.21, 126.74, 145.75], 0.08, -0.02, 0.0, 1000000], 260000.0], ['regression period return base 2', [[100.0, 103.0, 103.0, 118.45], 0.05, 0.0, 0.0, 1000], 80.0], ['partial repair probe 1', [[100.0, 103.0, 103.0, 106.09, 90.18, 76.65, 82.02], 0.05, -0.05, 0.01, 1000], 10.0], ['normal control 1', [[100.0, 85.0, 97.75], 0.05, -0.05, 0.0, 1000], 0.0], ['normal control 2', [[100.0, 98.0, 83.3, 76.64], 0.08, 0.0, 0.02, 1000000], 20000.0], ['normal control 3', [[100.0, 98.0, 112.7, 95.8], 0.05, 0.0, 0.01, 1000000], 50000.0], ['normal control 4', [[100.0, 85.0, 72.25, 66.47, 56.5, 56.5], 0.08, -0.05, 0.02, 1000000], 20000.0], ['normal control 5', [[100.0, 100.0, 92.0], 0.05, -0.02, 0.01, 1000000], 10000.0]], [['regression period return base 1', [[100.0, 100.0, 107.0, 123.05, 104.59], 0.08, -0.02, 0.02, 1000], 130.0], ['regression period return base 2', [[100.0, 100.0, 85.0, 87.55, 90.18], 0.05, 0.0, 0.02, 1000], 60.039977], ['partial repair probe 1', [[100.0, 98.0, 112.7, 110.45, 113.76, 117.17], 0.08, -0.02, 0.02, 1000000], 99979.19069], ['partial repair probe 2', [[100.0, 103.0, 110.21, 93.68], 0.08, 0.0, 0.02, 1000000], 100000.0], ['normal control 1', [[100.0, 107.0], 0.08, -0.02, 0.0, 1000], 70.0], ['normal control 2', [[100.0, 98.0, 98.0], 0.05, -0.05, 0.0, 1000], 0.0], ['normal control 3', [[100.0, 85.0], 0.08, -0.02, 0.01, 1000000], 10000.0], ['normal control 4', [[100.0, 92.0, 78.2, 66.47], 0.05, 0.0, 0.01, 1000000], 10000.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 period return base 1150.0150.0Passed
regression period return base 2120063.026098120063.026098Passed
partial repair probe 110000.010000.0Passed
normal control 10.00.0Passed
normal control 220.020.0Passed
normal control 30.00.0Passed
normal control 410.010.0Passed
normal control 520.020.0Passed

SHA-256 / 80dea7b8b7b31372f3e2e7854835fa0c594160df3df84eb19aade397f85f8cde

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

Case digest / 386d14bbed8039206c9ecfa5ff31238e6c246f138d36c08e9f58aa6884af43e8