Navigation
DashboardThree-Axis ProbesShared ArtifactsRotation mechanism

finding · mql5/findings/forex_shared_data/ROTATION-MECHANISM.md

The slice rotation mechanism

A coverage-ledger-driven, deficit-first engine that tests whether a candidate feature is orthogonal (and non-redundant vs siblings) across every market condition a feature must survive in — not just one calendar window.

In plain English. Don't test a new indicator only on "January 2024." Enumerate every kind of market — quiet vs wild, Asian vs European session, up- vs down-trending — and keep hammering on whichever combination has been tested least until they've all been covered enough times. That's the rotation engine.

1. The problem it solves

The two naive approaches both fail:

The rotation mechanism replaces both with a coverage-ledger-driven, deficit-first loop.

2. The stratum grid (built once)

A stratum is one cell of:

asset_class × symbol × threshold × vol(low/mid/high) × session(Asian/US-EU) × trend(up/flat/down)

Base cells (symbol × threshold) = 19 forex + 62 crypto = 81, each expanded by up to 3 vol × 2 session × 3 trend = 18 strata.

3. Why stratify on value-rows, not bars

Kernels need a contiguous 200-bar causal window (de-gap respected, no look-ahead). Restricting the input bars to one regime would shatter that window. So: fetch the contiguous series once, compute the candidate matrix (each value sees a proper trailing window), attach the regime label to each output value-row, and a stratum's data = the value-rows whose label matches. The kernels always see clean causal windows; stratification happens on the outputs.

4. The rotation loop (per batch, resumable)

read coverage ledger
  → deficit[s] = target_N − paths_done[s]   for every FEASIBLE stratum s
  → pick the K strata with the LARGEST deficit  (least-covered first)
  → for each picked stratum:
       pull its REAL value-rows
       stationary block-bootstrap resample (Politis–Romano; preserves local autocorrelation)
       FUSED PASS:
         candidate × production : Spearman |ρ|  +  Chatterjee ξ   (orthogonality)
         candidate × candidate  : Leave-out R²  +  max |Spearman| (redundancy / siblings)
       paths_done[s] += 1 ; append per-path result ; persist ledger

Loop batches until every feasible stratum reaches target_N (default 20). At 750-threshold crypto cells (spearman-only tier) ξ is skipped — too few bars per slice for a reliable conditional metric; Spearman still runs.

Coverage is provable, not hoped-for. Because the loop always attacks the least-covered stratum and records every path in the ledger, you can prove from the ledger that every reachable regime was tested N times — and every infeasible stratum (<40 value-rows) carries an explicit reason. No silent drift, no unexplained divergence.

5. The engine

All of the above is implemented in rotating_slice_orthogonality_probe.py — one byte-identical engine shared with the crypto hub, invoked with --asset forex or --asset crypto. See the probes page for the engine + the three-axis gate probes, and the overview for scope and run recipes.