Skip to content

Futures view: roll on CME's Monday before the third Friday - #20

Merged
simonro merged 1 commit into
mainfrom
fix/cme-roll-date
Oct 25, 2026
Merged

simonro merged 1 commit into
mainfrom
fix/cme-roll-date

Conversation

@simonro

@simonro simonro commented Oct 25, 2026

Copy link
Copy Markdown
Owner

What changed

The futures view moved to the next quarterly contract on the Thursday 8 calendar days before the third Friday. For December 2026 that is Dec 10. CME's customary U.S. equity index roll is the Monday before the third Friday, Dec 14 (CME roll dates). From Dec 10 to Dec 13 the panel showed March levels while CME still listed December as the lead month.

  • FUTURES_ROLL_DAYS goes from 8 to 4, counted from the third Friday, so a holiday that moves the expiry to Thursday (Juneteenth, June 2026) leaves the roll on Monday.
  • README and the futures.py docstring describe the new rule.
  • The panel reads roll_date from the API, so the UI needs no change.

Tests

  • test_roll_date_matches_cme_table: all 16 rows of CME's published table, 2025 to 2028, for /ES and /MNQ.
  • Updated the front contract cases: Dec 10 and Dec 11 stay /ESZ26, Dec 14 is /ESH27.
  • Full suite: 280 passed.

No release with this PR.

🤖 Generated with Claude Code

The front contract switched on the Thursday 8 days before expiry (Dec 10 for
Dec 2026). CME's customary equity index roll is the Monday before the third
Friday (Dec 14). New test checks all 16 rows of CME's published table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonro
simonro merged commit 0f32354 into main Oct 25, 2026
2 checks passed
@simonro
simonro deleted the fix/cme-roll-date branch October 25, 2026 14:46
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