Skip to content

docs: Disaggregated is an exact split of the Legacy buckets - #134

Draft
mspinola wants to merge 1 commit into
mainfrom
docs/disagg-legacy-exact-split
Draft

mspinola wants to merge 1 commit into
mainfrom
docs/disagg-legacy-exact-split

Conversation

@mspinola

Copy link
Copy Markdown
Owner

Why

docs/design/cross-report-comparability.md covered Legacy against TFF only (just open interest and non-reportable carry). A consumer (npf, 2026-11-25) generalised that to Disaggregated, which is wrong: on the same basis Disaggregated is an exact re-partition of the Legacy buckets.

What

New §3 Disaggregated against Legacy: an exact split, to the contract (old §3-§6 become §4-§7, internal references updated):

  • Prod_Merc + Swap + Swap spread = Legacy Comm (long and short), M_Money + Other_Rept = Legacy NonComm (long, short and spreading), OI and non-reportable identical.
  • Measured on all 28 registry markets with a Disaggregated series, futures-only, 2006-06-13 to 2026-11-17, 29,562 market-weeks: 100.00% of weeks, residual 0, on 27 markets. RB 98.97%: 11 weeks of June-August 2006 where get_cot's Legacy stitch keeps the predecessor 111652 (larger OI on overlap weeks) while Disaggregated has RBOB alone. Against RB_111659 alone every identity holds on all 11.
  • Legacy non-commercial spreading is the closure residual (the store's Legacy table has no spreading column).
  • Trader counts do not add (0% in CL, NG, GC, HG, SI, WBS, at most 61%). Use positions.
  • Combined basis: OI and non-reportable exact. Bucket identities close only to option-delta rounding, at most 2 contracts (LBR 8 = 2 at its 4.0 hist_codes scale).
  • §1 rule, §2 consequence and §6 "what this permits" narrowed so they no longer read as covering every pair of reports.

No other cotdata doc or cotdata.cit says detailed groups never sum to Legacy (ADR-0002's Supplemental-vs-Swap-Dealer point is a different pair and still holds).

Reproducer

COTDATA_STORE=~/code/cotdata_store python scripts/disagg_legacy_split.py
COTDATA_STORE=~/code/cotdata_store python scripts/disagg_legacy_split.py --combined

Reads only, through get_cot and store.read_cot_legacy. The store is not touched. ruff check src tests scripts is clean.

🤖 Generated with Claude Code

cross-report-comparability.md only covered Legacy against TFF (two
quantities carry), and a consumer generalised that to Disaggregated.
New section 3 records the opposite case, measured on all 28 registry
markets with a Disaggregated series, futures-only, 2006-06-13 to
2026-11-17: producer + swap (swap spread on both sides) equals Legacy
commercial, managed money + other reportable equals Legacy
non-commercial, including spreading (derived as the closure residual,
since the store's Legacy table has no spreading column), 100% of weeks
on 27 markets. RB fails 11 weeks of 2006 because get_cot stitches the
predecessor 111652 on overlap weeks; against RB_111659 alone it holds.
Trader counts do not add; on the combined basis the identities close
to 2 contracts (option-delta rounding).

Renumbers sections 3-6 to 4-7 and narrows the "anything above the
reportable line" rule accordingly. Reproducer:
scripts/disagg_legacy_split.py (--combined for the other basis).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

No deployments
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