quantlab.dataset.massive.permaticker_bars#

Datasets on the Massive ticker axis read on the permaticker axis, through the Ticker map (ADR 0031).

The Trade bar store’s and the Day aggregate store’s symbol axis is the Massive ticker, which names a column, not a security. PermatickerDataset is the one way to read such a store as securities: for each session day it maps the store’s ticker columns to permatickers through that day’s rows of the Ticker map (quantlab.dataset.massive.ticker_map), and returns a dense (timestamp, symbol) panel on the permaticker axis:

  • a ticker the map leaves unmapped that day is dropped;

  • two tickers mapped to one permaticker on one day keep the one with more volume that day (ties: the first ticker in text order);

  • a security that changed ticker is one column across the change;

  • a permaticker without a ticker on a day reads as a column of the store without a bar: NaN prices, zero volumes and counts.

Two views share the mapping, one per store on the Massive ticker: PermatickerTradeBarDataset over the one-minute Trade bars (MassiveTradeBarDataset) and PermatickerDayBarDataset over Massive’s Day aggregates (MassiveDayBarDataset, #353). A view is a drop-in MarketDataset: panel, resample (the mapped bars are aggregated as the store’s are, per session), the calendar and the KunQuant export are the store’s dataset’s, and the tradable and delisting bars MarketDataset’s rules over its own panel. Only the ticker columns the map names are read from the store. A read records the store (through the store’s dataset) and the map’s rows in an open DataRecorder. A view has no store of its own and no build path: its input is the store’s dataset (inputs()), and the store and the Ticker map are updated by their own steps.

Examples#

With trade_bars the one-minute Trade bar dataset, day_bars the Day aggregate dataset and ticker_map the Ticker map:

bars = PermatickerTradeBarDataset(trade_bars, ticker_map)
panel = bars.panel("2020-03-02", "2020-03-03")      # permatickers
hourly = bars.resample("1h").panel("2020-03-02", "2020-03-03")
daily = PermatickerDayBarDataset(day_bars, ticker_map).panel("2020-03-02", "2020-03-06")

Classes

PermatickerDataset

A store on the Massive ticker axis read on the permaticker axis; see the module docstring.

PermatickerDayBarDataset

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

PermatickerTradeBarDataset

The one-minute Trade bars on the permaticker axis; see the module docstring.