# Noise Area Breakout on YM (E-mini Dow futures), Asia, London and New York sessions - specification (RIP Backtest protocol v1.0 plus the 8 Oct 2026 rules)

Specification written and **frozen 2026-11-07 (approved by the owner the same day, "Da, îngheață și rulează"; draft 1 unchanged)**, before any noise-area band, signal or trade was computed on YM.

## The idea and why it was chosen
- The owner picked this test on 2026-11-07 ("Noise area pe YM") from three proposals.
- It is a replication. The noise area breakout on NQ, New York session, is the only day-trading strategy on the site that passed all six gates: NA-NQ-NY-LS and NA-NQ-NY-L. It is being tested forward since 12 Oct 2026.
- On ES the same rules did not pass: NY-LS and NY-L made money but were Buried. On gold and Bitcoin no variant passed either. The Asia and London sessions were Buried on every market, and most of them lost money.
- YM is chosen after seeing those results. A replication is meant to be: a fifth market, with the rules unchanged.
- The rule comes from Zarattini, Aziz and Barbon (2024).

## Rules: exactly those of `na_spec.md` (frozen 2026-10-11), unchanged
- **Sessions** (local exchange time with the real daylight-saving rules):
  - Asia: 09:00-15:00 Tokyo;
  - London: 08:00-16:30 London;
  - New York: 09:30-16:00, or the exchange's earlier close (calendar of `rb_lib.js`, as for ES and NQ).
- **Bands:** sigma(m) = the mean |close at m / open - 1| over the previous 14 sessions, with at least 10 needed.
  - upper band = max(open, previous close) x (1 + sigma);
  - lower band = min(open, previous close) x (1 - sigma).
- **Timing:** checkpoints every 30 minutes from 30 minutes after the open, the last one at least 30 minutes before the close. Decisions use the checkpoint close; fills happen at the next minute's open.
- **Entry:**
  - above the upper band: buy;
  - below the lower band: short (long and short variants only).
- **Exit and flips:**
  - trailing stop at max(upper band, VWAP) for a long, min(lower band, VWAP) for a short, checked at the checkpoints;
  - a stop can flip to the opposite position at the same fill;
  - everything is closed at the session close.
- **VWAP:** from the session open, typical price, real contract volume.
- **Variants:** LS and L per session. That gives **6 variants**: NA-YM-AS-LS, NA-YM-AS-L, NA-YM-LD-LS, NA-YM-LD-L, NA-YM-NY-LS, NA-YM-NY-L.
- The readings at the top of `na_lib.js` apply as written (the previous close at most 4 days older, flips only, fills, sigma count, VWAP with no volume).

**Replication check, stated before the run:** the NQ result counts as replicated on YM only if **NA-YM-NY-LS or NA-YM-NY-L passes all six gates**. The four Asia and London variants are reported as on the other markets.

## Data and costs
- **Data file:** `YM_1min.csv` (YM DEC26, NinjaTrader "merge back adjusted", real volume, New York clock).
  - sha256 `e434dac407685f409016014e137022bf21748624b2c1d765bea7d1860ad1a2e4`, the file of the YM trendline and Sneaky Pivot tests.
  - Cut at **2026-09-25 17:00 New York**, like the noise-area tests on ES and NQ. The later bars stay unused.
  - The bands are ratios to price, so back-adjustment distorts older prices slightly (stated, as for ES and NQ).
- **Contract:** $5 a point, tick 1 point.
- **Costs:** **$15.76 per round trip** ($5.76 commission plus one tick of slippage on each fill), as in every YM test. A flip pays two round trips.
  - For information only, not a gate: the averages with two ticks of slippage per fill ($25.76).
- **Holes (rule 3):** `data_holes_ym.json` (cut 2026-09-25 17:00; 30 holes). Sessions touching a hole are counted, and every gate and verdict is recomputed without them.

## Periods, gates, control (as for ES and NQ)
- **Periods by trade date:**
  - development 2020-2023;
  - validation 2024-01 to 2025-03;
  - holdout 2025-04 to 2026-09.
  - The holdout was **already used** on this file, by the trendline and Sneaky Pivot tests (other strategies). No noise-area number on YM has been seen.
- **Six gates per variant**, in dollars per contract:
  1. validation profit factor >= 1.2;
  2. at least 50 trades in each period;
  3. development **t >= 2.5**, the same bar as for the 18 noise-area variants on ES, NQ and gold;
  4. above the 95th percentile of the control;
  5. positive without the 10 best trades;
  6. holdout net positive (flagged as used).
  
  A variant with fewer than 30 trades is Inconclusive.
- **Control:** each session-day's first entry (checkpoint and direction) is moved, with all days together, by one random circular offset of at least 5% of the sessions. On the new day it is managed by the same exit rule and costs. 500 runs, seeds 1000 + run.

## Engine and self-test (before the run)
- **No new engine:** `na_lib.js` and the independent `na_ref.js` are used unchanged. The `na_lib.js` sha256 `6f47edc2...` is pinned by the NQ forward test, so it must not change.
- **The YM market** is defined in the run script: $5, $15.76, the cut and the periods above.
- **Two self-tests must pass on the current code before the run:**
  - `na_selftest.js`, the existing one;
  - a new `na_ym_selftest.js`. It checks:
    - the YM data (bars, range, share of minutes with volume);
    - the New York sessions and their early closes against the holes file (13:00 x46, 13:15 x12);
    - that the engine and the independent re-implementation agree trade by trade on all 6 YM variants;
    - that the control at offset 0 reproduces the real trades.
    
    It prints no result.
- **The run script** `na_ym_run.js` refuses to run unless both self-tests passed on the current code and this specification is frozen.

## Before the article
- Results go to the owner first.
- Then one article (noise area breakout on YM), published only with the owner's agreement.
- The article would also be added to the day-trading guide (30 tests of 22 strategies), with a dated note there and in the NQ and ES noise-area posts.

### Run log
- 2026-11-07: frozen. sha256 of this file above the "### Run log" heading: c2741a120903f0939c501b357d9cabad223ac3ce1f16a082d7f7f5b813d6ca23.
- 2026-11-07: na_ym_selftest.js PASSED on its first run (engine = independent re-implementation on all 6 variants, 0 differences). na_ym_run.js -> na_ym_out/: all 6 variants Buried (NY-LS 1/6, NY-L 1/6, AS-LS 1/6, AS-L 2/6, LD-LS 2/6, LD-L 2/6). The replication check stated above failed: neither New York variant passed. No rule was changed.
- 2026-11-07: the owner asked for the article and its upload ("da scrie-l si urca-l cu tot"). Published from the outputs of the single run, unchanged, and added to the day-trading guide.
