FA-61741 / Options payoff and settlement / Open access
Implied volatility by bisection with arbitrage bounds: the search bracket tops out at 100% volatility · case 01
High implied volatilities are reported as 1.0.
ROOT CAUSE
The upper end of the bisection bracket is 1.0.
VERIFIED REPAIR
Search up to 5.0 as the contract states.
Unsuccessful approach: Doubling the bracket to 2.0 still truncates very high volatilities.
Case contract
Inputs kind, option price, S, K, r, T (no dividends). If price <= lower bound (call max(S - K e^{-rT},0), put max(K e^{-rT} - S,0)) or price >= upper bound (call S, put K e^{-rT}) return None. Otherwise bisect sigma in [1e-6, 5] for 100 iterations on the Black-Scholes price and return the midpoint rounded to 4.
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
import math
N = 1
observations = []
def solve(kind, price, S, K, r, T):
def N(x):
return 0.5 * (1 + math.erf(x / math.sqrt(2)))
def bs(v):
d1 = (math.log(S / K) + (r + 0.5 * v * v) * T) / (v * math.sqrt(T))
d2 = d1 - v * math.sqrt(T)
if kind == 'C':
return S * N(d1) - K * math.exp(-r * T) * N(d2)
return K * math.exp(-r * T) * N(-d2) - S * N(-d1)
disc_k = K * math.exp(-r * T)
lower = max(S - disc_k, 0) if kind == 'C' else max(disc_k - S, 0)
upper = S if kind == 'C' else disc_k
if price <= lower or price >= upper:
return None
lo, hi = 1e-6, 1.0
for _ in range(100):
mid = (lo + hi) / 2
if bs(mid) > price:
hi = mid
else:
lo = mid
return round((lo + hi) / 2, 4)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression volatility search bracket 1', ['C', 91.2319, 100.0, 120.0, 0.0, 1.0], 3.5], ['regression volatility search bracket 2', ['P', 91.5993, 110.0, 100.0, 0.0, 1.0], 3.5], ['partial repair probe 1', ['P', 94.176453, 110.0, 100.0, 0.03, 2.0], 5.0], ['partial repair probe 2', ['P', 97.044553, 100.0, 100.0, 0.03, 1.0], 5.0], ['normal control 1', ['C', 1.2175, 110.0, 120.0, 0.0, 1.0], 0.1], ['normal control 2', ['P', 3.8044, 110.0, 95.0, 0.08, 1.0], 0.3], ['normal control 3', ['P', 5.59, 100.0, 100.0, 0.03, 0.25], 0.3], ['normal control 4', ['P', 2.5, 90.0, 95.0, 0.08, 2.0], 0.1239]], [['regression volatility search bracket 1', ['C', 92.3037, 100.0, 100.0, 0.08, 1.0], 3.5], ['regression volatility search bracket 2', ['C', 56.0677, 90.0, 100.0, 0.0, 2.0], 1.3], ['partial repair probe 1', ['C', 79.4077, 100.0, 95.0, 0.0, 1.0], 2.5], ['partial repair probe 2', ['C', 70.1631, 110.0, 100.0, 0.03, 0.25], 3.5], ['normal control 1', ['P', 9.2391, 100.0, 100.0, 0.08, 2.0], 0.3], ['normal control 2', ['P', 3.6659, 100.0, 95.0, 0.0, 0.25], 0.3], ['normal control 3', ['P', 92.311635, 100.0, 100.0, 0.08, 1.0], None], ['normal control 4', ['P', 92.192326, 100.0, 95.0, 0.03, 1.0], None]], [['regression volatility search bracket 1', ['C', 87.8484, 110.0, 100.0, 0.0, 1.0], 2.5], ['regression volatility search bracket 2', ['C', 56.8158, 110.0, 100.0, 0.03, 1.0], 1.3], ['partial repair probe 1', ['C', 101.9338, 110.0, 100.0, 0.08, 1.0], 3.5], ['partial repair probe 2', ['P', 116.453464, 110.0, 120.0, 0.03, 1.0], 5.0], ['normal control 1', ['C', 0.4365, 90.0, 95.0, 0.03, 0.25], 0.1], ['normal control 2', ['P', 0.0, 110.0, 95.0, 0.0, 2.0], None], ['normal control 3', ['P', 10.0, 90.0, 100.0, 0.0, 0.25], None], ['normal control 4', ['C', 8.8425, 100.0, 100.0, 0.08, 1.0], 0.1]], [['regression volatility search bracket 1', ['P', 77.5605, 100.0, 120.0, 0.03, 0.25], 3.5], ['regression volatility search bracket 2', ['C', 58.7023, 100.0, 120.0, 0.08, 0.25], 3.5], ['partial repair probe 1', ['C', 102.1427, 110.0, 95.0, 0.08, 1.0], 3.5], ['partial repair probe 2', ['P', 92.29, 100.0, 100.0, 0.0, 2.0], 2.5], ['normal control 1', ['C', 0.01, 100.0, 100.0, 0.08, 2.0], None], ['normal control 2', ['P', 36.4553, 90.0, 120.0, 0.0, 2.0], 0.3], ['normal control 3', ['C', 0.01, 90.0, 120.0, 0.08, 0.25], 0.1967], ['normal control 4', ['C', 0.01, 90.0, 120.0, 0.03, 1.0], 0.0951]], [['regression volatility search bracket 1', ['C', 55.7612, 110.0, 95.0, 0.0, 0.25], 2.5], ['regression volatility search bracket 2', ['C', 70.09, 110.0, 120.0, 0.03, 2.0], 1.3], ['partial repair probe 1', ['C', 54.2681, 110.0, 100.0, 0.0, 0.25], 2.5], ['partial repair probe 2', ['P', 88.7705, 110.0, 100.0, 0.03, 1.0], 3.5], ['normal control 1', ['C', 12.9118, 110.0, 100.0, 0.03, 2.0], None], ['normal control 2', ['C', 110.0, 110.0, 95.0, 0.08, 0.25], None], ['normal control 3', ['P', 87.696053, 100.0, 95.0, 0.08, 1.0], None], ['normal control 4', ['P', 19.99, 100.0, 120.0, 0.0, 2.0], None]]]
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 volatility search bracket 1 | 1.0 | 3.5 | Failed |
| regression volatility search bracket 2 | 1.0 | 3.5 | Failed |
| partial repair probe 1 | 1.0 | 5.0 | Failed |
| partial repair probe 2 | 1.0 | 5.0 | Failed |
| normal control 1 | 0.1 | 0.1 | Passed |
| normal control 2 | 0.3 | 0.3 | Passed |
| normal control 3 | 0.3 | 0.3 | Passed |
| normal control 4 | 0.1239 | 0.1239 | Passed |
SHA-256 / b31159e23f35103743cec8ad0585ca85ea8a21617f73f3e3a1791e02f99efd96
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(kind, price, S, K, r, T):
def N(x):
return 0.5 * (1 + math.erf(x / math.sqrt(2)))
def bs(v):
d1 = (math.log(S / K) + (r + 0.5 * v * v) * T) / (v * math.sqrt(T))
d2 = d1 - v * math.sqrt(T)
if kind == 'C':
return S * N(d1) - K * math.exp(-r * T) * N(d2)
return K * math.exp(-r * T) * N(-d2) - S * N(-d1)
disc_k = K * math.exp(-r * T)
lower = max(S - disc_k, 0) if kind == 'C' else max(disc_k - S, 0)
upper = S if kind == 'C' else disc_k
if price <= lower or price >= upper:
return None
lo, hi = 1e-6, 2.0
for _ in range(100):
mid = (lo + hi) / 2
if bs(mid) > price:
hi = mid
else:
lo = mid
return round((lo + hi) / 2, 4)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression volatility search bracket 1', ['C', 91.2319, 100.0, 120.0, 0.0, 1.0], 3.5], ['regression volatility search bracket 2', ['P', 91.5993, 110.0, 100.0, 0.0, 1.0], 3.5], ['partial repair probe 1', ['P', 94.176453, 110.0, 100.0, 0.03, 2.0], 5.0], ['partial repair probe 2', ['P', 97.044553, 100.0, 100.0, 0.03, 1.0], 5.0], ['normal control 1', ['C', 1.2175, 110.0, 120.0, 0.0, 1.0], 0.1], ['normal control 2', ['P', 3.8044, 110.0, 95.0, 0.08, 1.0], 0.3], ['normal control 3', ['P', 5.59, 100.0, 100.0, 0.03, 0.25], 0.3], ['normal control 4', ['P', 2.5, 90.0, 95.0, 0.08, 2.0], 0.1239]], [['regression volatility search bracket 1', ['C', 92.3037, 100.0, 100.0, 0.08, 1.0], 3.5], ['regression volatility search bracket 2', ['C', 56.0677, 90.0, 100.0, 0.0, 2.0], 1.3], ['partial repair probe 1', ['C', 79.4077, 100.0, 95.0, 0.0, 1.0], 2.5], ['partial repair probe 2', ['C', 70.1631, 110.0, 100.0, 0.03, 0.25], 3.5], ['normal control 1', ['P', 9.2391, 100.0, 100.0, 0.08, 2.0], 0.3], ['normal control 2', ['P', 3.6659, 100.0, 95.0, 0.0, 0.25], 0.3], ['normal control 3', ['P', 92.311635, 100.0, 100.0, 0.08, 1.0], None], ['normal control 4', ['P', 92.192326, 100.0, 95.0, 0.03, 1.0], None]], [['regression volatility search bracket 1', ['C', 87.8484, 110.0, 100.0, 0.0, 1.0], 2.5], ['regression volatility search bracket 2', ['C', 56.8158, 110.0, 100.0, 0.03, 1.0], 1.3], ['partial repair probe 1', ['C', 101.9338, 110.0, 100.0, 0.08, 1.0], 3.5], ['partial repair probe 2', ['P', 116.453464, 110.0, 120.0, 0.03, 1.0], 5.0], ['normal control 1', ['C', 0.4365, 90.0, 95.0, 0.03, 0.25], 0.1], ['normal control 2', ['P', 0.0, 110.0, 95.0, 0.0, 2.0], None], ['normal control 3', ['P', 10.0, 90.0, 100.0, 0.0, 0.25], None], ['normal control 4', ['C', 8.8425, 100.0, 100.0, 0.08, 1.0], 0.1]], [['regression volatility search bracket 1', ['P', 77.5605, 100.0, 120.0, 0.03, 0.25], 3.5], ['regression volatility search bracket 2', ['C', 58.7023, 100.0, 120.0, 0.08, 0.25], 3.5], ['partial repair probe 1', ['C', 102.1427, 110.0, 95.0, 0.08, 1.0], 3.5], ['partial repair probe 2', ['P', 92.29, 100.0, 100.0, 0.0, 2.0], 2.5], ['normal control 1', ['C', 0.01, 100.0, 100.0, 0.08, 2.0], None], ['normal control 2', ['P', 36.4553, 90.0, 120.0, 0.0, 2.0], 0.3], ['normal control 3', ['C', 0.01, 90.0, 120.0, 0.08, 0.25], 0.1967], ['normal control 4', ['C', 0.01, 90.0, 120.0, 0.03, 1.0], 0.0951]], [['regression volatility search bracket 1', ['C', 55.7612, 110.0, 95.0, 0.0, 0.25], 2.5], ['regression volatility search bracket 2', ['C', 70.09, 110.0, 120.0, 0.03, 2.0], 1.3], ['partial repair probe 1', ['C', 54.2681, 110.0, 100.0, 0.0, 0.25], 2.5], ['partial repair probe 2', ['P', 88.7705, 110.0, 100.0, 0.03, 1.0], 3.5], ['normal control 1', ['C', 12.9118, 110.0, 100.0, 0.03, 2.0], None], ['normal control 2', ['C', 110.0, 110.0, 95.0, 0.08, 0.25], None], ['normal control 3', ['P', 87.696053, 100.0, 95.0, 0.08, 1.0], None], ['normal control 4', ['P', 19.99, 100.0, 120.0, 0.0, 2.0], None]]]
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 volatility search bracket 1 | 2.0 | 3.5 | Failed |
| regression volatility search bracket 2 | 2.0 | 3.5 | Failed |
| partial repair probe 1 | 2.0 | 5.0 | Failed |
| partial repair probe 2 | 2.0 | 5.0 | Failed |
| normal control 1 | 0.1 | 0.1 | Passed |
| normal control 2 | 0.3 | 0.3 | Passed |
| normal control 3 | 0.3 | 0.3 | Passed |
| normal control 4 | 0.1239 | 0.1239 | Passed |
SHA-256 / 7f5fb5fd24e44b96fa709aae33402ec8782d4d273d73cf9de710dabb6a95e26b
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(kind, price, S, K, r, T):
def N(x):
return 0.5 * (1 + math.erf(x / math.sqrt(2)))
def bs(v):
d1 = (math.log(S / K) + (r + 0.5 * v * v) * T) / (v * math.sqrt(T))
d2 = d1 - v * math.sqrt(T)
if kind == 'C':
return S * N(d1) - K * math.exp(-r * T) * N(d2)
return K * math.exp(-r * T) * N(-d2) - S * N(-d1)
disc_k = K * math.exp(-r * T)
lower = max(S - disc_k, 0) if kind == 'C' else max(disc_k - S, 0)
upper = S if kind == 'C' else disc_k
if price <= lower or price >= upper:
return None
lo, hi = 1e-6, 5.0
for _ in range(100):
mid = (lo + hi) / 2
if bs(mid) > price:
hi = mid
else:
lo = mid
return round((lo + hi) / 2, 4)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression volatility search bracket 1', ['C', 91.2319, 100.0, 120.0, 0.0, 1.0], 3.5], ['regression volatility search bracket 2', ['P', 91.5993, 110.0, 100.0, 0.0, 1.0], 3.5], ['partial repair probe 1', ['P', 94.176453, 110.0, 100.0, 0.03, 2.0], 5.0], ['partial repair probe 2', ['P', 97.044553, 100.0, 100.0, 0.03, 1.0], 5.0], ['normal control 1', ['C', 1.2175, 110.0, 120.0, 0.0, 1.0], 0.1], ['normal control 2', ['P', 3.8044, 110.0, 95.0, 0.08, 1.0], 0.3], ['normal control 3', ['P', 5.59, 100.0, 100.0, 0.03, 0.25], 0.3], ['normal control 4', ['P', 2.5, 90.0, 95.0, 0.08, 2.0], 0.1239]], [['regression volatility search bracket 1', ['C', 92.3037, 100.0, 100.0, 0.08, 1.0], 3.5], ['regression volatility search bracket 2', ['C', 56.0677, 90.0, 100.0, 0.0, 2.0], 1.3], ['partial repair probe 1', ['C', 79.4077, 100.0, 95.0, 0.0, 1.0], 2.5], ['partial repair probe 2', ['C', 70.1631, 110.0, 100.0, 0.03, 0.25], 3.5], ['normal control 1', ['P', 9.2391, 100.0, 100.0, 0.08, 2.0], 0.3], ['normal control 2', ['P', 3.6659, 100.0, 95.0, 0.0, 0.25], 0.3], ['normal control 3', ['P', 92.311635, 100.0, 100.0, 0.08, 1.0], None], ['normal control 4', ['P', 92.192326, 100.0, 95.0, 0.03, 1.0], None]], [['regression volatility search bracket 1', ['C', 87.8484, 110.0, 100.0, 0.0, 1.0], 2.5], ['regression volatility search bracket 2', ['C', 56.8158, 110.0, 100.0, 0.03, 1.0], 1.3], ['partial repair probe 1', ['C', 101.9338, 110.0, 100.0, 0.08, 1.0], 3.5], ['partial repair probe 2', ['P', 116.453464, 110.0, 120.0, 0.03, 1.0], 5.0], ['normal control 1', ['C', 0.4365, 90.0, 95.0, 0.03, 0.25], 0.1], ['normal control 2', ['P', 0.0, 110.0, 95.0, 0.0, 2.0], None], ['normal control 3', ['P', 10.0, 90.0, 100.0, 0.0, 0.25], None], ['normal control 4', ['C', 8.8425, 100.0, 100.0, 0.08, 1.0], 0.1]], [['regression volatility search bracket 1', ['P', 77.5605, 100.0, 120.0, 0.03, 0.25], 3.5], ['regression volatility search bracket 2', ['C', 58.7023, 100.0, 120.0, 0.08, 0.25], 3.5], ['partial repair probe 1', ['C', 102.1427, 110.0, 95.0, 0.08, 1.0], 3.5], ['partial repair probe 2', ['P', 92.29, 100.0, 100.0, 0.0, 2.0], 2.5], ['normal control 1', ['C', 0.01, 100.0, 100.0, 0.08, 2.0], None], ['normal control 2', ['P', 36.4553, 90.0, 120.0, 0.0, 2.0], 0.3], ['normal control 3', ['C', 0.01, 90.0, 120.0, 0.08, 0.25], 0.1967], ['normal control 4', ['C', 0.01, 90.0, 120.0, 0.03, 1.0], 0.0951]], [['regression volatility search bracket 1', ['C', 55.7612, 110.0, 95.0, 0.0, 0.25], 2.5], ['regression volatility search bracket 2', ['C', 70.09, 110.0, 120.0, 0.03, 2.0], 1.3], ['partial repair probe 1', ['C', 54.2681, 110.0, 100.0, 0.0, 0.25], 2.5], ['partial repair probe 2', ['P', 88.7705, 110.0, 100.0, 0.03, 1.0], 3.5], ['normal control 1', ['C', 12.9118, 110.0, 100.0, 0.03, 2.0], None], ['normal control 2', ['C', 110.0, 110.0, 95.0, 0.08, 0.25], None], ['normal control 3', ['P', 87.696053, 100.0, 95.0, 0.08, 1.0], None], ['normal control 4', ['P', 19.99, 100.0, 120.0, 0.0, 2.0], None]]]
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 volatility search bracket 1 | 3.5 | 3.5 | Passed |
| regression volatility search bracket 2 | 3.5 | 3.5 | Passed |
| partial repair probe 1 | 5.0 | 5.0 | Passed |
| partial repair probe 2 | 5.0 | 5.0 | Passed |
| normal control 1 | 0.1 | 0.1 | Passed |
| normal control 2 | 0.3 | 0.3 | Passed |
| normal control 3 | 0.3 | 0.3 | Passed |
| normal control 4 | 0.1239 | 0.1239 | Passed |
SHA-256 / 59dfc3e9603224462fed12aa568e07d8d391753c2d9d24153567720d98806550
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:58.092734+00:00.
Case digest / fd4926193f68dd378bb541ad0aa1357c4a18b00fb7191f3f9b99662e8ca5d83f