# trending-1005 pre-registration amendment, 6 October 2026

Lane z1. Written and committed **before any corrected run on market data**. The original `prereg.md` (commit 48ba0874), `cells.json`, `results.json`, `charts.json`, `RESULTS.md` and every existing `research/hunt2/ledger.jsonl` row stay exactly as they are. Corrections are new files and new ledger rows. Only synthetic-data checks were run before this commit: the unit test in `research/hunt2/harness.test.mjs` and a mechanics smoke test of the three new cells on random-walk bars.

Why: two independent reviews (`docs/audits/2026-10-06-astra-trending-review.md`, `docs/audits/2026-10-06-sol-trending-review.md`) both returned "fix then push". This amendment covers the findings that need a new run. Copy-only findings are fixed on the pages under a dated correction note.

## 1. Random-control defect and fix (harness control v2)

**Defect.** In `research/hunt2/harness.mjs` up to 8ba972a5, `shuffledPositions` shuffled the rule's trades and placed them with gaps that could be zero. Two same-direction copies that landed next to each other merged into one trade, and the exit and re-entry fees between them were never charged. The copies therefore had fewer trades and lower costs than the rule. That broke the promise in `prereg.md` ("the rule's own trades (same lengths, same directions) ... same costs"). Reproduced on synthetic positions: six alternating long/short trades (turnover 12) became five (turnover 10) on some seeds, and the reviewers saw eight alternating trades average 4.87. The bias makes the random copies cheaper than the rule, so it pushes the published random-control percentiles **down**. It hits most where trades are frequent and gaps are short, especially the always-in 9/21 EMA rule.

**Fix (control v2, `CONTROL_VERSION = 2`; see the revision note at the end).** Each copy keeps the rule's trades: same count, same lengths, same directions. They go to random non-overlapping places after the rule's first entry, with at least one flat bar between any two same-direction neighbours. The rule itself always has that bar, because `segments()` would otherwise have merged the two trades. The order is a full random shuffle of the trades, redrawn up to 100 times until its same-direction neighbours fit into the rule's flat bars. A near-always-in long/short rule has too few flat bars for that. Its copies fall back to the rule's own direction order, with lengths shuffled within each direction, which always fits. The share of copies that fell back is recorded as `randomControl.fallbackShare`. Trade count, lengths, directions, signed exposure and turnover (two cost units a trade) then equal the rule's on every seed. The harness checks the trade count on every seed of every asset and throws if it differs. The test case is the reviewers' counterexample. Seeds are unchanged (`0x5eed + s * 7919`, 200 seeds). The portfolio-mode (`rank()`) control did not have this defect and is unchanged. `METRICS_VERSION` stays 2, because CAGR, excess, both bootstraps and the halves are computed exactly as before. Ledger rows and results carry `randomControlVersion: 2` instead.

**Counting rule.** A re-run of the **same source on the same data** under the corrected harness is the same test, not a new one. `computeLedger` now de-duplicates on `sourceSha256|dataSha256`; before, the key also included `harnessSha256`. The later row wins. On the ledger at 8ba972a5 both keys give the same 759 distinct runs (719 after the 40 controls are excluded), so the family size does not change from this rule alone.

**Re-runs under control v2 (cached data only):**

1. All 16 trending-1005 cells, each from its stored source snapshot.
2. Every other signal-mode run that is the latest ledger row for a registry id (controls excluded), from `strategies/<id>.mjs` when its sha256 matches, else from `results/sources/<sha>/<id>.mjs`.
3. Each re-run is appended as a new ledger row **only if** it reproduces the archived row's `dataSha256`, `pExcess` and `cagr` exactly. A row that does not reproduce, or whose data is not cached, is not re-run, and it is counted and listed in the run report.
4. `research/hunt2/random-control-sweep.json` (coin-flip strategies, never ledgered) is regenerated.
5. The registry and the generated site numbers are rebuilt with `npm run research:registry`.

Portfolio-mode rows are not re-run: their control did not change. Other studies that called the same harness (`docs/research/nofee-1004`) are measured for scope and reported, not rewritten here.

## 2. New cells (run once each, after this commit)

Hashes are in `cells-amendment-2026-10-06.json`. Same data, costs, benchmark, 200-seed control v2 and pass bar as the original cells. All three join the published Benjamini-Hochberg family as new tests.

