quantlab.dataset.massive.permaticker_bars.PermatickerDayBarDataset#
- class quantlab.dataset.massive.permaticker_bars.PermatickerDayBarDataset(config, ticker_map=None)[source]#
Bases:
PermatickerDatasetMassive’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_mapbeside it.- ticker_mapTickerMap, optional
The Ticker map, when
configis the Day aggregate dataset.
Examples
With
day_barsthe Day aggregate store andticker_mapthe 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_barsthe Day aggregate store andticker_mapthe Ticker map:PermatickerDayBarDataset(day_bars, ticker_map).day_bars is day_bars # True