Implements production-grade, DST-aware trading session detection and holiday tracking for global financial markets.
This skill provides a standardized pattern for detecting trading sessions across 10 major global exchanges using the exchange_calendars library. It moves beyond simple hour-range checks to handle complex market realities like lunch breaks in Asian markets, early closes, and public holidays. By utilizing vectorized lookups and a central ExchangeConfig registry, it offers a high-performance solution for adding market context to time-series DataFrames and managing financial data preprocessing pipelines efficiently.
Key Features
01Ready-to-use ClickHouse SQL patterns for server-side market session classification
02High-performance vectorized session lookups optimized for millions of data points
03Automated handling of Asian market lunch breaks for Tokyo, Hong Kong, and Singapore
04Support for 10 global exchanges including NYSE, LSE, and JPX via ISO 10383 MIC codes
0540 GitHub stars
06Full DST and holiday awareness using IANA timezone data and official calendars
Use Cases
01Feature engineering for quantitative models that require precise holiday and trading hour context
02Preprocessing financial tick data to flag sessions and filter out-of-hours market noise
03Generating materialized columns in databases for high-speed market-hour analytics