quantlab.dataset.massive.permaticker_bars.PermatickerDayBarDataset#

class quantlab.dataset.massive.permaticker_bars.PermatickerDayBarDataset(config, ticker_map=None)[source]#

Bases: PermatickerDataset

Massive’s Day aggregates on the permaticker axis (#353); see the module docstring.

Parameters:
configPermatickerDayBarsConfig or MassiveDayBarDataset

The config, or the Day aggregate dataset with ticker_map beside it.

ticker_mapTickerMap, optional

The Ticker map, when config is the Day aggregate dataset.

Examples

With day_bars the Day aggregate store and ticker_map the Ticker map:

bars = PermatickerDayBarDataset(day_bars, ticker_map)
bars.panel("2024-11-27", "2024-11-30")["close"].sel(symbol=202).values.tolist()   # OLD, then NEW
# [20.0, 21.0]
DEFAULT_RESAMPLE_HOW = {'close': 'last', 'high': 'max', 'low': 'min', 'n_trades': 'sum', 'open': 'first', 'volume': 'sum'}#

resample(freq) aggregates each variable as the Day aggregates do.

SOURCE_CLS#

alias of MassiveDayBarDataset

SOURCE_FIELD = 'day_bars'#

The config field holding the dataset on the Massive ticker axis.

config_cls#

The config class used to rebuild this dataset from a saved config.

alias of PermatickerDayBarsConfig

property day_bars#

The Day aggregate dataset on the Massive ticker axis.

Examples

With day_bars the Day aggregate store and ticker_map the Ticker map:

PermatickerDayBarDataset(day_bars, ticker_map).day_bars is day_bars
# True
stored_through()[source]#

Return the last day the Day aggregate store holds, None without one.

Examples

With day_bars the Day aggregate store and ticker_map the Ticker map:

PermatickerDayBarDataset(day_bars, ticker_map).stored_through()
# datetime.date(2024, 11, 29)