| cell | role | rule | why |
|---|---|---|---|
| `tr5a-ict-asia-sweep-nostop` | variant (ICT) | The archived sweep entry, unchanged. No stop and no target. Flat on the bar that opens at 20:00 UTC, so out at its 21:00 UTC close. One trade a day. | `tr5-ict-asia-sweep-hold` was registered as "no stop or target" but kept the wick stop (`targetR: 0` dropped only the target). That cell is now labelled "wick stop, no target"; its archived result stands under that label. |
| `tr5a-crypto-200dma-30d-matched` | matched re-score of the BTC best-faith cell | `tr5-crypto-200dma-30d`, byte-identical signal, with `meta.warmup: 199`: the first 199 daily bars of each coin are scored for neither the rule nor the benchmark, so both are measured from the first close where the 200-day average exists. | The archived comparison charged the rule for months when its indicator could not exist. In 2017, for example, the benchmark made +339% while the rule could only sit in cash. |
| `tr5a-crypto-golden-cross-matched` | matched re-score of the golden-cross variant | `tr5-crypto-golden-cross` with the same `meta.warmup: 199`. | Same reason. |

`meta.warmup` is a new harness option (signal mode, integer 1 to 2000). It slices each asset's bars and positions after the signals and the lookahead check have run on the full history. The rule still sees all of its history, but only the eligible period is scored, for the rule and the benchmark alike. An asset with fewer than `warmup + 30` bars makes the run throw.

**Verdicts.** The technique verdicts stay tied to the original best-faith cells, as registered. The matched re-scores and the no-stop cell are reported beside the archived cells with their own gate results. If a matched cell passes while its archived cell does not, the article's verdict line must say "passed on the matched window only" and flag it as a likely chance result given the number of tests. No cell may be called an edge.

## 3. Not re-run: label corrections only

These are fixed in the page copy and in `cells-amendment-2026-10-06.json` (`relabel`). The code stays as archived.

- **ORB "2R".** `tr5-orb-utc-1h-2r-cutoff` sets its target at 2x the opening-range width, not 2x the entry-to-stop distance (entry 115 on a 100 to 110 range targets 135: 1.33R). It is relabelled "target 2x the range width". A conventional-2R cell is not registered here.
- **Clock.** Bar timestamps are bar opens and positions change at bar closes. ORB entries on the 01:00 and 02:00 bars execute at the 02:00 and 03:00 closes. ORB and VWAP-reclaim "flat from 23:00" exits happen at the 00:00 UTC close, and the ICT "20:00" exit happens at the 21:00 UTC close. Copy now gives execution times.
- **ICT entry.** The code's "skip a bar that sweeps both sides" only skips a bar that sweeps both sides **and** closes back inside on both. A long entry also needs only a close above the Asia low, not inside the range. The copy now describes what the code does. A corrected-entry cell is not registered here.
- **VWAP.** VWAP is an hourly OHLCV estimate (typical price x volume), not exact traded-price VWAP.

## 4. Descriptive additions (no pass/fail, no new tests)

- The BTCUSDT per-asset numbers (total return vs holding, trades, exposure), read from the per-asset block of the archived and matched runs. A single coin cannot meet the 2-asset bar, so these are descriptive only.
- The archived and the matched 200-day/golden-cross results, side by side.

## 5. Not done, stated as open

- Session-matched random controls (copies restricted to the same hours of day) for the ORB, ICT and VWAP cells.
- Cost sensitivity and next-open/intrabar execution variants.
- Exposure- or risk-matched passive comparisons beyond the warm-up fix.
- A conventional entry-to-stop 2R ORB cell and a corrected-entry ICT cell.
- The 15-minute cash-open ORB and the structure-confirmed ICT model on futures. The harness has no such data; earlier separate studies are quoted with their own scope.

None of these is needed to correct a published claim. Each would be a new pre-registered test.

## 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.

## Revision note, 6 October 2026, before the registered runs

The first commit of this amendment (353c05cb), and the harness commit after it (c929cf98), defined control v2 differently. Every copy kept the rule's own direction order, with lengths shuffled within each direction. A first re-run under that draft covered 22 registry rows and was discarded: no ledger row or result from it was kept. It showed that for long/short rules with spare flat bars, a fixed direction order lets the copies inherit much of the rule's own long/short timing. `social-ta-triple-ema-ribbon`, for example, went from beating 100% of v1 copies to 53%. That made the control too strict in the other direction. The registered v2 is the version described in section 1: a full random order wherever it fits, and the fixed order only where nothing else fits (near-always-in rules). Nothing else in this amendment changed. No trending cell or amendment cell had been run under the draft. Before this revision was committed, the revised control was spot-checked, unledgered, on five rows: four long/short registry rules whose draft numbers had moved (`social-ta-triple-ema-ribbon`, `social-ta-donchian-breakout-20`, `social-ta-heikin-ashi-trend`, `social-ta-adx-di-cross`) and the always-in trending cell `tr5-ema921-1h-both`, the rule most exposed to the defect. Its control-v2 percentile was 97.5% against 19.5% under v1. The design was fixed for the method reason above, before that number was seen, and it was not changed afterwards.

Before any registered run, an unledgered null check was also run on random always-in long/short rules on daily crypto: the fallback path. Its result is in `control-v2-null-check.json`.
