quantlab.dataset.nbbo.bars#

NBBO bar panel from bars resampled on the WRDS server (ADR 0027).

The tick path (quantlab.dataset.nbbo.NbboPanelDataset) downloads every NBBO record and resamples it locally. Over the slow link to WRDS a decade of S&P 500 records takes weeks, so the nbbo_bars data type moves the resampling into SQL on the WRDS server and downloads only bars. This module holds the two parts of that path that live in the dataset layer:

  • NbboBarsRequest, the settings the server cut the bars with: the bar size, the session window and the quote filters. They are fixed at download time and recorded beside the raw tier’s watermarks (REQUEST_FILE_NAME in the data type’s watermark directory), so bars built with different settings are never mixed: the acquisition refuses a run whose settings differ from those recorded, and the conversion refuses a config that differs from them. It also turns a session date into the bounds the server statement needs.

  • NbboBarsDataset, the conversion of those raw bars into the same panel the tick path builds: the 13 NBBO_PANEL_VARIABLES on the XNYS session grid, on the PERMNO axis, with the same sidecars. Everything but reading the bars is inherited from quantlab.dataset.nbbo.panel.NbboPanelBase.

Classes

NbboBarsDataset

Dense NBBO bar panel from bars the WRDS server resampled (nbbo_bars).

NbboBarsRequest

The settings NBBO bars are cut with on the WRDS server.

NbboBarsSession

One session's bounds, as the server statement and the bar labels need them.