Expand description
Market session awareness — trading hours, holidays, status transitions.
§Responsibility
Classify a UTC timestamp into a market trading status for a given session (equity, crypto, forex). Enables downstream filtering of ticks by session.
§Guarantees
- Pure functions: SessionAwareness::status() is deterministic and stateless
- Non-panicking: all operations return Result or TradingStatus
- DST-aware: US equity hours correctly switch between EST (UTC-5) and EDT (UTC-4) on the second Sunday of March and first Sunday of November
Structs§
- Session
Awareness - Determines trading status for a market session.
Enums§
- Market
Session - Broad category of market session.
- Trading
Status - Trading status at a point in time.
Functions§
- is_
tradeable - Convenience: check if a session is currently tradeable.
- is_
us_ market_ holiday - Returns
trueifdate(in ET) is a US equity market holiday (NYSE/NASDAQ closure). - trading_
day_ count - Count of US equity trading days (non-holiday weekdays) in the UTC millisecond range
[start_ms, end_ms).