FA-61721 / Options payoff and settlement / Open access
FX option premium quote conversion: term-percentage premiums use the base notional · case 01
Term-percent premiums ignore the spot conversion of the notional.
ROOT CAUSE
The pct_term branch omits the spot factor.
THE FAILURE
The pct_term branch omits the spot factor.
Unsuccessful approach: Dividing the notional by spot converts in the wrong direction.
Case contract
Inputs quote, quote type, base notional, spot and pip size. pips: term premium = quote*pip*notional, base = term/spot. pct_base: base = quote/100*notional, term = base*spot. pct_term: term = quote/100*notional*spot, base = term/spot. Exact fractions; return [term, base] rounded to 2 as floats.
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(quote, quote_type, notional, spot, pip):
q = Fraction(str(quote))
s = Fraction(str(spot))
N = Fraction(notional)
pp = Fraction(str(pip))
if quote_type == 'pips':
term = q * pp * N
base = term / s
elif quote_type == 'pct_base':
base = q / 100 * N
term = base * s
else:
term = q / 100 * N
base = term / s
return [float(round(term, 2)), float(round(base, 2))]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression percent of term notional 1', [0.85, 'pct_term', 250000, 1.2712, 0.0001], [2701.3, 2125.0]], ['regression percent of term notional 2', [1.25, 'pct_term', 250000, 149.35, 0.01], [466718.75, 3125.0]], ['partial repair probe 1', [12.5, 'pct_term', 250000, 1.0845, 0.0001], [33890.62, 31250.0]], ['partial repair probe 2', [45.0, 'pct_term', 1000000, 1.0845, 0.0001], [488025.0, 450000.0]], ['boundary control 1', [10.0, 'pips', 1000000, 1.1, 0.0001], [1000.0, 909.09]], ['normal control 1', [12.5, 'pct_base', 1000000, 149.35, 0.01], [18668750.0, 125000.0]], ['normal control 2', [110.0, 'pips', 1000000, 1.2712, 0.0001], [11000.0, 8653.24]], ['normal control 3', [12.5, 'pips', 5000000, 149.35, 0.01], [625000.0, 4184.8]]], [['regression percent of term notional 1', [12.5, 'pct_term', 5000000, 149.35, 0.01], [93343750.0, 625000.0]], ['regression percent of term notional 2', [0.85, 'pct_term', 1000000, 1.2712, 0.0001], [10805.2, 8500.0]], ['partial repair probe 1', [1.25, 'pct_term', 5000000, 1.2712, 0.0001], [79450.0, 62500.0]], ['partial repair probe 2', [110.0, 'pct_term', 250000, 149.35, 0.01], [41071250.0, 275000.0]], ['boundary control 1', [10.0, 'pips', 1000000, 1.1, 0.0001], [1000.0, 909.09]], ['normal control 1', [110.0, 'pct_base', 1000000, 1.2712, 0.0001], [1398320.0, 1100000.0]], ['normal control 2', [110.0, 'pct_base', 5000000, 1.2712, 0.0001], [6991600.0, 5500000.0]], ['normal control 3', [45.0, 'pips', 250000, 149.35, 0.01], [112500.0, 753.26]]], [['regression percent of term notional 1', [1.25, 'pct_term', 1000000, 1.0845, 0.0001], [13556.25, 12500.0]], ['regression percent of term notional 2', [0.85, 'pct_term', 1000000, 149.35, 0.01], [1269475.0, 8500.0]], ['partial repair probe 1', [45.0, 'pct_term', 1000000, 1.2712, 0.0001], [572040.0, 450000.0]], ['partial repair probe 2', [45.0, 'pct_term', 250000, 1.0845, 0.0001], [122006.25, 112500.0]], ['boundary control 1', [10.0, 'pips', 1000000, 1.1, 0.0001], [1000.0, 909.09]], ['normal control 1', [12.5, 'pct_base', 1000000, 1.0845, 0.0001], [135562.5, 125000.0]], ['normal control 2', [110.0, 'pct_base', 250000, 1.0845, 0.0001], [298237.5, 275000.0]], ['normal control 3', [1.25, 'pips', 250000, 1.0845, 0.0001], [31.25, 28.82]]], [['regression percent of term notional 1', [45.0, 'pct_term', 250000, 149.35, 0.01], [16801875.0, 112500.0]], ['regression percent of term notional 2', [110.0, 'pct_term', 1000000, 1.0845, 0.0001], [1192950.0, 1100000.0]], ['partial repair probe 1', [45.0, 'pct_term', 5000000, 149.35, 0.01], [336037500.0, 2250000.0]], ['partial repair probe 2', [45.0, 'pct_term', 250000, 1.2712, 0.0001], [143010.0, 112500.0]], ['boundary control 1', [10.0, 'pips', 1000000, 1.1, 0.0001], [1000.0, 909.09]], ['normal control 1', [45.0, 'pips', 250000, 1.2712, 0.0001], [1125.0, 884.99]], ['normal control 2', [1.25, 'pct_base', 250000, 1.0845, 0.0001], [3389.06, 3125.0]], ['normal control 3', [1.25, 'pct_base', 250000, 1.2712, 0.0001], [3972.5, 3125.0]]], [['regression percent of term notional 1', [45.0, 'pct_term', 1000000, 149.35, 0.01], [67207500.0, 450000.0]], ['regression percent of term notional 2', [1.25, 'pct_term', 250000, 149.35, 0.01], [466718.75, 3125.0]], ['partial repair probe 1', [1.25, 'pct_term', 250000, 1.2712, 0.0001], [3972.5, 3125.0]], ['partial repair probe 2', [12.5, 'pct_term', 1000000, 1.0845, 0.0001], [135562.5, 125000.0]], ['boundary control 1', [10.0, 'pips', 1000000, 1.1, 0.0001], [1000.0, 909.09]], ['normal control 1', [0.85, 'pips', 5000000, 1.2712, 0.0001], [425.0, 334.33]], ['normal control 2', [1.25, 'pct_base', 5000000, 1.2712, 0.0001], [79450.0, 62500.0]], ['normal control 3', [110.0, 'pct_base', 1000000, 149.35, 0.01], [164285000.0, 1100000.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 percent of term notional 1 | [2125.0, 1671.65] | [2701.3, 2125.0] | Failed |
| regression percent of term notional 2 | [3125.0, 20.92] | [466718.75, 3125.0] | Failed |
| partial repair probe 1 | [31250.0, 28815.12] | [33890.62, 31250.0] | Failed |
| partial repair probe 2 | [450000.0, 414937.76] | [488025.0, 450000.0] | Failed |
| boundary control 1 | [1000.0, 909.09] | [1000.0, 909.09] | Passed |
| normal control 1 | [18668750.0, 125000.0] | [18668750.0, 125000.0] | Passed |
| normal control 2 | [11000.0, 8653.24] | [11000.0, 8653.24] | Passed |
| normal control 3 | [625000.0, 4184.8] | [625000.0, 4184.8] | Passed |
SHA-256 / c3da58ae77cf9f7b8f4932abc7de6a74c5a93e48c7eb6b6a576c9bc63d05fb13
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(quote, quote_type, notional, spot, pip):
q = Fraction(str(quote))
s = Fraction(str(spot))
N = Fraction(notional)
pp = Fraction(str(pip))
if quote_type == 'pips':
term = q * pp * N
base = term / s
elif quote_type == 'pct_base':
base = q / 100 * N
term = base * s
else:
term = q / 100 * N / s
base = term / s
return [float(round(term, 2)), float(round(base, 2))]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression percent of term notional 1', [0.85, 'pct_term', 250000, 1.2712, 0.0001], [2701.3, 2125.0]], ['regression percent of term notional 2', [1.25, 'pct_term', 250000, 149.35, 0.01], [466718.75, 3125.0]], ['partial repair probe 1', [12.5, 'pct_term', 250000, 1.0845, 0.0001], [33890.62, 31250.0]], ['partial repair probe 2', [45.0, 'pct_term', 1000000, 1.0845, 0.0001], [488025.0, 450000.0]], ['boundary control 1', [10.0, 'pips', 1000000, 1.1, 0.0001], [1000.0, 909.09]], ['normal control 1', [12.5, 'pct_base', 1000000, 149.35, 0.01], [18668750.0, 125000.0]], ['normal control 2', [110.0, 'pips', 1000000, 1.2712, 0.0001], [11000.0, 8653.24]], ['normal control 3', [12.5, 'pips', 5000000, 149.35, 0.01], [625000.0, 4184.8]]], [['regression percent of term notional 1', [12.5, 'pct_term', 5000000, 149.35, 0.01], [93343750.0, 625000.0]], ['regression percent of term notional 2', [0.85, 'pct_term', 1000000, 1.2712, 0.0001], [10805.2, 8500.0]], ['partial repair probe 1', [1.25, 'pct_term', 5000000, 1.2712, 0.0001], [79450.0, 62500.0]], ['partial repair probe 2', [110.0, 'pct_term', 250000, 149.35, 0.01], [41071250.0, 275000.0]], ['boundary control 1', [10.0, 'pips', 1000000, 1.1, 0.0001], [1000.0, 909.09]], ['normal control 1', [110.0, 'pct_base', 1000000, 1.2712, 0.0001], [1398320.0, 1100000.0]], ['normal control 2', [110.0, 'pct_base', 5000000, 1.2712, 0.0001], [6991600.0, 5500000.0]], ['normal control 3', [45.0, 'pips', 250000, 149.35, 0.01], [112500.0, 753.26]]], [['regression percent of term notional 1', [1.25, 'pct_term', 1000000, 1.0845, 0.0001], [13556.25, 12500.0]], ['regression percent of term notional 2', [0.85, 'pct_term', 1000000, 149.35, 0.01], [1269475.0, 8500.0]], ['partial repair probe 1', [45.0, 'pct_term', 1000000, 1.2712, 0.0001], [572040.0, 450000.0]], ['partial repair probe 2', [45.0, 'pct_term', 250000, 1.0845, 0.0001], [122006.25, 112500.0]], ['boundary control 1', [10.0, 'pips', 1000000, 1.1, 0.0001], [1000.0, 909.09]], ['normal control 1', [12.5, 'pct_base', 1000000, 1.0845, 0.0001], [135562.5, 125000.0]], ['normal control 2', [110.0, 'pct_base', 250000, 1.0845, 0.0001], [298237.5, 275000.0]], ['normal control 3', [1.25, 'pips', 250000, 1.0845, 0.0001], [31.25, 28.82]]], [['regression percent of term notional 1', [45.0, 'pct_term', 250000, 149.35, 0.01], [16801875.0, 112500.0]], ['regression percent of term notional 2', [110.0, 'pct_term', 1000000, 1.0845, 0.0001], [1192950.0, 1100000.0]], ['partial repair probe 1', [45.0, 'pct_term', 5000000, 149.35, 0.01], [336037500.0, 2250000.0]], ['partial repair probe 2', [45.0, 'pct_term', 250000, 1.2712, 0.0001], [143010.0, 112500.0]], ['boundary control 1', [10.0, 'pips', 1000000, 1.1, 0.0001], [1000.0, 909.09]], ['normal control 1', [45.0, 'pips', 250000, 1.2712, 0.0001], [1125.0, 884.99]], ['normal control 2', [1.25, 'pct_base', 250000, 1.0845, 0.0001], [3389.06, 3125.0]], ['normal control 3', [1.25, 'pct_base', 250000, 1.2712, 0.0001], [3972.5, 3125.0]]], [['regression percent of term notional 1', [45.0, 'pct_term', 1000000, 149.35, 0.01], [67207500.0, 450000.0]], ['regression percent of term notional 2', [1.25, 'pct_term', 250000, 149.35, 0.01], [466718.75, 3125.0]], ['partial repair probe 1', [1.25, 'pct_term', 250000, 1.2712, 0.0001], [3972.5, 3125.0]], ['partial repair probe 2', [12.5, 'pct_term', 1000000, 1.0845, 0.0001], [135562.5, 125000.0]], ['boundary control 1', [10.0, 'pips', 1000000, 1.1, 0.0001], [1000.0, 909.09]], ['normal control 1', [0.85, 'pips', 5000000, 1.2712, 0.0001], [425.0, 334.33]], ['normal control 2', [1.25, 'pct_base', 5000000, 1.2712, 0.0001], [79450.0, 62500.0]], ['normal control 3', [110.0, 'pct_base', 1000000, 149.35, 0.01], [164285000.0, 1100000.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 percent of term notional 1 | [1671.65, 1315.02] | [2701.3, 2125.0] | Failed |
| regression percent of term notional 2 | [20.92, 0.14] | [466718.75, 3125.0] | Failed |
| partial repair probe 1 | [28815.12, 26569.96] | [33890.62, 31250.0] | Failed |
| partial repair probe 2 | [414937.76, 382607.43] | [488025.0, 450000.0] | Failed |
| boundary control 1 | [1000.0, 909.09] | [1000.0, 909.09] | Passed |
| normal control 1 | [18668750.0, 125000.0] | [18668750.0, 125000.0] | Passed |
| normal control 2 | [11000.0, 8653.24] | [11000.0, 8653.24] | Passed |
| normal control 3 | [625000.0, 4184.8] | [625000.0, 4184.8] | Passed |
SHA-256 / c2dd60dc8de31a3035d6257987d24bfe0ce26dbbbe4b84faa09ec622df75995e
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:57.898007+00:00.
Case digest / d64f95b33000a34362debd931bc8b886c1b5a03ca60e3a578e527abb36c1d604