q.calendar Roadmap
title: q.calendar Roadmap
Only open work is listed here. The existing schedule and non_trading_days_after functions are the foundation for the work below.
Design rules
- Every public operation requires an explicit ISO 10383 exchange identifier.
- Session labels are timezone-naive normalized dates; market timestamps are timezone-aware and expressed in either UTC or the exchange’s IANA timezone.
- APIs must define their behavior for timestamps before the open, after the close, during holidays, and at daylight-saving transitions.
- Early closes are ordinary trading sessions with a shorter interval, not holidays or incomplete observations.
q.calendarowns exchange-time semantics. It may construct labels and time grids, but OHLCV aggregation and market-data mutation belong toq.data.
Timestamp-to-session alignment
-
labels = q.calendar.session_labels( timestamps, exchange="XSTO", direction="none", include_close=False, )It should assign each timestamp to the exchange session that contains it.
direction="none"returns missing labels or raises for out-of-session values;"previous"and"next"explicitly opt into nearest-session alignment.