quantlab.dataset.massive.placement#

Rows keyed by a Massive ticker placed on Sharadar’s permatickers through the Ticker map.

Massive’s REST endpoints (dividends, splits, short interest, short volume, news, 8-K disclosures, IPOs) name a security by its ticker, and a ticker is not a security: one ticker belongs to different securities on different days. A panel on the permaticker axis places each row on the permaticker the Ticker map (quantlab.dataset.massive.ticker_map) gives the row’s ticker on the row’s own placement day (an ex-date, an execution date, a settlement date plus its lag, a filing or publication day), so a reused ticker sends each row to the security that held it that day.

A row the map cannot place is never guessed onto a security. It is left out and counted, with the reason, in the store’s sidecar <store>.unplaced.json (UNPLACED_SUFFIX):

  • the map row of the ticker and day is unmapped: "unmapped: <the map's reason>" (quantlab.dataset.massive.ticker_map.UNMAPPED_REASONS);

  • the ticker is not in Massive’s day aggregates of that day, so the map has no row of it (NOT_TRADED);

  • the map does not hold the day at all (NOT_MAPPED).

A panel may also leave rows out for reasons of its own (no amount, another currency) through TickerPlacement.leave_out: they are counted in the same report. A row naming several tickers (a news article, an 8-K) is exploded into one row per ticker before it is placed, and counts once for each placed ticker.

Examples#

Place one endpoint’s rows, already on trading days, and write the report:

placement = TickerPlacement(ticker_map, owner="MassiveDividendDataset")
placed = placement.place(rows, source="dividends:ex", day="available")
placed.columns[-1]  # 'permaticker'
placement.write_report("/data/quantlab/market/massive/massive_dividends_1d/massive_dividends_1d.zarr")

Classes

TickerPlacement

Place rows on permatickers by the Ticker map of their own day, counting what it cannot place.