#59 — Oracle optimal-trade ceiling (GBP_JPY S5)
Hypothesis — what it tests
What is the absolute upper bound of extractable pips under perfect foresight once the spread is charged per trade — i.e. how much of the theoretical ceiling does the retail spread structurally forbid, regardless of any signal quality?
Description
To gauge how much of the market's movement is even theoretically reachable through the retail spread, this experiment computed the exact set of trades a perfect-foresight trader would take on GBP_JPY S5 data: a dynamic-programming maximum-net-pips decomposition (an extension of the classic max-profit-with-transaction-fee problem to long+short), where the per-trade spread cost forbids fragmenting moves and a 2-bar minimum hold forbids same-bar round trips. The ceiling is enormous — +2,426 pips/day over 521 trades/day — but the distribution is the punchline: the median optimal trade nets 3.2 pips against a 3.1-pip median spread, so 49% of even the optimal legs fail to clear one spread. The reward concentrates in 1–5 minute 'meandering' moves (median efficiency 0.57), not clean fast legs, and a realistically reachable band (efficiency ≥0.75, net ≥10p) is only ~197 p/day at 11 trades/day. The resulting histogram became the book's strongest evidentiary figure — the quantitative tombstone for retail FX HFT.
Key result
Indicators
Algorithms
Code
Interactive version (search, filters, figures): the experiment explorer.