Expand description
Trading session management and break detection.
Financial markets operate in defined sessions (e.g., NYSE 9:30 AM–4:00 PM
ET). This module provides a pluggable SessionProvider trait for
detecting session boundaries (daily, weekly, monthly, or custom) within
bar data, plus concrete implementations:
| Provider | Detects |
|---|---|
DailySessionProvider | Day boundaries (configurable break hour) |
ExchangeSessionProvider | Session opens of an instrument’s trading hours |
WeeklySessionProvider | Week boundaries (configurable break day) |
MonthlySessionProvider | Month boundaries |
CompositeSessionProvider | Combines multiple providers |
Use find_session_breaks to scan a bar slice for all breaks.
Structs§
- Composite
Session Provider - Composite session provider that combines multiple providers.
- Daily
Session Provider - Daily session provider with a configurable break hour.
- Exchange
Session Provider - Daily session provider for an exchange: a day starts at each session open of its trading hours, in its time zone, so bars outside the hours stay with the session before them. Without trading hours a day starts at midnight in the time zone.
- Monthly
Session Provider - Monthly session provider that detects calendar-month boundaries.
- Session
Break - A detected session break with metadata.
- Weekly
Session Provider - Weekly session provider that detects boundaries after a configured UTC weekday.
Enums§
- Session
Break Type - Classification of a session break.
Traits§
- Session
Provider - Trait for defining trading session boundaries.
Functions§
- find_
session_ breaks - Scan a bar slice for session breaks.