From 68d368e20f6b0dd94d3340f60e7dce5335746248 Mon Sep 17 00:00:00 2001 From: Matt Spinola Date: Tue, 4 Aug 2026 11:42:46 -0400 Subject: [PATCH] registry: add ZR (rough rice) and WBS (ICE Europe WTI) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two codes of crowdmon's contract-spec backlog that Norgate actually carries. crowdmon's handoff docs/handoffs/2026-08-03-spec-backlog-producer.md asked for six; its §4 required confirming vendor coverage first, and the vendor catalogue says two. Norgate's entire energy universe is eight contracts, four already covered here, and the only Henry Hub row is NG, which is 023651. The four Henry Hub codes are vendor-absent and stay in the backlog with no proxy substituted, per that handoff's §4. The entries are the precondition for the producer run rather than a consequence of it: norgate.get_symbol_metadata resolves REGISTRY[internal].norgate + "_CCB", so an unlisted symbol is a KeyError before any fetch. WBS is not a duplicate of CL. Open interest tracks it at 0.771, which is what makes it look like one, but Managed Money net is negative and flow correlation is near zero, so it is a different holder base (crowdmon docs/design/amendments-2026-08-03.md §C15). ZR is the smallest of ten ag candidates and the strongest on the criterion that decides, Managed Money share 0.433 against a covered median of 0.137 (§C17, decision in §9 of the handoff). Three guards fired and all three are updated deliberately: the two len(all_symbols()) == 49 pins, and the golden identity checksum, which exists precisely so that adding a symbol cannot be accidental. Co-Authored-By: Claude Opus 5 --- src/cotdata/registry.yaml | 13 +++++++++++++ tests/test_registry.py | 10 +++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/cotdata/registry.yaml b/src/cotdata/registry.yaml index 84f91a9..038154a 100644 --- a/src/cotdata/registry.yaml +++ b/src/cotdata/registry.yaml @@ -50,6 +50,13 @@ Energies: cftc_code: "022651" NG: cftc_code: "023651" + # Added 2026-08-04 for crowdmon's contract-spec backlog. NOT a duplicate of CL: open + # interest tracks it (0.771) but Managed Money net is negative and flow correlation is + # near zero, so it is a different holder base (crowdmon + # docs/design/amendments-2026-08-03.md §C15). Norgate carries it as &WBS. + WBS: # WTI Crude Oil (ICE Futures Europe) + cftc_code: "067411" + databento: null # ICE product — not on GLBX.MDP3 Grains: ZC: @@ -62,6 +69,12 @@ Grains: cftc_code: "007601" ZW: cftc_code: "001602" + # Added 2026-08-04 for crowdmon's contract-spec backlog: the smallest market of the ten + # candidates and the strongest on the criterion that decides, Managed Money share 0.433 + # against a covered median of 0.137 (crowdmon docs/design/amendments-2026-08-03.md §C17, + # decision in docs/handoffs/2026-08-03-spec-backlog-producer.md §9). + ZR: # Rough Rice (CBOT) + cftc_code: "039601" # Held-out generalization grains (new symbols, never in the deploy selection). ZO: # Oats (CBOT) cftc_code: "004603" diff --git a/tests/test_registry.py b/tests/test_registry.py index 072352d..9987c02 100644 --- a/tests/test_registry.py +++ b/tests/test_registry.py @@ -17,7 +17,7 @@ # ── loading & basic shape ──────────────────────────────────────────────────── def test_registry_loads_all_symbols(): symbols = all_symbols() - assert len(symbols) == 49, f"Expected 49 symbols, got {len(symbols)}" + assert len(symbols) == 51, f"Expected 51 symbols, got {len(symbols)}" def test_basic_symbol_loading(): @@ -80,7 +80,7 @@ def test_by_asset_class(): # ── hashability (frozen dataclass must stay hashable, incl. scaled hist_codes) ─ def test_symbols_are_hashable(): # Would raise TypeError: unhashable type 'list' if hist_codes held a list. - assert len(set(all_symbols())) == 49 + assert len(set(all_symbols())) == 51 assert symbol("LBR") in {symbol("LBR")} hash(symbol("LBR")) # scaled hist_codes — the tricky one @@ -247,5 +247,9 @@ def test_golden_identity_checksum(): (registry.yaml carries FIXED identity only; unintended drift is a bug).""" ident = sorted((s.internal, s.cftc_code, s.asset_class) for s in all_symbols()) digest = hashlib.md5(repr(ident).encode()).hexdigest() - assert digest == "e6b0b92caa0f25f68dea62024bddf899", ( + # Updated 2026-08-04 for a deliberate addition: ZR (rough rice, 039601) and WBS + # (ICE Europe WTI, 067411), the two codes of crowdmon's contract-spec backlog that + # Norgate actually carries. Previous value e6b0b92caa0f25f68dea62024bddf899, over 49 + # symbols. + assert digest == "3dd3df8eb26d850654107e16568cddb6", ( "registry identity facts changed; update the expected checksum if intended")