FA-61836 / Options payoff and settlement / Open access
Option order price tick rounding: sell prices already on a tick are bumped up · case 01
Valid sell limits are moved one tick higher.
ROOT CAUSE
The ceiling is implemented as floor + one tick.
VERIFIED REPAIR
Leave prices already on a tick unchanged.
Unsuccessful approach: Rounding m/tick + 0.5 uses banker's rounding and bumps some on-tick prices.
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 < 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 + 1) * tick
return out / 1000
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression on-tick sell prices 1', [0.53, 'sell', True], 0.53], ['regression on-tick sell prices 2', [3.0, 'sell', True], 3.0], ['partial repair probe 1', [2.95, 'sell', False], 2.95], ['partial repair probe 2', [3.05, 'sell', True], 3.05], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [3.12, 'buy', True], 3.1], ['normal control 2', [2.951, 'buy', False], 2.95]], [['regression on-tick sell prices 1', [3.0, 'sell', True], 3.0], ['regression on-tick sell prices 2', [2.95, 'sell', True], 2.95], ['partial repair probe 1', [4.15, 'sell', True], 4.15], ['partial repair probe 2', [0.55, 'sell', False], 0.55], ['boundary control 1', [3.001, 'sell', True], 3.05], ['boundary control 2', [3.0, 'buy', False], 3.0], ['normal control 1', [4.13, 'sell', True], 4.15], ['normal control 2', [1.242, 'sell', False], 1.25]], [['regression on-tick sell prices 1', [2.95, 'sell', False], 2.95], ['regression on-tick sell prices 2', [0.55, 'sell', False], 0.55], ['partial repair probe 1', [0.53, 'sell', True], 0.53], ['partial repair probe 2', [0.55, 'sell', True], 0.55], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [3.07, 'sell', True], 3.1], ['normal control 2', [12.365, 'buy', False], 12.3]], [['regression on-tick sell prices 1', [2.99, 'sell', True], 2.99], ['regression on-tick sell prices 2', [3.0, 'sell', True], 3.0], ['partial repair probe 1', [0.55, 'sell', True], 0.55], ['partial repair probe 2', [4.15, 'sell', True], 4.15], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [4.17, 'sell', False], 4.2], ['normal control 2', [3.071, 'sell', False], 3.1]], [['regression on-tick sell prices 1', [2.95, 'sell', True], 2.95], ['regression on-tick sell prices 2', [0.55, 'sell', True], 0.55], ['partial repair probe 1', [2.95, 'sell', False], 2.95], ['partial repair probe 2', [4.1, 'sell', False], 4.1], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [3.005, 'buy', True], 3.0], ['normal control 2', [1.279, 'buy', False], 1.25]]]
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 on-tick sell prices 1 | 0.54 | 0.53 | Failed |
| regression on-tick sell prices 2 | 3.05 | 3.0 | Failed |
| partial repair probe 1 | 3.0 | 2.95 | Failed |
| partial repair probe 2 | 3.1 | 3.05 | Failed |
| boundary control 1 | 3.0 | 3.0 | Passed |
| boundary control 2 | 3.05 | 3.05 | Passed |
| normal control 1 | 3.1 | 3.1 | Passed |
| normal control 2 | 2.95 | 2.95 | Passed |
SHA-256 / 6f5c994cbd583ceaac1581189e2e7c746754dc513bd4fd571f9fe4fa491fc7ec
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 < 3000
tick = (10 if penny else 50) if small else (50 if penny else 100)
if side == 'buy':
out = m // tick * tick
else:
out = round(m / tick + 0.5) * tick
return out / 1000
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression on-tick sell prices 1', [0.53, 'sell', True], 0.53], ['regression on-tick sell prices 2', [3.0, 'sell', True], 3.0], ['partial repair probe 1', [2.95, 'sell', False], 2.95], ['partial repair probe 2', [3.05, 'sell', True], 3.05], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [3.12, 'buy', True], 3.1], ['normal control 2', [2.951, 'buy', False], 2.95]], [['regression on-tick sell prices 1', [3.0, 'sell', True], 3.0], ['regression on-tick sell prices 2', [2.95, 'sell', True], 2.95], ['partial repair probe 1', [4.15, 'sell', True], 4.15], ['partial repair probe 2', [0.55, 'sell', False], 0.55], ['boundary control 1', [3.001, 'sell', True], 3.05], ['boundary control 2', [3.0, 'buy', False], 3.0], ['normal control 1', [4.13, 'sell', True], 4.15], ['normal control 2', [1.242, 'sell', False], 1.25]], [['regression on-tick sell prices 1', [2.95, 'sell', False], 2.95], ['regression on-tick sell prices 2', [0.55, 'sell', False], 0.55], ['partial repair probe 1', [0.53, 'sell', True], 0.53], ['partial repair probe 2', [0.55, 'sell', True], 0.55], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [3.07, 'sell', True], 3.1], ['normal control 2', [12.365, 'buy', False], 12.3]], [['regression on-tick sell prices 1', [2.99, 'sell', True], 2.99], ['regression on-tick sell prices 2', [3.0, 'sell', True], 3.0], ['partial repair probe 1', [0.55, 'sell', True], 0.55], ['partial repair probe 2', [4.15, 'sell', True], 4.15], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [4.17, 'sell', False], 4.2], ['normal control 2', [3.071, 'sell', False], 3.1]], [['regression on-tick sell prices 1', [2.95, 'sell', True], 2.95], ['regression on-tick sell prices 2', [0.55, 'sell', True], 0.55], ['partial repair probe 1', [2.95, 'sell', False], 2.95], ['partial repair probe 2', [4.1, 'sell', False], 4.1], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [3.005, 'buy', True], 3.0], ['normal control 2', [1.279, 'buy', False], 1.25]]]
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 on-tick sell prices 1 | 0.54 | 0.53 | Failed |
| regression on-tick sell prices 2 | 3.0 | 3.0 | Passed |
| partial repair probe 1 | 3.0 | 2.95 | Failed |
| partial repair probe 2 | 3.1 | 3.05 | Failed |
| boundary control 1 | 3.0 | 3.0 | Passed |
| boundary control 2 | 3.05 | 3.05 | Passed |
| normal control 1 | 3.1 | 3.1 | Passed |
| normal control 2 | 2.95 | 2.95 | Passed |
SHA-256 / e7bbd3f52d114877c3129bd279584ee57052408c8810c54e0bf4d10670eade3b
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 on-tick sell prices 1', [0.53, 'sell', True], 0.53], ['regression on-tick sell prices 2', [3.0, 'sell', True], 3.0], ['partial repair probe 1', [2.95, 'sell', False], 2.95], ['partial repair probe 2', [3.05, 'sell', True], 3.05], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [3.12, 'buy', True], 3.1], ['normal control 2', [2.951, 'buy', False], 2.95]], [['regression on-tick sell prices 1', [3.0, 'sell', True], 3.0], ['regression on-tick sell prices 2', [2.95, 'sell', True], 2.95], ['partial repair probe 1', [4.15, 'sell', True], 4.15], ['partial repair probe 2', [0.55, 'sell', False], 0.55], ['boundary control 1', [3.001, 'sell', True], 3.05], ['boundary control 2', [3.0, 'buy', False], 3.0], ['normal control 1', [4.13, 'sell', True], 4.15], ['normal control 2', [1.242, 'sell', False], 1.25]], [['regression on-tick sell prices 1', [2.95, 'sell', False], 2.95], ['regression on-tick sell prices 2', [0.55, 'sell', False], 0.55], ['partial repair probe 1', [0.53, 'sell', True], 0.53], ['partial repair probe 2', [0.55, 'sell', True], 0.55], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [3.07, 'sell', True], 3.1], ['normal control 2', [12.365, 'buy', False], 12.3]], [['regression on-tick sell prices 1', [2.99, 'sell', True], 2.99], ['regression on-tick sell prices 2', [3.0, 'sell', True], 3.0], ['partial repair probe 1', [0.55, 'sell', True], 0.55], ['partial repair probe 2', [4.15, 'sell', True], 4.15], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [4.17, 'sell', False], 4.2], ['normal control 2', [3.071, 'sell', False], 3.1]], [['regression on-tick sell prices 1', [2.95, 'sell', True], 2.95], ['regression on-tick sell prices 2', [0.55, 'sell', True], 0.55], ['partial repair probe 1', [2.95, 'sell', False], 2.95], ['partial repair probe 2', [4.1, 'sell', False], 4.1], ['boundary control 1', [3.0, 'buy', False], 3.0], ['boundary control 2', [3.001, 'sell', True], 3.05], ['normal control 1', [3.005, 'buy', True], 3.0], ['normal control 2', [1.279, 'buy', False], 1.25]]]
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 on-tick sell prices 1 | 0.53 | 0.53 | Passed |
| regression on-tick sell prices 2 | 3.0 | 3.0 | Passed |
| partial repair probe 1 | 2.95 | 2.95 | Passed |
| partial repair probe 2 | 3.05 | 3.05 | Passed |
| boundary control 1 | 3.0 | 3.0 | Passed |
| boundary control 2 | 3.05 | 3.05 | Passed |
| normal control 1 | 3.1 | 3.1 | Passed |
| normal control 2 | 2.95 | 2.95 | Passed |
SHA-256 / 9259747b3e302590cac1e04336cbbb1d4da84fbfdb27de3cca9578179d114ccb
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:59.027448+00:00.
Case digest / 4681e2c02ff9f02101ac10e9a26c126a23fa46c4355061221575c77d3c4fff67