Skip to content

fix: keep equity calendar helpers on authoritative schedules - #92

Merged
stefan-jansen merged 2 commits into
mainfrom
fix/equity-authoritative-schedules
Oct 17, 2026
Merged

stefan-jansen merged 2 commits into
mainfrom
fix/equity-authoritative-schedules

Conversation

@stefan-jansen

@stefan-jansen stefan-jansen commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #91.

EquityCalendar now uses the existing authoritative schedule adapter for membership and duration instead of a weekday fallback. Closed sessions have zero duration; breaks and interruptions are excluded. Boundary lookup and session enumeration consistently normalize naive timestamps in the configured timezone, defaulting to the selected exchange timezone. Lookup without an authoritative boundary fails clearly.

The canonical calendar selector retains the legacy exchange/positional alias and rejects conflicting values. Session annotations use authoritative labels, including overnight sessions, rather than timestamp civil dates. Duration consumes the session-label date and does not substitute the next session's overnight opening date. An EquityCalendar object requires a named schedule. Calendar-free consumers remain separate. The existing feature guide and calendar instructions describe the compatibility changes for the next minor version, not the separate 0.1.7 release/archive work.

Regression evidence

  • Base 0e78652, tested through its exact-tree installed hosted wheel: new public calendar regressions give 10 failures and 2 passing controls. Failures include a fabricated holiday duration, holiday session enumeration, naive open/close lookup, LSE timezone, HKEX lunch break, missing-provider fallback, canonical selector and invalid local DST times.
  • Initial repair f47ab0a passed78focused cases. Review added three public overnight-session cases that fail against an exact Git export of that revision, including annotations across UTC/Tokyo and an early-close duration that the initial repair reduced to zero. Current repair4e057d6327daaee5d8aed5ee4029e30f9fa0d0e4 passes81focused calendar/timezone cases. Existing timezone tests now exercise public methods instead of removed approximate private methods; the old January DST control used the MLK holiday, corrected to January16.
  • Ruff lint/format across src/tests/examples/scripts, ty, all pre-commit hooks, strict MkDocs and wheel/sdist build pass locally. No heavy local full suite was launched during another owner's benchmark window. Complete supported-platform/source/installed-wheel CI remains required before merge.

Limits
This does not complete all calendar/time harmonization. Shared FeedSpec adoption in calendar-aware labeling, row/session/elapsed horizon semantics and legacy CryptoCalendar helper semantics remain separately assessed work. No release/tag/deployment is requested. The immutable Specs source dependency and publication guard remain unchanged.

AI assistance: Codex reproduced failures through public APIs and the installed base wheel, implemented source/tests/docs changes, reviewed the diff and ran the listed checks. No unexecuted full-suite or hosted result is claimed.

Copilot AI balanced review requested due to automatic review settings October 17, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@stefan-jansen
stefan-jansen merged commit f5cd062 into main Oct 17, 2026
31 checks passed
@stefan-jansen
stefan-jansen deleted the fix/equity-authoritative-schedules branch October 17, 2026 18:01
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.

fix: keep equity calendar helpers on authoritative schedules

2 participants