Repository navigation
fix: classify intraday outages from declared exchange bar grids - #100
Merged
Merged
Conversation
added 21 commits
October 17, 2026 10:17
added 2 commits
October 17, 2026 13:18
…-gaps # Conflicts: # docs/user-guide/sessions.md # src/ml4t/data/sessions/assigner.py # src/ml4t/data/sessions/completer.py # tests/test_session_calendar_contract.py
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 #99
Outcome
Replace the fixed US-clock intraday gap approximation with authoritative exchange bar positions. Explicit calendar overrides shared feed metadata, then NYSE; explicit None disables detection. Continuous24/7 remains an expected schedule. Require complete version-2 frequency/timestamp/anchor/label/partial-bar declarations and timezone for naive instants. Off-grid, contradictory, event-count and incomplete declarations fail rather than infer a grid from prices.
The grid restarts at each tradable interval after breaks and declared interruptions. Left/right labels and included/excluded shorter closing bars follow shared Specs701bde6. Count expected positions instead of expanding every missing timestamp, including a whole absent session. UTC output bounds, expected-bar counts and elapsed duration remain distinct. No filling or input mutation; classify each asset separately. Omitted frequency inherits feed metadata, otherwise daily; explicit conflicting frequency fails.
Intentional compatibility change: unqualified intraday calls must supply a complete feed declaration or explicit None. The old approximation cannot silently claim complete data. Daily label behavior remains separate; legacy weekly/monthly and range-planner limitations are not newly claimed as schedule grids.
Executed evidence
Dependencies and review
Current head a84453f integrates main 721adee without rewriting history, after the session, ingestion, futures, crypto-weekend and daily-timestamp repairs merged. The normal merge preserves shared selection and daily label/instant semantics while documenting the complete intraday grid requirement. No asset-class inference was restored. The benchmark hold was explicitly released at 19:13 UTC before local integration and verification. Current-head hosted CI remains required; prior stacked-head results do not substitute for it.
On the integrated head, the full local suite passed 3,984 tests in 361.23s with 86.25% coverage. A combined focused lane passed 318 tests in 50.60s with ResourceWarning as error. Four additional public DataManager workflows use real SyntheticProvider acquisition and Flat/Hive storage: main721adee fails two inherited-grid cases and passes two explicit calendar=None controls; the fix passes all four. Only the clock is patched. Full-source Ruff check/format, ty, strict MkDocs, normal commit hooks and pre-commit --all-files passed. Both wheel and sdist installed in isolation and passed dependency, import, CLI and README quick-start checks. These development artifacts are not a release.
AI-assisted implementation/tests/prose under maintainer direction. Owner reviewed actual diff, declared boundary sides, scheduled outages independent of observed data, arithmetic bar counts, aliases, atomic errors, memory scaling and compatibility. No independent reviewer claimed. Daily timestamp and futures repairs are merged separately. Validation, general intraday acquisition-range planning, schedule-aware filling and CME crypto cutover remain separate accepted work, not capabilities claimed by this PR. Published0.2.1 unchanged; no release/deploy.