FAILURE MAP
← Case archive

FA-61706 / Options payoff and settlement / Open access

Cliquet payoff with local caps and a global floor: only the local cap is applied · case 01

Large negative periods are not floored.

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

ROOT CAUSE

The clip applies min(r, cap) without the floor.

VERIFIED REPAIR

Clip each return to both the local floor and cap.

Unsuccessful approach: Clipping the summed return instead of each period changes the payoff.

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 / prev - 1
        total += min(r, 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 local clipping 1', [[100.0, 85.0, 87.55, 100.68], 0.08, 0.0, 0.01, 1000], 110.0], ['regression local clipping 2', [[100.0, 103.0, 103.0, 100.94], 0.08, 0.0, 0.01, 1000], 30.0], ['partial repair probe 1', [[100.0, 115.0, 112.7, 120.59, 124.21], 0.05, -0.05, 0.02, 1000000], 110019.072892], ['partial repair probe 2', [[100.0, 107.0, 114.49], 0.05, -0.05, 0.02, 1000000], 100000.0], ['normal control 1', [[100.0, 92.0, 84.64], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 2', [[100.0, 103.0], 0.05, 0.0, 0.02, 1000000], 30000.0], ['normal control 3', [[100.0, 103.0, 103.0, 106.09, 106.09, 90.18, 76.65], 0.08, -0.05, 0.02, 1000000], 20000.0], ['normal control 4', [[100.0, 92.0], 0.08, -0.02, 0.02, 1000000], 20000.0]], [['regression local clipping 1', [[100.0, 92.0, 78.2, 80.55, 68.47, 70.52, 75.46], 0.08, -0.02, 0.0, 1000000], 70042.320003], ['regression local clipping 2', [[100.0, 115.0, 123.05, 120.59, 102.5, 87.12, 93.22], 0.05, 0.0, 0.01, 1000], 150.0], ['partial repair probe 1', [[100.0, 103.0, 106.09, 113.52, 111.25], 0.08, -0.05, 0.01, 1000000], 110038.399657], ['partial repair probe 2', [[100.0, 103.0, 103.0, 110.21, 126.74, 124.21], 0.05, -0.05, 0.01, 1000], 110.037873], ['normal control 1', [[100.0, 107.0, 107.0], 0.05, 0.0, 0.0, 1000000], 50000.0], ['normal control 2', [[100.0, 115.0], 0.08, 0.0, 0.0, 1000000], 80000.0], ['normal control 3', [[100.0, 85.0, 78.2, 71.94, 74.1, 68.17, 70.22], 0.08, -0.05, 0.01, 1000], 10.0], ['normal control 4', [[100.0, 98.0, 90.16, 82.95, 76.31], 0.08, 0.0, 0.0, 1000], 0.0]], [['regression local clipping 1', [[100.0, 98.0, 83.3, 76.64, 88.14, 90.78, 77.16], 0.08, 0.0, 0.0, 1000000], 109952.348536], ['regression local clipping 2', [[100.0, 92.0, 105.8, 97.34, 104.15], 0.08, 0.0, 0.0, 1000], 149.960962], ['partial repair probe 1', [[100.0, 107.0, 114.49], 0.05, -0.05, 0.02, 1000000], 100000.0], ['partial repair probe 2', [[100.0, 100.0, 103.0, 100.94, 98.92, 113.76], 0.05, -0.05, 0.0, 1000], 39.988112], ['normal control 1', [[100.0, 98.0, 83.3, 81.63, 84.08], 0.08, -0.05, 0.02, 1000], 20.0], ['normal control 2', [[100.0, 85.0, 85.0], 0.05, 0.0, 0.0, 1000000], 0.0], ['normal control 3', [[100.0, 85.0, 78.2], 0.08, -0.02, 0.02, 1000], 20.0], ['normal control 4', [[100.0, 100.0, 100.0], 0.05, -0.02, 0.02, 1000], 20.0]], [['regression local clipping 1', [[100.0, 115.0, 118.45, 118.45, 116.08], 0.05, -0.02, 0.01, 1000], 60.0], ['regression local clipping 2', [[100.0, 98.0, 104.86, 104.86, 89.13, 89.13], 0.05, -0.02, 0.0, 1000000], 10000.0], ['partial repair probe 1', [[100.0, 103.0, 106.09, 109.27], 0.05, -0.02, 0.0, 1000000], 89974.54991], ['partial repair probe 2', [[100.0, 98.0, 96.04, 96.04, 96.04, 110.45], 0.05, -0.02, 0.02, 1000000], 20000.0], ['normal control 1', [[100.0, 98.0], 0.08, 0.0, 0.0, 1000], 0.0], ['normal control 2', [[100.0, 103.0], 0.05, -0.02, 0.01, 1000000], 30000.0], ['normal control 3', [[100.0, 92.0], 0.08, 0.0, 0.0, 1000], 0.0], ['normal control 4', [[100.0, 103.0], 0.08, -0.05, 0.02, 1000000], 30000.0]], [['regression local clipping 1', [[100.0, 100.0, 100.0, 92.0, 98.44], 0.05, -0.02, 0.01, 1000000], 30000.0], ['regression local clipping 2', [[100.0, 85.0, 97.75, 89.93, 103.42, 95.15, 101.81], 0.08, 0.0, 0.0, 1000000], 229994.745139], ['partial repair probe 1', [[100.0, 103.0, 118.45, 118.45], 0.08, 0.0, 0.0, 1000], 110.0], ['partial repair probe 2', [[100.0, 107.0, 123.05, 126.74, 135.61, 155.95], 0.05, -0.05, 0.01, 1000000], 229987.809833], ['normal control 1', [[100.0, 98.0, 83.3], 0.08, -0.02, 0.02, 1000000], 20000.0], ['normal control 2', [[100.0, 92.0, 92.0], 0.08, 0.0, 0.0, 1000], 0.0], ['normal control 3', [[100.0, 103.0, 100.94, 100.94, 92.86, 85.43, 72.62], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 4', [[100.0, 85.0, 72.25, 77.31], 0.08, -0.05, 0.0, 1000000], 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 fixtureActualExpectedOutcome
regression local clipping 110.0110.0Failed
regression local clipping 210.030.0Failed
partial repair probe 1110019.072892110019.072892Passed
partial repair probe 2100000.0100000.0Passed
normal control 110000.010000.0Passed
normal control 230000.030000.0Passed
normal control 320000.020000.0Passed
normal control 420000.020000.0Passed

SHA-256 / 21327534047c7d11be0f5007f1350f6161558b5820ec5211009e4ad06f0eb4b3

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 - 1
        total += r
    total = min(max(total, 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 local clipping 1', [[100.0, 85.0, 87.55, 100.68], 0.08, 0.0, 0.01, 1000], 110.0], ['regression local clipping 2', [[100.0, 103.0, 103.0, 100.94], 0.08, 0.0, 0.01, 1000], 30.0], ['partial repair probe 1', [[100.0, 115.0, 112.7, 120.59, 124.21], 0.05, -0.05, 0.02, 1000000], 110019.072892], ['partial repair probe 2', [[100.0, 107.0, 114.49], 0.05, -0.05, 0.02, 1000000], 100000.0], ['normal control 1', [[100.0, 92.0, 84.64], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 2', [[100.0, 103.0], 0.05, 0.0, 0.02, 1000000], 30000.0], ['normal control 3', [[100.0, 103.0, 103.0, 106.09, 106.09, 90.18, 76.65], 0.08, -0.05, 0.02, 1000000], 20000.0], ['normal control 4', [[100.0, 92.0], 0.08, -0.02, 0.02, 1000000], 20000.0]], [['regression local clipping 1', [[100.0, 92.0, 78.2, 80.55, 68.47, 70.52, 75.46], 0.08, -0.02, 0.0, 1000000], 70042.320003], ['regression local clipping 2', [[100.0, 115.0, 123.05, 120.59, 102.5, 87.12, 93.22], 0.05, 0.0, 0.01, 1000], 150.0], ['partial repair probe 1', [[100.0, 103.0, 106.09, 113.52, 111.25], 0.08, -0.05, 0.01, 1000000], 110038.399657], ['partial repair probe 2', [[100.0, 103.0, 103.0, 110.21, 126.74, 124.21], 0.05, -0.05, 0.01, 1000], 110.037873], ['normal control 1', [[100.0, 107.0, 107.0], 0.05, 0.0, 0.0, 1000000], 50000.0], ['normal control 2', [[100.0, 115.0], 0.08, 0.0, 0.0, 1000000], 80000.0], ['normal control 3', [[100.0, 85.0, 78.2, 71.94, 74.1, 68.17, 70.22], 0.08, -0.05, 0.01, 1000], 10.0], ['normal control 4', [[100.0, 98.0, 90.16, 82.95, 76.31], 0.08, 0.0, 0.0, 1000], 0.0]], [['regression local clipping 1', [[100.0, 98.0, 83.3, 76.64, 88.14, 90.78, 77.16], 0.08, 0.0, 0.0, 1000000], 109952.348536], ['regression local clipping 2', [[100.0, 92.0, 105.8, 97.34, 104.15], 0.08, 0.0, 0.0, 1000], 149.960962], ['partial repair probe 1', [[100.0, 107.0, 114.49], 0.05, -0.05, 0.02, 1000000], 100000.0], ['partial repair probe 2', [[100.0, 100.0, 103.0, 100.94, 98.92, 113.76], 0.05, -0.05, 0.0, 1000], 39.988112], ['normal control 1', [[100.0, 98.0, 83.3, 81.63, 84.08], 0.08, -0.05, 0.02, 1000], 20.0], ['normal control 2', [[100.0, 85.0, 85.0], 0.05, 0.0, 0.0, 1000000], 0.0], ['normal control 3', [[100.0, 85.0, 78.2], 0.08, -0.02, 0.02, 1000], 20.0], ['normal control 4', [[100.0, 100.0, 100.0], 0.05, -0.02, 0.02, 1000], 20.0]], [['regression local clipping 1', [[100.0, 115.0, 118.45, 118.45, 116.08], 0.05, -0.02, 0.01, 1000], 60.0], ['regression local clipping 2', [[100.0, 98.0, 104.86, 104.86, 89.13, 89.13], 0.05, -0.02, 0.0, 1000000], 10000.0], ['partial repair probe 1', [[100.0, 103.0, 106.09, 109.27], 0.05, -0.02, 0.0, 1000000], 89974.54991], ['partial repair probe 2', [[100.0, 98.0, 96.04, 96.04, 96.04, 110.45], 0.05, -0.02, 0.02, 1000000], 20000.0], ['normal control 1', [[100.0, 98.0], 0.08, 0.0, 0.0, 1000], 0.0], ['normal control 2', [[100.0, 103.0], 0.05, -0.02, 0.01, 1000000], 30000.0], ['normal control 3', [[100.0, 92.0], 0.08, 0.0, 0.0, 1000], 0.0], ['normal control 4', [[100.0, 103.0], 0.08, -0.05, 0.02, 1000000], 30000.0]], [['regression local clipping 1', [[100.0, 100.0, 100.0, 92.0, 98.44], 0.05, -0.02, 0.01, 1000000], 30000.0], ['regression local clipping 2', [[100.0, 85.0, 97.75, 89.93, 103.42, 95.15, 101.81], 0.08, 0.0, 0.0, 1000000], 229994.745139], ['partial repair probe 1', [[100.0, 103.0, 118.45, 118.45], 0.08, 0.0, 0.0, 1000], 110.0], ['partial repair probe 2', [[100.0, 107.0, 123.05, 126.74, 135.61, 155.95], 0.05, -0.05, 0.01, 1000000], 229987.809833], ['normal control 1', [[100.0, 98.0, 83.3], 0.08, -0.02, 0.02, 1000000], 20000.0], ['normal control 2', [[100.0, 92.0, 92.0], 0.08, 0.0, 0.0, 1000], 0.0], ['normal control 3', [[100.0, 103.0, 100.94, 100.94, 92.86, 85.43, 72.62], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 4', [[100.0, 85.0, 72.25, 77.31], 0.08, -0.05, 0.0, 1000000], 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 fixtureActualExpectedOutcome
regression local clipping 129.971445110.0Failed
regression local clipping 210.030.0Failed
partial repair probe 150000.0110019.072892Failed
partial repair probe 250000.0100000.0Failed
normal control 110000.010000.0Passed
normal control 230000.030000.0Passed
normal control 320000.020000.0Passed
normal control 420000.020000.0Passed

SHA-256 / 38f1416875ba0f13dbf5e11860fff42dcb4f790def2b87c6cffbfdc1588e07ac

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 local clipping 1', [[100.0, 85.0, 87.55, 100.68], 0.08, 0.0, 0.01, 1000], 110.0], ['regression local clipping 2', [[100.0, 103.0, 103.0, 100.94], 0.08, 0.0, 0.01, 1000], 30.0], ['partial repair probe 1', [[100.0, 115.0, 112.7, 120.59, 124.21], 0.05, -0.05, 0.02, 1000000], 110019.072892], ['partial repair probe 2', [[100.0, 107.0, 114.49], 0.05, -0.05, 0.02, 1000000], 100000.0], ['normal control 1', [[100.0, 92.0, 84.64], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 2', [[100.0, 103.0], 0.05, 0.0, 0.02, 1000000], 30000.0], ['normal control 3', [[100.0, 103.0, 103.0, 106.09, 106.09, 90.18, 76.65], 0.08, -0.05, 0.02, 1000000], 20000.0], ['normal control 4', [[100.0, 92.0], 0.08, -0.02, 0.02, 1000000], 20000.0]], [['regression local clipping 1', [[100.0, 92.0, 78.2, 80.55, 68.47, 70.52, 75.46], 0.08, -0.02, 0.0, 1000000], 70042.320003], ['regression local clipping 2', [[100.0, 115.0, 123.05, 120.59, 102.5, 87.12, 93.22], 0.05, 0.0, 0.01, 1000], 150.0], ['partial repair probe 1', [[100.0, 103.0, 106.09, 113.52, 111.25], 0.08, -0.05, 0.01, 1000000], 110038.399657], ['partial repair probe 2', [[100.0, 103.0, 103.0, 110.21, 126.74, 124.21], 0.05, -0.05, 0.01, 1000], 110.037873], ['normal control 1', [[100.0, 107.0, 107.0], 0.05, 0.0, 0.0, 1000000], 50000.0], ['normal control 2', [[100.0, 115.0], 0.08, 0.0, 0.0, 1000000], 80000.0], ['normal control 3', [[100.0, 85.0, 78.2, 71.94, 74.1, 68.17, 70.22], 0.08, -0.05, 0.01, 1000], 10.0], ['normal control 4', [[100.0, 98.0, 90.16, 82.95, 76.31], 0.08, 0.0, 0.0, 1000], 0.0]], [['regression local clipping 1', [[100.0, 98.0, 83.3, 76.64, 88.14, 90.78, 77.16], 0.08, 0.0, 0.0, 1000000], 109952.348536], ['regression local clipping 2', [[100.0, 92.0, 105.8, 97.34, 104.15], 0.08, 0.0, 0.0, 1000], 149.960962], ['partial repair probe 1', [[100.0, 107.0, 114.49], 0.05, -0.05, 0.02, 1000000], 100000.0], ['partial repair probe 2', [[100.0, 100.0, 103.0, 100.94, 98.92, 113.76], 0.05, -0.05, 0.0, 1000], 39.988112], ['normal control 1', [[100.0, 98.0, 83.3, 81.63, 84.08], 0.08, -0.05, 0.02, 1000], 20.0], ['normal control 2', [[100.0, 85.0, 85.0], 0.05, 0.0, 0.0, 1000000], 0.0], ['normal control 3', [[100.0, 85.0, 78.2], 0.08, -0.02, 0.02, 1000], 20.0], ['normal control 4', [[100.0, 100.0, 100.0], 0.05, -0.02, 0.02, 1000], 20.0]], [['regression local clipping 1', [[100.0, 115.0, 118.45, 118.45, 116.08], 0.05, -0.02, 0.01, 1000], 60.0], ['regression local clipping 2', [[100.0, 98.0, 104.86, 104.86, 89.13, 89.13], 0.05, -0.02, 0.0, 1000000], 10000.0], ['partial repair probe 1', [[100.0, 103.0, 106.09, 109.27], 0.05, -0.02, 0.0, 1000000], 89974.54991], ['partial repair probe 2', [[100.0, 98.0, 96.04, 96.04, 96.04, 110.45], 0.05, -0.02, 0.02, 1000000], 20000.0], ['normal control 1', [[100.0, 98.0], 0.08, 0.0, 0.0, 1000], 0.0], ['normal control 2', [[100.0, 103.0], 0.05, -0.02, 0.01, 1000000], 30000.0], ['normal control 3', [[100.0, 92.0], 0.08, 0.0, 0.0, 1000], 0.0], ['normal control 4', [[100.0, 103.0], 0.08, -0.05, 0.02, 1000000], 30000.0]], [['regression local clipping 1', [[100.0, 100.0, 100.0, 92.0, 98.44], 0.05, -0.02, 0.01, 1000000], 30000.0], ['regression local clipping 2', [[100.0, 85.0, 97.75, 89.93, 103.42, 95.15, 101.81], 0.08, 0.0, 0.0, 1000000], 229994.745139], ['partial repair probe 1', [[100.0, 103.0, 118.45, 118.45], 0.08, 0.0, 0.0, 1000], 110.0], ['partial repair probe 2', [[100.0, 107.0, 123.05, 126.74, 135.61, 155.95], 0.05, -0.05, 0.01, 1000000], 229987.809833], ['normal control 1', [[100.0, 98.0, 83.3], 0.08, -0.02, 0.02, 1000000], 20000.0], ['normal control 2', [[100.0, 92.0, 92.0], 0.08, 0.0, 0.0, 1000], 0.0], ['normal control 3', [[100.0, 103.0, 100.94, 100.94, 92.86, 85.43, 72.62], 0.05, -0.02, 0.01, 1000000], 10000.0], ['normal control 4', [[100.0, 85.0, 72.25, 77.31], 0.08, -0.05, 0.0, 1000000], 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 fixtureActualExpectedOutcome
regression local clipping 1110.0110.0Passed
regression local clipping 230.030.0Passed
partial repair probe 1110019.072892110019.072892Passed
partial repair probe 2100000.0100000.0Passed
normal control 110000.010000.0Passed
normal control 230000.030000.0Passed
normal control 320000.020000.0Passed
normal control 420000.020000.0Passed

SHA-256 / 82ccaa376c2297cd62482c6f022ca7b39ab6b260c7caf6224031679ea25c42d9

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

Case digest / 263d7ad9bdcd302287e46b56b43e7f4a2bd561d459eccb8d224c734b0e936721