# trending-1005 pre-registration amendment B, 6 October 2026 (random control v3)

Lane c1. Written and committed **before any registered rule, trending cell or ledger row was run under the new control**. `prereg.md`, `prereg-amendment-2026-10-06.md` (amendment A, control v2), every result file and every existing ledger row stay as they are. Corrections are new files and new ledger rows.

## 1. The defect in control v2

Amendment A logged an open problem: coin-flip strategies (`research/hunt2/random-control-sweep.json`, never ledgered) beat 95% of their own random copies 46 times in 300 under v2, against about 15 expected. US stocks carried most of it: 27 of 100 at or above 95% and 38 of 100 under 5%. Both tails were too fat, so the copies were too narrow, not shifted.

**Root cause: shared timing across correlated assets.** The harness loads a fresh copy of the strategy module for every asset, so the sweep's seeded coin flip restarts on each one and gives every asset the same position at the same bar index. All 40 US stocks start on 2016-09-14 with 2,136 or 2,137 bars, so their positions are identical in calendar time: one market-timing bet placed 40 times. Control v2 placed each asset's trades at random spots **independently per asset**. That spreads one coherent bet across 40 unrelated timings, which diversifies most of the timing risk away. The copies' spread is then far narrower than the rule's, and the rule lands in a tail far too often, in both directions. ETFs (3 distinct start dates, mostly aligned) were affected less, and crypto (18 start dates) least.

This is not limited to coin flips. Any rule whose signals agree across correlated assets (a trend or crossover rule on 40 large caps or 8 crypto pairs) has the same shared timing, and v2 compared it with copies that did not.

