quantlab.factor.predefined.intraday.IntradayStats#

class quantlab.factor.predefined.intraday.IntradayStats(config)[source]#

Bases: FactorKunQuant

Session statistics of one-minute bars, one value per bar for the session so far.

See the module docstring for the outputs and their sources. The dataset must hold INTRADAY_COLUMNS on one-minute bars cut by session (the Massive Trade bars, read as securities through PermatickerTradeBarDataset); data_columns must be exactly those. warmup_bars must cover one session (session_bars) so the first requested session and its prior close are filled. Batch mode only: the session inputs are computed from a whole panel.

Parameters:
configFactorConfig

kwargs holds IntradayParameters.

Examples

>>> stats = IntradayStats(FactorConfig(
...     warmup_bars=390, dataset=bars, mode="batch", data_columns=INTRADAY_COLUMNS,
...     factor_names=("rvol", "rskew"),
... ))
>>> daily = stats.resample("1d", "last").compute("2024-11-25", "2024-11-29")
>>> list(daily.data_vars), daily.sizes["timestamp"]
(['rvol', 'rskew'], 5)
PEAK_COPIES = 1#

Calibrated on us3000 (6421 permatickers) reading MappedTradeBarDataset (2026-10-15): a month peaked at 11.6 GB and a quarter at 29.1 GB, about 175 bytes per source bar and symbol plus 0.67 GB for the process, against 240 from cell_bytes at 1 copy. Read through PermatickerTradeBarDataset instead, the view’s day-by-day mapping about doubles that (450 bytes on the S&P 500), which cell_bytes does not see: read the mapped store.