Repository navigation
fix: derive futures expiry rolls from authoritative sessions - #102
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #101
Outcome
TimeBasedRoll counts authoritative selected sessions strictly before expiration instead of weekdays or observed dates. Missing scheduled triggers no longer move backward: the existing contract availability process switches on the first eligible later observation. Explicit elapsed-day mode retains civil-day units but also stops snapping backward. Zero offset remains expiration itself.
Canonical calendar overrides shared FeedSpec metadata, then NYSE. Named24/7 is a real continuous schedule; descriptive ContractSpec.exchange is not a selector. Session-count mode rejects explicit/declared None as unsupported row-based expiry offsets rather than claiming continuous trading is row mode. The explicitly selected elapsed-day mode needs no calendar and accepts disabled selection without changing its units. FirstNoticeDateRoll preserves its existing notice-offset convention and propagates the same declaration to its TimeBasedRoll delegate. Old positional signatures remain valid.
Actual failing-base and passing-fix evidence
Review and remaining scope
Owner reviewed actual diff, calendar precedence, zero/elapsed/session units, strictly-before-expiry selection, schedule independence from observations, parser/builder integration and FirstNotice delegation. AI-assisted source/tests/prose under maintainer direction; no independent reviewer claimed. Three files only; no unrelated session/ingestion changes or release/deployment. Volume/open-interest strategies retain their observation-rank behavior; this does not claim all calendar harmonization complete. Published0.2.1 remains immutable.