**Evidence (coin-flip rules only, cached discovery data, fast replica of `runSignalMode` that reproduces the sweep's percentiles exactly on 12 of 12 checked rows):**

| coin flips (100 per class) | control | crypto at or above 95% / under 5% | ETFs | US stocks | all 300 at or above 95% |
|---|---|---|---|---|---|
| same timing on every asset (the sweep) | v2 | 10 / 8 | 9 / 12 | 27 / 38 | 46 (15.3%, 95% CI 11.7 to 19.8) |
| own timing per asset | v2 | 4 / 2 | 3 / 4 | 5 / 8 | 12 (4.0%, CI 2.3 to 6.9) |

v2 is calibrated when timing is independent per asset and badly miscalibrated when it is shared. That isolates the cause.

**Other hypotheses checked and rejected.** Drift: a drift mismatch would push one tail, not both (US stock mean percentile 0.434 with both tails inflated). Non-trading days, overnight gaps and session boundaries: copies are placed in bar index, so they never sit on a non-trading day, and the per-asset version on the same bars is calibrated. Fees and turnover: v2 matches turnover exactly. Ties: the statistic is continuous. Too few copies: 200 copies resolve 0.5% steps, and the excess is about five times nominal. Survivorship in the stock list: it biases the rule and its copies alike, so it cannot fatten both tails, and the per-asset run on the same 40 names is calibrated.

## 2. Fix: control v3 (`CONTROL_VERSION = 3`)

Each copy is the rule's **own position series rotated in time**, with **one shift per copy shared by every asset**:

- Seeds unchanged: 200 copies, seed `0x5eed + s * 7919`. The first draw of each seed's generator gives `u`, uniform on [0.05, 0.95]. The shift is `tau = u * S`, where `S` is the median, across the assets the rule traded, of the time from the asset's first entry to its second-to-last bar.
- Each asset rotates inside its own window, from its first entry to its second-to-last bar (L bars). The rule's bar `first + j` moves to `first + ((j + k) mod L)`, where `k` is the number of window bars in the last `tau mod span` seconds (span = that asset's window length in seconds). Nothing is placed before the first entry, and the last bar is flat, as in v2.
- Kept exactly: exposure (signed and absolute), every position value, the order of trades and the gaps between them, and the calendar alignment between assets wherever neither asset's copy has wrapped. Two assets with the same calendar and the same positions get identical copies.
- Not kept exactly: the wrap seam can split one trade or join two, so the trade count moves by at most one per asset (turnover by at most two cost units per asset). The harness throws if any copy differs by more.
- The statistic, the percentile (share of copies strictly below), the Sharpe percentile and the 95% gate are unchanged. `METRICS_VERSION` stays 2. Portfolio-mode controls are unchanged (they already keep the rule's rebalance dates and draw names at random). `harness-battery.mjs` is a separate harness and is not changed here.

**Design choices made before this commit, on coin-flip nulls only** (no registered rule, cell or ledger row was evaluated under any v3 draft):

| v3 draft (same replica, 100 coin flips per class) | same timing, at or above 95% | under 5% | own timing, at or above 95% | under 5% |
|---|---|---|---|---|
| shift range = shortest window | 22 / 300 (7.3%, CI 4.9 to 10.9) | 13 | 10 / 300 (3.3%, CI 1.8 to 6.0) | 12 |
| shift range = median window (registered) | 21 / 300 (7.0%, CI 4.6 to 10.5) | 13 | 7 / 300 (2.3%, CI 1.1 to 4.7) | 14 |

The median was chosen over the shortest window for robustness, not for its numbers (they are within noise): one late-listed asset would otherwise shrink every shift for the whole basket. A synthetic end-to-end check through `evaluate()` (40 random-walk assets with one common factor, no market data, 60 coin flips each way) gave: same timing, v2 13 of 60 at or above 95% and 30 of 60 under 5%, v3 2 and 1; own timing, v2 2 and 2, v3 3 and 1. A 300-rule crypto-only check of the same-timing sweep gave 19 of 300 at or above 95% under v3 (6.3%, CI 4.1 to 9.7) against 22 under v2.

## 3. Registered calibration (run after this commit)

1. `research/hunt2/random-control-sweep.json` regenerated through the real harness: 300 same-timing coin flips, unchanged seeds and flip rates.
2. A second sweep, `research/hunt2/random-control-sweep-per-asset.json`: the same 300 rules, each asset seeding its coin flip from its symbol, so timing is independent per asset.

Pass bar: in each sweep the share at or above 95% and the share under 5% each have a 95% Wilson interval that contains 5%. The result is reported whether or not it passes. If it fails, the control is not changed again under this amendment; the failure is published as a caveat on every random-copy percentile.

## 4. Re-runs (cached data only), same procedure as amendment A

1. Every signal-mode registry run whose latest ledger row is not v3 (controls excluded), from its stored source, appended as a new ledger row only if it reproduces the archived `dataSha256`, `pExcess` and `cagr` exactly. Report: `research/hunt2/control-v3-rerun.json`. The counting rule from amendment A applies: same source on the same data is the same test, so the FDR family does not grow.
2. The 16 trending cells and the 3 amendment-A cells are measured into new files `results-amended-2026-10-06b.json`, `charts-amended-2026-10-06b.json` and `RESULTS-amended-2026-10-06b.md`. The amendment-A files stay as they are.
3. Registry and site numbers rebuilt with `npm run research:registry`. Pages give the archived (v1), amendment-A (v2) and current (v3) copy counts where they moved, under a dated correction.

The verdicts stay tied to the pre-registered gates. The random-copy percentile is one gate among several; no cell may be called an edge, and a cell that newly clears 95% is reported as clearing one gate, not as a finding.

## 5. Still open

Session-matched copies for intraday rules (v3 rotates by an arbitrary number of hours, as v1 and v2 moved trades to arbitrary hours). Cost sensitivity and execution variants. Both as listed in amendment A.

## Data rules (unchanged)

Cached discovery data only (bars closing before 2025-03-15), discovery-bucket assets only, network blocked in the runners, no Databento call of any kind, no holdout file opened. Disclosure: before the cache was copied into this lane's worktree, a first replica attempt found no cached bars there and the data layer began re-downloading public daily bars (Nasdaq and Binance, not Databento). That run was killed before it computed anything, the downloaded files were deleted, and every number above comes from the canonical cache (byte-identical to `edge/research/hunt2/cache`).
