Skip to content

registry: add 5 held-out generalization markets (Milk, Oats, KC Wheat, MidCap, Nikkei)#21

Merged
mspinola merged 1 commit into
mainfrom
feat/heldout-markets
Jul 16, 2026
Merged

registry: add 5 held-out generalization markets (Milk, Oats, KC Wheat, MidCap, Nikkei)#21
mspinola merged 1 commit into
mainfrom
feat/heldout-markets

Conversation

@mspinola

Copy link
Copy Markdown
Owner

What

Phase 1 of the held-out generalization workstream: register 5 markets that were never part of the CMR deploy selection, so the strategy can be scored on genuinely out-of-selection data. This is the only source of clean GENERAL evidence for a COT-positioning book whose investable universe it otherwise fully consumed (see docs/analysis_tools.md in npf).

Class Symbol Market CFTC code
Dairy (new class) DC Class III Milk 052641
Grains ZO Oats 004603
Grains KE KC HRW Wheat 001612
Equities EMD E-mini S&P MidCap 400 33874A
Equities NKD Nikkei 225 ($, CME) 240741

All codes verified against the raw cached CFTC source (dea_fut_xls_2026.zip).

Done in this PR

  • registry.yaml: 5 entries (new Dairy class; ZO/KE under Grains; EMD/NKD under Equities → is_equity=True).
  • Legacy COT pulled + verified into the store (scoped cftc.update(codes=…), cache-parsed, existing 42 untouched). Comm/NonComm positioning legs present; history: Milk 1997→, Oats/KC-Wheat 1998→, MidCap 2002→, Nikkei 1990→ (1,233–1,688 weeks each).
  • Golden registry tests updated for the intentional +5 (count 42→47, Equities 4→6, new Dairy class, identity checksum). 51 passed.

Remaining (Norgate/Windows — you run it)

Prices + contract specs need the Norgate Data Updater:

cotdata-update --prices --metadata --symbols DC ZO KE EMD NKD

Until those land, the CMR strategy can't build frames for these markets (no OHLC).

Notes

  • NKD legacy currently ends 2026-03-03 (vs 2026-07-07 for the others) — the $-denominated Nikkei may be winding down at CME. 36y of history regardless; flagging for awareness.
  • CotSymbolCodeMap has stale codes for ZR (Rough Rice) and NIY (Nikkei ¥) — those two were held back from this batch pending the code fix.

Next

Phase 2 (cot-analyzer): role: heldout field + collect/plot decoupling + Norgate-Group→class map. Phase 3 (npf): the frozen pooled held-out generalization run.

🤖 Generated with Claude Code

Add markets never touched by the CMR deploy selection, so the strategy can be
scored on genuinely out-of-selection data (clean GENERAL evidence):

  Dairy (new class)  DC   Class III Milk         052641
  Grains             ZO   Oats                   004603
  Grains             KE   KC HRW Wheat           001612
  Equities           EMD  E-mini S&P MidCap 400  33874A
  Equities           NKD  Nikkei 225 ($, CME)    240741

Legacy COT pulled and verified into the store (Comm/NonComm legs present, ~24–36y
each: Milk 1997→, Oats/KC-Wheat 1998→, MidCap 2002→, Nikkei 1990→). NKD legacy
currently ends 2026-03-03 (the $-Nikkei contract may be winding down at CME).

Prices + contract specs are the remaining step and are Norgate/Windows-only:
  cotdata-update --prices --metadata --symbols DC ZO KE EMD NKD

Golden registry tests updated for the intentional +5 (count 42→47, Equities 4→6,
new Dairy class, identity checksum).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mspinola
mspinola merged commit fca6b6c into main Jul 16, 2026
5 checks passed
@mspinola
mspinola deleted the feat/heldout-markets branch July 16, 2026 20:54
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