# London Breakout on GBPUSD, 1-minute data - specification (RIP Backtest protocol v1.0 plus the 8 Oct 2026 rules)

Specification written and **frozen 2026-10-21 (approved by the owner the same day; draft 2: the base cost raised from 1.0 to 1.5 pips after the owner asked whether one pip was too little, before anything was computed)**. No range, signal or trade of this test has been computed. Looked at before writing: the first and last bar and the bar count of the GBPUSD file (2004-01-01 to 2026-09-28, 8.3 million minutes). Once frozen, any change of a rule is documented and treated as a separate test; bugs may be fixed.

## Why this test, and where the rules come from
- **Chosen by the owner** on 2026-10-21 from three GBPUSD proposals ("1").
- **The idea:** the Asian session is quiet for sterling; when London opens, price breaks out of the overnight range and runs. It is one of the best-known forex day-trading rules and GBPUSD ("cable") is its classic pair. Write-ups agree on the core (the Asian high and low, a stop order beyond each side after the London open, the stop at the other side of the range) and differ on the details (range hours, a candle close or a stop order, fixed pips or R targets). We fix one common reading here and do not try others after the result.
- **Published tests seen before writing:** one 10-year GBPUSD backtest of a fixed-pip version (20-pip stop, 40-pip target, 15-minute candles) reported a loss after costs (backtrex.com). Our version uses the range itself for the stop, as in the classic description.
- **Looked at before on the site:** GBPUSD in the FX study (six indicator strategies on hourly bars, 2004-2026, all buried); the 30-minute opening-range breakout on gold (a related idea, another market). No session-range breakout on any FX pair.

## Instrument and data
- **GBPUSD**, IC Markets MT4 demo, 1-minute bid history **2004-01-01 to 2026-09-28** (`fx_data.loadFx`), New York wall clock, minute stamps = close times.
- **London time:** from New York time with each country's own clock-change dates (US and UK rules), so the London hours below are real London hours all year, including the few weeks when New York and London are 4 or 6 hours apart.
- **Clock check (before the run, no result involved):** the gold file had weeks labelled an hour early in 2004-2010. For GBPUSD we check week by week, in the clock-change windows, that the jump in activity at the London open (the average 1-minute range of 07:00-08:00 London against 06:00-07:00) falls in the right hour; weeks where it falls an hour early are shifted by one hour, as for gold, and the list of shifted weeks is published. Nothing else is changed. **Correction, 21 Oct 2026, before any result (lb_clock.js):** that activity check flagged 534 weeks outside the clock-change windows, where no shift is possible, because activity already rises at 06:00 London with Frankfurt; it cannot tell, so it was replaced by the week-open hour (the FX week opens at 17:00 New York; a week in a clock-change window opening in the 16:00 hour would be an hour early). All 72 weeks inside the windows open at 17:00: **no week is shifted**.
- **Holes (rule 3):** a gap audit of the GBPUSD file in the same way as `data_holes_xau.json` (gaps over 30 minutes outside the weekend and the daily rollover marked suspect); trades open across a suspect gap are counted, and every gate and verdict is recomputed without them.

## Rules
- **Asian range:** the highest high and lowest low of the minutes from **00:00 to 07:00 London** (the 07:00 minute excluded). No range (no trade) if fewer than 300 of those 420 minutes exist (a holiday or a gap).
- **Entry:** from 07:00 London, a buy stop **1 pip above** the range high and a sell stop **1 pip below** the range low. The first one touched is filled (at the level, or at the minute's open if it gaps beyond); the other is cancelled. **One trade a day.** No entry after **10:00 London**.
- **Stop:** the other side of the range (1 pip beyond it, mirrored). **R** = the distance from the fill to the stop, in pips.
- **Exits:**
  - **LB-1R:** target 1R;
  - **LB-2R:** target 2R;
  - **LB-CLOSE:** no target.
  - All three: any trade still open closes at **16:00 London** (the end of the London session), at that minute's open.
- Inside a minute the stop is tested before the target; in the entry minute a stop or target inside the bar fills at its level.
- **Three variants: LB-1R, LB-2R, LB-CLOSE.** Monday to Friday; a day with no range or no touch by 10:00 has no trade.

## Costs
**1.5 pips per round trip**, subtracted from every trade (fills at the levels), constant across years. The FX study used about 1.0 pip (IC Markets Raw: $7 commission = 0.7 pip plus 0.3 pip of spread); this test enters with stop orders at the London open, when spreads widen and stop orders slip, and GBPUSD spreads were 2 to 3 pips in the early years, so the owner and the author raised the base to 1.5 pips before any result (21 Oct 2026). Results at **1.0 and 2.5 pips** are shown; the verdict is that of 1.5 pips. No swap (no trade is held overnight).

## Results, periods, gates, control
- **Units:** R per trade (net), and pips. Also reported: the range size in pips by year, results by range size (a filter some traders use; descriptive, not a variant), long and short, by year, by weekday, and how trades ended.
- **Periods (by entry date):** development 2004 .. 2012; validation 2013 .. 2019; holdout 2020 .. 2026-09-28 (**already used** by the FX study).
- **Six gates per variant:** validation profit factor >= 1.2; at least 50 trades in each period; development **t >= 2.0** (three variants of a strategy not tested before on the site); above the 95th percentile of 500 runs of the matched control; positive without the 10 best trades; holdout net positive (flagged used).
- **Matched control (moved entries):** every real entry moved, all together, by one random circular offset of whole trading days (at least 5% of them), to the same London time on the new day, same direction, the same R in pips, the same exits and costs. 500 runs, seeds 1000 + run. Statistic: average net R per trade. It asks whether the breakout picks better moments than the same trades on other days.

## Engine and self-test (before the run)
New engine `lb_lib.js`, independent re-implementation `lb_ref.js`, `lb_selftest.js` that must pass before any result is printed: London time across clock changes, the range and its minimum minutes, both stop orders and the cancelled side, the 10:00 cut-off, gaps through a level, stop before target, the 16:00 exit, costs; the reference matched trade by trade on the real data for all three variants; the control at offset 0 reproducing the real trades.

## Before the article
Results go to the owner first: all three variants, every gate, long and short, by year, by range size, the clock and hole checks. One article, published only with the owner's agreement. Working title for search: "London Breakout Strategy Backtest: GBPUSD, 22 Years".

## Reading the result
"Buried" or "Inconclusive" mean a statistically convincing edge was not demonstrated; neither is proof that none exists. One pair, one broker's demo history, one reading of the rules.
