quantlab.dataset.massive.day_bars.MassiveDayBarDataset#
- class quantlab.dataset.massive.day_bars.MassiveDayBarDataset(dataset_config)[source]#
Bases:
StockDatasetDense Day aggregate panel on the Massive ticker axis; see the module docstring.
- Parameters:
- dataset_configMassiveDayBarsDatasetConfig
The raw tier, the store and the date range.
Examples
With
configaMassiveDayBarsDatasetConfigof a raw tier on disk:ds = MassiveDayBarDataset(config).update(granularity="day") list(ds.panel("2024-11-26", "2024-11-29").data_vars) # ['open', 'high', 'low', 'close', 'volume', 'n_trades']
- DATA_TYPE = 'day_aggs'#
The data type the panel is built from.
- DEFAULT_RESAMPLE_HOW = {'close': 'last', 'high': 'max', 'low': 'min', 'n_trades': 'sum', 'open': 'first', 'volume': 'sum'}#
resample(freq)aggregates each variable this way unless told otherwise.
- NEW_LISTING_STRATEGIES = ('refuse', 'widen')#
No
"rebuild": a ticker a new day brings has no bar before it, so the store is only refused or extended.
- config_cls#
The config class used to rebuild the dataset from a saved
config.json.alias of
MassiveDayBarsDatasetConfig