Skip to content

Add get_cot(..., listing=) to read one listing of a summed market - #132

Merged
mspinola merged 1 commit into
mainfrom
cot-listing-reads
Nov 21, 2026
Merged

mspinola merged 1 commit into
mainfrom
cot-listing-reads

Conversation

@mspinola

Copy link
Copy Markdown
Owner

Summary

  • get_cot(name, report, combined, listing=None): "primary" reads the stitched primary series without the sum_codes listings; a sum_codes code reads that listing alone, unscaled. Unknown codes and non-registry names raise ValueError.
  • Default reads are unchanged.
  • Motivation: the CMR weekly sheet indexes the E-mini alone, while cotdata sums full-size + micro. cotmetrics needs per-listing reads to build E-mini / Micro / Combined indexes.

Tests

  • 4 new tests in tests/test_cot_sum.py; full suite 273 passed.

Follow-up at release: bump the version so cotmetrics can raise its cotdata floor.

🤖 Generated with Claude Code

listing="primary" returns the stitched primary series without sum_codes
(the E-mini alone for ES/NQ/YM/RTY); a sum_codes code returns that listing
alone, unscaled. The default (None) is unchanged. cotmetrics uses this to
index the E-mini and Micro separately, matching the CMR sheet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mspinola
mspinola merged commit f2aac1c into main Nov 21, 2026
5 checks passed
@mspinola
mspinola deleted the cot-listing-reads branch November 21, 2026 00:30
@mspinola mspinola mentioned this pull request Nov 21, 2026
mspinola added a commit to mspinola/cotmetrics that referenced this pull request Nov 21, 2026
* Add a CMR index family and E-mini/Micro/Combined equity twins

New per-instrument CmrLookbackWeeks (falls back to CustomLookbackWeeks)
drives "CMR" index columns for all three legs. For ES/NQ/YM/RTY the CMR
column indexes the E-mini alone, with CMR Micro and CMR Combined twins at
the same lookback, each listing indexed over its own history. Existing
Custom/26/52 columns are unchanged. METRICS_CACHE_VERSION bumped to 2.

Requires cotdata get_cot(..., listing=) (mspinola/cotdata#132).

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

* Raise the cotdata floor to 0.5.0 for get_cot(..., listing=)

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

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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