quantlab.dataset.massive.vendor_check.check_minute_bars#

quantlab.dataset.massive.vendor_check.check_minute_bars(bars, vendor, labels, tickers=None)[source]#

Compare one session’s one-minute Trade bars with Massive’s minute aggregates.

Parameters:
barspl.DataFrame

The Trade bars of the day: symbol (the Massive ticker), timestamp (the end label) and the COMPARED variables.

vendorpl.DataFrame

The day’s minute aggregates as raw.read_aggregates returns them.

labelspl.Series

The session’s bar labels (Datetime("ns")).

tickerstuple of str, optional

The conversion’s roster; None for every ticker.

Returns:
dict

JSON-ready: status ("checked"); ours_bars (with prices), ours_volume_only, vendor_bars, both, ours_only, vendor_only; vendor_outside_session, vendor_off_roster; agree (bars agreeing, per variable); worst (per disagreeing variable, the ticker, bar, ours and vendor values of the largest difference, a NaN price shown as None); and up to SAMPLE bars of each one-sided set as ours_only_sample and vendor_only_sample.

Examples

With the bars and vendor file of 2016-11-25 (a half day):

check = check_minute_bars(bars, read_aggregates(path), labels)
check["both"], check["agree"]["close"]  # (616733, 616723)