quantlab.dataset.massive.short_volume#

Massive’s daily short volume as a panel on the permaticker axis (#356).

Massive’s /stocks/v1/short-volume records (FINRA’s daily short sale volume, one record per ticker and day, from 2024-02-06), as MassiveClient.pull keeps them in the REST raw tier, become four variables on SEP’s trading calendar, one column per permaticker, each on the record’s own trading day:

  • short_volume: the shares sold short across all venues (the vendor’s short_volume);

  • short_total_volume: the total volume reported across all venues (total_volume);

  • short_exempt_volume: the short volume marked exempt from Regulation SHO (exempt_volume);

  • short_volume_ratio: the percent of the total volume sold short (short_volume_ratio, 100 * short_volume / total_volume).

A cell without a record is NaN. The per-venue columns (ADF, Nasdaq Carteret, Nasdaq Chicago, NYSE) stay in the raw tier. A record re-read by a later pull (FINRA’s revision, the pull’s overlap days) replaces the earlier copy of its ticker and day; a revision of a day already in the store reaches it only when the store is rebuilt, as the store only appends days. When two tickers place on one permaticker on one day their volumes are summed and the ratio is recomputed from the sums.

Each record is placed on the permaticker the Ticker map gives its ticker on the record’s day, through quantlab.dataset.massive.placement.TickerPlacement; a record it cannot place is left out and counted in <store>.unplaced.json. Only the universe’s permatickers (by default SEP’s domestic common stock) are columns.

The store is built through the last day SEP, the REST pull and the Ticker map all reach, so update() appends a day only once each of them holds it.

Examples#

Build the store and read one security’s short volume ratio:

config = MassiveShortVolumeConfig(
    zarr_file_path="/data/quantlab/market/massive/massive_short_volume_1d/massive_short_volume_1d.zarr",
    raw_data_dir_path="/data/quantlab/downloads/sharadar",
    massive_dir="/data/quantlab/downloads/massive",
    ticker_map_path="/data/quantlab/market/massive/massive_ticker_map/massive_ticker_map",
    start_date="2024-02-06",
)
panel = MassiveShortVolumeDataset(config).update().panel("2024-03-01", "2024-03-29")
panel["short_volume_ratio"].sel(symbol=199059)

Classes

MassiveShortVolumeDataset

Daily panel of Massive's short volume totals, by permaticker.