# Initial Balance breakout on NQ futures, 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 1 unchanged)**. No initial balance, signal or trade of this test has been computed. Once frozen, any change of a rule is documented and treated as a separate test; bugs may be fixed.

## Why this test, and what was looked at before
- **Chosen by the owner** on 2026-10-21 ("hai pe NQ") after asking whether we had tested the Initial Balance breakout (we had not).
- **The idea:** in Market Profile (J. Peter Steidlmayer, CBOT), the **Initial Balance (IB)** is the range of the first hour of the regular session. A break of the IB high or low after the first hour is read as one side taking control; traders buy the break above, sell the break below, and often target an **extension of the IB** (the IB's own size added beyond the break). Write-ups differ on the stop (the other side of the IB, or its midpoint) and the target (1x extension, or the close). We fix three common readings and try no others after the result.
- **Looked at before (disclosed):** on NQ, our published 5-minute opening range breakouts (2026-10-17) and the first 5-minute candle with a fair value gap (2026-10-21), all buried; the noise area breakout (published, in a forward test). **Not published, without a protocol:** opening range breakouts of 5, 15 and 30 minutes on ES and the owner's ORB with fair value gaps on ES (September 2026), no edge. The IB is a wider range (60 minutes) of the same family, so the bar is raised (below).

## Instrument and data
- **NQ** (E-mini Nasdaq-100 futures), `NQ_1min.csv` (NinjaTrader, back-adjusted continuous contract), 1-minute bars on the New York clock, stamped at their close, 2020-01-01 to **2026-09-25 17:00 New York**; the exchange calendar of our other NQ tests (`rb_lib.js`) for the session and early closes. $20 a point, tick 0.25.
- **Initial Balance:** the 60 bars from 09:30 to 10:30 (stamped 09:31 to 10:30): IB high = their highest high, IB low = their lowest low, IB size = high - low. A day has no trade if more than 3 of the 60 bars are missing, or if the session closes before 12:30 (early-close days).

## Rules (one trade a day, long or short)
- **Entry:** from 10:30, a buy stop **1 tick above** the IB high and a sell stop **1 tick below** the IB low; the first one touched is the trade (fill at the level, or at the bar's open if it opens beyond it); the other is cancelled. If one bar touches both, the level nearer that bar's open is taken (as in our ORB test) and the trade is stopped in that bar if its stop is also inside it. **No entry after 13:30** (as the classic breakout in our NQ opening range test).
- **Three variants:**
  - **IB-X1:** stop 1 tick beyond the **other side** of the IB; target = the breakout level **plus one IB size** (a 1x extension, about 1R).
  - **IB-MID:** stop at the **IB midpoint**; target the same 1x extension (about 2R).
  - **IB-CLOSE:** stop 1 tick beyond the other side of the IB; **no target**.
- **All variants:** a trade still open closes at the **session close** (16:00, or the calendar's early close), at the last bar's close. Stop tested before target inside a bar; a level beyond a bar's open fills at the open.
- **R** = entry to stop, in points.

## Costs
- **$15.76 per round trip per contract** (commission $5.76 plus one tick of slippage on each fill), as in all our ES and NQ tests. Results in dollars per contract and in R.

## Periods, gates, control
- **Periods (by trade date), as in the other NQ tests:** development 2020 to 2023; validation 2024-01 to 2025-03; holdout 2025-04 to 2026-09-25 (**already used**).
- **Six gates per variant** (net dollars per contract): validation profit factor >= 1.2; at least 50 trades in each period; development **t >= 2.5** (opening range breakouts have been tried in more than four variants on this site and off it); above the 95th percentile of 500 runs of the matched control; positive without the 10 best trades; holdout net positive (flagged used). Fewer than 30 trades: Inconclusive.
- **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 minute of the session on another day, same direction, the same stop and target distances in points, the same session-close exit and costs. 500 runs, seeds 1000 + run. Statistic: average net dollars per trade.
- **Also reported:** IB size in points by year; how often the IB high, the low, or neither is broken by 13:30; win rate with its Wilson interval; exits by reason; long and short; by year; results by IB size (descriptive).

## Engine and self-test (before the run)
New engine `ibb_lib.js` (the existing futures loader and calendar), independent re-implementation `ibb_ref.js`, `ibb_selftest.js` that must pass before any result is printed: hand-worked days (an up break, a down break, both levels in one bar, a gap through a level, the 13:30 cut-off, stop and target in the same bar, the midpoint stop, the 1x extension target, the session-close exit, an early close, missing IB bars); the reference matched trade by trade on the real data for all three variants; the control at offset 0 entering at the real minutes.

## Before the article
Results go to the owner first: all three variants, every gate, long and short, by year, the breakout statistics. One article, published only with the owner's agreement. Working title for search: "Initial Balance Breakout Strategy Backtest: NQ Futures".

## Reading the result
"Buried" or "Inconclusive" mean a statistically convincing edge was not demonstrated; neither is proof that none exists. One market, three readings of a rule with many versions.
