# Initial Balance breakout on ES 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 on ES. 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 sa-l facem si pe es"), right after the NQ test of the same rules was published.
- **A replication, not a new idea.** The rules are those of `ibb_spec.md` (NQ, frozen 2026-10-21) **unchanged**: same hours, same three variants, same gates. On NQ all three were buried; IB-X1 and IB-CLOSE were positive and beat the control (percentile 97.2 and 95.4) but failed the validation profit factor and the development t. We have seen those results, so nothing on ES is tuned: no variant is dropped or added, no filter, no other stop or target. The question is only whether the same rules hold on a second index.
- **Not independent of NQ (disclosed):** ES and NQ move together on most days, so a similar ES result is weaker evidence than a result on an unrelated market would be. Equally, a failure on ES does not undo the NQ control result.
- **Looked at before on ES (disclosed):** our published VWAP, Fibonacci scalping, noise area breakout and intraday momentum tests on ES; **not published, without a protocol:** opening range breakouts of 5, 15 and 30 minutes and the owner's ORB with fair value gaps on ES (September 2026), no edge. Same family, so the bar stays raised (t >= 2.5).

## Instrument and data
- **ES** (E-mini S&P 500 futures), `ES_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 futures tests (`rb_lib.js`) for the session and early closes. **$50 a point**, tick 0.25 ($12.50).
- **Initial Balance:** the 60 bars from 09:30 to 10:30 (stamped 09:31 to 10:30): IB high, IB 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.

## Rules (identical to the NQ test; 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 and the trade is stopped in that bar if its stop is also inside it. **No entry after 13:30.**
- **IB-X1:** stop 1 tick beyond the other side of the IB; target the breakout level plus one IB size (1x extension).
- **IB-MID:** stop at the IB midpoint; the same 1x extension target.
- **IB-CLOSE:** stop 1 tick beyond the other side; no target.
- **All variants:** a trade still open closes at the session close (16:00, or the 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.
- The readings at the top of `ibb_lib.js` apply unchanged.

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

## Periods, gates, control (as in the NQ test)
- **Periods (by trade date):** development 2020 to 2023; validation 2024-01 to 2025-03; holdout 2025-04 to 2026-09-25 (**already used** by our earlier ES tests).
- **Six gates per variant** (net dollars per contract): validation profit factor >= 1.2; at least 50 trades in each period; development **t >= 2.5**; 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%), to the same minute of the session on another day, same direction, the same stop and target distances in points, same session-close exit and costs. 500 runs, seeds 1000 + run.
- **Rule 3:** recomputed without trades on days touching a known ES data hole (`data_holes.json`).
- **Also reported:** IB size by year; how often the high, the low or neither is broken by 13:30; win rate with its Wilson interval; exits by reason; long and short; by year; by IB size (descriptive); and, descriptive only, the day-by-day agreement with the NQ trades (same day, same direction).

## Engine and self-test (before the run)
The NQ engine with ES point value, cost, data file and holes (`ibbes_lib.js`, `ibbes_ref.js`), leaving the published NQ files untouched; `ibbes_selftest.js` must pass before any result is printed: the hand-worked days of the NQ self-test re-priced at $50 a point and $30.76, the reference matched trade by trade on the ES data for all three variants, the control at offset 0.

## Before the article
Results go to the owner first. One article for ES (one market per post), linked both ways with the NQ post, published only with the owner's agreement. Working title for search: "Initial Balance Breakout on ES Futures: Does It Hold Up on the S&P 500?".

## Reading the result
"Buried" or "Inconclusive" mean a statistically convincing edge was not demonstrated; neither is proof that none exists. A pass on ES would be a pass on a market closely tied to NQ, not an independent confirmation.
