Skip to content

fix: distinguish continuous exchange sessions from hourly crypto observations #100

Closed

Description

@stefan-jansen

Problem and accepted requirement

Legacy core CryptoCalendar.sessions_between describes and enumerates every hour as a session. Exchange-session counts and hourly observations are different units. A named continuous calendar also differs from calendar-free row execution. The shared time contract requires explicit, consistent units and canonical calendar selection across public helper and consumer paths.

Source evidence

src/ml4t/engineer/core/calendars/crypto.py sessions_between advances by timedelta(hours=1); the class also exposes explicit maintenance and timezone settings. This is current source evidence, not a new executed end-to-end reproduction.

Scope and acceptance

  • Reproduce the public helper behavior before changing it and retain exact base/fix evidence. A continuous daily schedule must enumerate actual daily session starts, not manufacture hourly sessions.
  • Reuse authoritative named schedule adapters, preserve the explicit calendar argument/metadata/NYSE resolution contract at consumers, and reject calendar=None where a concrete named calendar object cannot represent row mode. Do not reinterpret named24/7 as row mode.
  • Resolve membership, next-open/previous-close, duration, session enumeration and timestamp/session-label annotations consistently, including timezone conversion, daily boundaries and explicit maintenance behavior.
  • Preserve compatible legacy constructor arguments where possible; surface output-changing behavior and its next-minor migration. Do not silently discard explicit maintenance settings or invent a new serialized calendar format.
  • Keep annualization separate from calendar membership and session enumeration.
  • Qualify public helper/feature/label consumer workflows, relevant supported source/wheel checks and migration documentation. Do not claim complete calendar adoption from a helper-only unit test.

AI assistance

Codex reviewed the source and reconciled the accepted implementation requirement. Reproduction, repair and final qualification remain unexecuted for this focused item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions