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 theCOMPAREDvariables.- vendorpl.DataFrame
The day’s minute aggregates as
raw.read_aggregatesreturns them.- labelspl.Series
The session’s bar labels (
Datetime("ns")).- tickerstuple of str, optional
The conversion’s roster;
Nonefor 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, theticker,bar,oursandvendorvalues of the largest difference, a NaN price shown asNone); and up toSAMPLEbars of each one-sided set asours_only_sampleandvendor_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)