Skip to content

docs(experiments): build the §80.16 independence harness; measure cross-asset - #188

Merged
eaitbrahim merged 2 commits into
mainfrom
docs/between-family-independence-harness
Aug 8, 2026
Merged

docs(experiments): build the §80.16 independence harness; measure cross-asset#188
eaitbrahim merged 2 commits into
mainfrom
docs/between-family-independence-harness

Conversation

@eaitbrahim

@eaitbrahim eaitbrahim commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What

research/independence.py has implemented §80.16's five measurements since PR #103, but nothing in the repo drove them over two real rules. The 2026-07-20 cross-horizon run was ad hoc and left no script behind, so every future between-family question started from zero. This adds the script, plus its write-up and three diagnostic_only ledger rows.

Three passes

pass varies mean P&L corr (closed) outcome
between-family (turtle vs rsi_meanrev) rule family degenerate, arm B never trades
cross-horizon (40/20 vs 80/40) lookback 0.508 reproduces PR #103 exactly
cross-asset (turtle vs itself, other asset) the underlying 0.011 the finding

The between-family pass is degenerate, not low. On daily bars rsi_meanrev takes zero trades on all five allowlisted assets — oversold=20 on a daily RSI(14) is near-unreachable (PAXG and XLM never print one). Arm B is settled-refuted anyway (§74.3), so it could never have tested candidacy; it is a shakedown.

The calibration is why the rest is trustworthy. BTC 0.802, ETH 0.934, median entry gap 0 days — exact reproduction of 2026-07-20-horizon-independence.md. It also settles which P&L convention PR #103 used, which that write-up never states: closed reproduces the published figures; mark-to-market gives 0.813 / 0.759.

Cross-asset is the finding. 0.011 / 0.175 / 0.144 against cross-horizon's 0.508 / 0.585 / 0.510, same method, same assets. Asset breadth is roughly an order of magnitude better than horizon breadth as a source of independent evidence. §79.1 redirected the frequency plan to breadth without saying which; this says which. PAXG stands out — zero Jaccard against ETH, ADA and XLM.

This also tests an assumption 2026-07-20-minbtl-sizing.md's allowlist case rested on: that added assets multiply trades/year roughly linearly, true only if those trades carry independent information. At the measured correlations they largely do.

Confidence

Arm A reproduces the shipped trade counts exactly (13/13/4/6/8), so the harness is wired to the real rule. Correlations rest on 4–13 trades per asset with no confidence intervals — the direction is far more robust than any individual cell. Caveats are in the write-up, including that this window had crypto broadly trending together (§79.16).

Ledger

Three rows, all diagnostic_only / a_priori, keel trials verify → chain intact. M 69 → 72, N_decisions unchanged at 30, so MinBTL is untouched. The cross-asset ρ̄ is deliberately not substituted into §78.2's , which corrects a trials count and is a different quantity.

Scope

⚠️ Corrected after merge. This section originally read "docs/experiments/ only — no library code, no config, no rule, no gate." That was true when written and false at merge: a second commit was pushed to this branch before it squashed, so a code change shipped inside this PR. Corrected here rather than left to mislead, because scripts/release_notes.py inlines this body into the 0.5.6 release notes.

The research half is docs/experiments/ only. ruff clean; docs/ is outside the project's mypy scope (files = ["packages", "keel", "tests"]), matching the existing 2026-08-05-coinbase-asset-class-probe.py.

Also shipped in this PR — fix(assets): the discovery pre-filter now measures what the gate measures

assets discover pre-filtered on the venue's reported 24h quote volume; assets screen admits on the median of volume × close over cached history. Same units, different statistics, and the gap changes outcomes in both directions:

  • BICO was shortlisted on a reported $12.81M/24h, then rejected by the screen at a median daily volume of 108,004 — 9× under the floor, a 227× gap.
  • DOGE was nearly dropped for sitting 1.7% below the $5M discovery floor when, on the admission criterion, it is ~30× above it.

screen.median_daily_quote_volume is now the single definition of the statistic — cli._market_facts had it inline, and a second copy next to discover would drift, which is the bug. assets discover --probe-liquidity samples 180 days of daily candles per candidate (one extra request, same cost model as --probe-history) and marks LOW/ok against the same floor screen_asset applies.

Against the live venue it catches BICO (36,137) plus two the old filter passed through: IMU (71,713) and GWEI (440,864) — three of the top fourteen by 24h volume are sub-floor on the real criterion.

An estimator, not a verdict, and the output says so: 180 days recent vs the screen's full cached history. ZEC probes 33.1M against a full-history median of 1.23M — a 27× spread from a recent surge. ok means "worth pulling candles for", never "will be admitted". No behaviour change to the gate: same criterion, same floor, same verdicts. Tests: 2137 passed, ruff and mypy clean.

