quantlab.utils.resample#

Shared pieces of the resample contract: config checks, bucket labels, paths.

A resample aggregates a (timestamp, symbol) panel onto a coarser regular time grid, one aggregation method per variable. Datasets and factors carry the request in their config (resample_freq and resample_how), map each source timestamp to the bar it belongs to, and hand the grouping to their storage backend. The helpers here are the parts of that contract both layers share; the backend’s resample does the grouping itself.

Functions

assert_coarser

Refuse a resample onto a grid no coarser than the panel's own bars.

clock_labels

Return each timestamp's bar, floored on the UTC clock.

resample_seconds

Return the length of a ResampleFrequency token in seconds.

resample_store_path

Return the store a resampled object reads and writes.

resolve_resample_how

Return one method per variable of the panel being resampled.

session_labels

Return each timestamp's bar inside its trading session.

source_interval_seconds

Return the most common spacing of timestamps, in seconds.

validate_resample_config

Check a config's resample_freq and resample_how pair.