quantlab.dataset.massive.day_bars#
The Day aggregate panel built from Massive’s daily day_aggs files, on the Massive ticker axis.
MassiveDayBarDataset reads the Day aggregates the Massive client keeps
in the raw tier (quantlab.dataset.massive.raw, data type day_aggs),
one file per trading day, and returns the dense (timestamp, symbol)
panel its store massive_day_bars_1d holds (#352; the two-store pattern
of the Trade bars, ADR 0031).
The variables are the file’s, unchanged:
open,high,low,close,volumeandn_trades(the file’stransactions), as float64 (DAY_BAR_VARIABLES). Prices are raw: no split or dividend adjustment.One bar per trading day, labelled with its date (midnight, like SEP’s bars). The days are those of the raw tier’s files; a file whose day is not an XNYS session is refused.
The symbol axis is the Massive ticker, exactly as the files spell it (
BRK.A,AApB), every ticker kept, exchange test symbols included. A column is a ticker, not a security: reading the store as securities goes through the Ticker map (quantlab.dataset.massive.ticker_map). No Sharadar data is read.A ticker absent from a day’s file has NaN prices and zero
volumeandn_tradesthat day.The store grows at its end.
update()appends the raw days after the store’s last; a ticker first met on one of them is appended at the end of the symbol axis in place (ADR 0032), with no bar over the days before, so a backfill and a daily update are the same operation. Withend_date=Nonethe range is every raw day, so the daily update extends the store from its owncomponent.json.
Examples#
Needs day-aggregate files under <raw_data_dir_path>/day_aggs:
config = MassiveDayBarsDatasetConfig(
zarr_file_path="/data/quantlab/market/massive/massive_day_bars_1d/massive_day_bars_1d.zarr",
raw_data_dir_path="/data/quantlab/downloads/massive",
start_date="2016-10-10",
)
ds = MassiveDayBarDataset(config).update(granularity="year")
panel = ds.panel("2024-11-26", "2024-11-29")
Classes
Dense Day aggregate panel on the Massive ticker axis; see the module docstring. |