🤖 Generated with Claude Code

eaitbrahim and others added 2 commits August 8, 2026 19:10
…ss-asset

`research/independence.py` has implemented §80.16's five measurements since PR #103, but nothing
in the repo drove them over two real rules -- the 2026-07-20 cross-horizon run was ad hoc and left
no script behind, so every future between-family question started from zero. This adds the script.

Three passes, in increasing order of what they settle:

- BETWEEN-FAMILY (turtle vs rsi_meanrev) -- degenerate. On daily bars rsi_meanrev takes zero
  trades on all five allowlisted assets: `oversold=20` on a daily RSI(14) is near-unreachable
  (PAXG and XLM never print one), and the handful that fire on BTC/ETH/ADA die at the
  support-level gate. Not a low correlation -- no relationship to measure. Arm B is settled-refuted
  anyway (§74.3), so this pass could never have tested its candidacy; it is a shakedown.

- CROSS-HORIZON (40/20 vs 80/40) -- the calibration, and the reason to trust the rest. Reproduces
  `2026-07-20-horizon-independence.md` exactly: BTC 0.802, ETH 0.934, median entry gap 0 days.
  It also settles which P&L convention PR #103 used, which that write-up never states: `closed`
  reproduces the published figures, mark-to-market gives 0.813/0.759. Future §80.16 tables should
  stay on `closed` for comparability.

- CROSS-ASSET (shipped turtle vs ITSELF on another asset) -- the finding. Mean P&L correlation
  0.011, position 0.175, Jaccard 0.144 across 10 pairs, against 0.508/0.585/0.510 for cross-horizon
  measured the same way on the same assets. Asset breadth is roughly an order of magnitude better
  than horizon breadth as a source of independent evidence. §79.1 redirected the frequency plan to
  breadth without saying which; this says which. PAXG is the standout -- zero Jaccard against ETH,
  ADA and XLM, negative position correlation against all four cryptos.

This also tests an assumption `2026-07-20-minbtl-sizing.md`'s allowlist case rested on: that added
assets multiply trades/year roughly linearly, which only holds if the added trades carry
independent information. At the measured correlations they largely do.

Arm A reproduces the shipped trade counts exactly (13/13/4/6/8), so the harness is wired to the
real rule. Correlations rest on 4-13 trades per asset and carry no confidence intervals -- the
direction is far more robust than any individual cell; caveats are in the write-up.

Ledger: three rows, all `diagnostic_only` / `a_priori`, chain verified intact. M 69 -> 72,
N_decisions unchanged at 30, so MinBTL is untouched. The cross-asset rho-bar is deliberately NOT
substituted into §78.2's N-hat, which corrects a trials count and is a different quantity.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ures

`assets discover` pre-filters on the venue's reported 24h quote volume; `assets screen` admits on
the median of `volume * close` over cached history. Same units, different statistics -- and the
gap is large enough to change outcomes in both directions.

The 2026-08-08 sweep shortlisted BICO on a reported $12.81M/24h. The screen then rejected it at a
median daily volume of 108,004 -- 9x under the floor, a 227x gap between the two numbers. The same
sweep nearly dropped DOGE for sitting 1.7% below the $5M discovery floor, when on the admission
criterion it is ~30x ABOVE it. The pre-filter could not see either, because it was measuring a
one-day snapshot of a quantity the gate medians over five years.

- `screen.median_daily_quote_volume` is now the ONE definition of the statistic. `cli._market_facts`
  had it inline; a second copy next to `discover` would drift, and the symptom of that drift is
  exactly the bug being fixed here.
- `assets discover --probe-liquidity` samples 180 days of daily candles per candidate (one extra
  request, same cost model as `--probe-history`), computes that same statistic, and marks it
  LOW/ok against `ScreenPolicy.min_median_daily_volume` -- the same floor `screen_asset` applies.

Against the live venue it catches BICO (36,137, LOW) plus two the old filter would have passed
through: IMU (71,713) and GWEI (440,864). Three of the top fourteen by 24h volume are sub-floor on
the real criterion. DOGE probes 14,643,369 -> ok.

It is an ESTIMATOR, not a verdict, and the output says so: 180 days recent vs the screen's full
cached history. ZEC probes 33.1M against a full-history median of 1.23M -- a 27x spread from a
recent surge. `ok` means "worth pulling candles for", never "will be admitted"; the gate still
decides. A recent window also makes a false LOW unlikely for a currently-active asset, which is
the safe direction for a pre-filter.

No behaviour change to the gate itself: same criterion, same floor, same verdicts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@eaitbrahim
eaitbrahim merged commit 9dcccad into main Aug 8, 2026
1 check passed
@eaitbrahim
eaitbrahim deleted the docs/between-family-independence-harness branch August 8, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant