FA-61821 / Options payoff and settlement / Open access
Option order price tick rounding: the 3.00 threshold is expressed in cents while prices are in mills · case 01
Almost every order is priced on the large tick.
ROOT CAUSE
The threshold constant 300 is compared against a price in mills.
VERIFIED REPAIR
Compare the price in mills against 3000.
Unsuccessful approach: Scaling the threshold to 30000 puts every realistic price on the small tick.
Case contract
Inputs a limit price (up to 3 decimals), side and penny-program flag. Work in mills. Below 3.000 the tick is 0.01 for penny classes and 0.05 otherwise; at or above 3.000 it is 0.05 for penny classes and 0.10 otherwise. Buy orders round down to a tick, sell orders round up; prices already on a tick are unchanged. Return the price as a float.
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(price, side, penny):
m = round(price * 1000)
small = m < 300
tick = (10 if penny else 50) if small else (50 if penny else 100)
if side == 'buy':
out = m // tick * tick
else:
out = -(-m // tick) * tick
return out / 1000
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression tick threshold units 1', [0.549, 'buy', True], 0.54], ['regression tick threshold units 2', [1.242, 'buy', True], 1.24], ['partial repair probe 1', [3.075, 'buy', True], 3.05], ['partial repair probe 2', [4.125, 'sell', True], 4.15], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [2.995, 'sell', False], 3.0], ['normal control 2', [3.002, 'buy', True], 3.0], ['normal control 3', [1.255, 'sell', False], 1.3]], [['regression tick threshold units 1', [1.28, 'buy', True], 1.28], ['regression tick threshold units 2', [1.242, 'buy', True], 1.24], ['partial repair probe 1', [3.14, 'sell', True], 3.15], ['partial repair probe 2', [4.149, 'sell', False], 4.2], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [12.389, 'sell', False], 12.4], ['normal control 2', [3.05, 'sell', True], 3.05], ['normal control 3', [0.549, 'sell', True], 0.55]], [['regression tick threshold units 1', [2.99, 'sell', True], 2.99], ['regression tick threshold units 2', [1.28, 'buy', True], 1.28], ['partial repair probe 1', [3.002, 'sell', True], 3.05], ['partial repair probe 2', [3.039, 'sell', True], 3.05], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [3.049, 'sell', True], 3.05], ['normal control 2', [3.0, 'sell', True], 3.0], ['normal control 3', [1.242, 'sell', True], 1.25]], [['regression tick threshold units 1', [1.231, 'sell', True], 1.24], ['regression tick threshold units 2', [2.954, 'buy', False], 2.95], ['partial repair probe 1', [12.39, 'sell', True], 12.4], ['partial repair probe 2', [12.37, 'buy', False], 12.3], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [0.549, 'sell', True], 0.55], ['normal control 2', [3.1, 'sell', False], 3.1], ['normal control 3', [3.1, 'sell', True], 3.1]], [['regression tick threshold units 1', [0.504, 'sell', False], 0.55], ['regression tick threshold units 2', [2.995, 'buy', True], 2.99], ['partial repair probe 1', [3.082, 'buy', True], 3.05], ['partial repair probe 2', [4.17, 'sell', True], 4.2], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [4.104, 'buy', False], 4.1], ['normal control 2', [1.255, 'buy', True], 1.25], ['normal control 3', [3.12, 'buy', False], 3.1]]]
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 tick threshold units 1 | 0.5 | 0.54 | Failed |
| regression tick threshold units 2 | 1.2 | 1.24 | Failed |
| partial repair probe 1 | 3.05 | 3.05 | Passed |
| partial repair probe 2 | 4.15 | 4.15 | Passed |
| boundary control 1 | 3.0 | 3.0 | Passed |
| normal control 1 | 3.0 | 3.0 | Passed |
| normal control 2 | 3.0 | 3.0 | Passed |
| normal control 3 | 1.3 | 1.3 | Passed |
SHA-256 / 605b0051416adc413fd043e885f9191a61855fd2057467f8520d297b846bbf62
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(price, side, penny):
m = round(price * 1000)
small = m < 30000
tick = (10 if penny else 50) if small else (50 if penny else 100)
if side == 'buy':
out = m // tick * tick
else:
out = -(-m // tick) * tick
return out / 1000
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression tick threshold units 1', [0.549, 'buy', True], 0.54], ['regression tick threshold units 2', [1.242, 'buy', True], 1.24], ['partial repair probe 1', [3.075, 'buy', True], 3.05], ['partial repair probe 2', [4.125, 'sell', True], 4.15], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [2.995, 'sell', False], 3.0], ['normal control 2', [3.002, 'buy', True], 3.0], ['normal control 3', [1.255, 'sell', False], 1.3]], [['regression tick threshold units 1', [1.28, 'buy', True], 1.28], ['regression tick threshold units 2', [1.242, 'buy', True], 1.24], ['partial repair probe 1', [3.14, 'sell', True], 3.15], ['partial repair probe 2', [4.149, 'sell', False], 4.2], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [12.389, 'sell', False], 12.4], ['normal control 2', [3.05, 'sell', True], 3.05], ['normal control 3', [0.549, 'sell', True], 0.55]], [['regression tick threshold units 1', [2.99, 'sell', True], 2.99], ['regression tick threshold units 2', [1.28, 'buy', True], 1.28], ['partial repair probe 1', [3.002, 'sell', True], 3.05], ['partial repair probe 2', [3.039, 'sell', True], 3.05], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [3.049, 'sell', True], 3.05], ['normal control 2', [3.0, 'sell', True], 3.0], ['normal control 3', [1.242, 'sell', True], 1.25]], [['regression tick threshold units 1', [1.231, 'sell', True], 1.24], ['regression tick threshold units 2', [2.954, 'buy', False], 2.95], ['partial repair probe 1', [12.39, 'sell', True], 12.4], ['partial repair probe 2', [12.37, 'buy', False], 12.3], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [0.549, 'sell', True], 0.55], ['normal control 2', [3.1, 'sell', False], 3.1], ['normal control 3', [3.1, 'sell', True], 3.1]], [['regression tick threshold units 1', [0.504, 'sell', False], 0.55], ['regression tick threshold units 2', [2.995, 'buy', True], 2.99], ['partial repair probe 1', [3.082, 'buy', True], 3.05], ['partial repair probe 2', [4.17, 'sell', True], 4.2], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [4.104, 'buy', False], 4.1], ['normal control 2', [1.255, 'buy', True], 1.25], ['normal control 3', [3.12, 'buy', False], 3.1]]]
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 tick threshold units 1 | 0.54 | 0.54 | Passed |
| regression tick threshold units 2 | 1.24 | 1.24 | Passed |
| partial repair probe 1 | 3.07 | 3.05 | Failed |
| partial repair probe 2 | 4.13 | 4.15 | Failed |
| boundary control 1 | 3.0 | 3.0 | Passed |
| normal control 1 | 3.0 | 3.0 | Passed |
| normal control 2 | 3.0 | 3.0 | Passed |
| normal control 3 | 1.3 | 1.3 | Passed |
SHA-256 / 8d3e38bfe184b68446c88b6107c6a0c61e9bcc4428543080af334a0822ebc90d
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(price, side, penny):
m = round(price * 1000)
small = m < 3000
tick = (10 if penny else 50) if small else (50 if penny else 100)
if side == 'buy':
out = m // tick * tick
else:
out = -(-m // tick) * tick
return out / 1000
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression tick threshold units 1', [0.549, 'buy', True], 0.54], ['regression tick threshold units 2', [1.242, 'buy', True], 1.24], ['partial repair probe 1', [3.075, 'buy', True], 3.05], ['partial repair probe 2', [4.125, 'sell', True], 4.15], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [2.995, 'sell', False], 3.0], ['normal control 2', [3.002, 'buy', True], 3.0], ['normal control 3', [1.255, 'sell', False], 1.3]], [['regression tick threshold units 1', [1.28, 'buy', True], 1.28], ['regression tick threshold units 2', [1.242, 'buy', True], 1.24], ['partial repair probe 1', [3.14, 'sell', True], 3.15], ['partial repair probe 2', [4.149, 'sell', False], 4.2], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [12.389, 'sell', False], 12.4], ['normal control 2', [3.05, 'sell', True], 3.05], ['normal control 3', [0.549, 'sell', True], 0.55]], [['regression tick threshold units 1', [2.99, 'sell', True], 2.99], ['regression tick threshold units 2', [1.28, 'buy', True], 1.28], ['partial repair probe 1', [3.002, 'sell', True], 3.05], ['partial repair probe 2', [3.039, 'sell', True], 3.05], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [3.049, 'sell', True], 3.05], ['normal control 2', [3.0, 'sell', True], 3.0], ['normal control 3', [1.242, 'sell', True], 1.25]], [['regression tick threshold units 1', [1.231, 'sell', True], 1.24], ['regression tick threshold units 2', [2.954, 'buy', False], 2.95], ['partial repair probe 1', [12.39, 'sell', True], 12.4], ['partial repair probe 2', [12.37, 'buy', False], 12.3], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [0.549, 'sell', True], 0.55], ['normal control 2', [3.1, 'sell', False], 3.1], ['normal control 3', [3.1, 'sell', True], 3.1]], [['regression tick threshold units 1', [0.504, 'sell', False], 0.55], ['regression tick threshold units 2', [2.995, 'buy', True], 2.99], ['partial repair probe 1', [3.082, 'buy', True], 3.05], ['partial repair probe 2', [4.17, 'sell', True], 4.2], ['boundary control 1', [3.0, 'buy', False], 3.0], ['normal control 1', [4.104, 'buy', False], 4.1], ['normal control 2', [1.255, 'buy', True], 1.25], ['normal control 3', [3.12, 'buy', False], 3.1]]]
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 tick threshold units 1 | 0.54 | 0.54 | Passed |
| regression tick threshold units 2 | 1.24 | 1.24 | Passed |
| partial repair probe 1 | 3.05 | 3.05 | Passed |
| partial repair probe 2 | 4.15 | 4.15 | Passed |
| boundary control 1 | 3.0 | 3.0 | Passed |
| normal control 1 | 3.0 | 3.0 | Passed |
| normal control 2 | 3.0 | 3.0 | Passed |
| normal control 3 | 1.3 | 1.3 | Passed |
SHA-256 / e56c1524aa3cf778c320465cf9c93caf19a6878052c8bb8f757a90abcf27a1d2
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.782341+00:00.
Case digest / 6f34591eb34afeb552e55175d8321b48c6d897a67ed8901b3ccedb0e306a9300