quantlab.utils.date_range#

Helpers for inclusive (start, end) date-range requests on panels.

Datasets answer panel(start, end) and factors answer read(start, end) and compute(start, end). Both ends are inclusive, and a date-only ISO string such as "2024-01-05" covers every bar of that day, the way xarray slices a timestamp index with it. bar_label and label_ns write a bar as the label run files use and read it back.

Functions

as_label

Return value as a label xarray slices timestamp with.

bar_label

Return the label metrics.json and the report write for a bar.

check_range

Return the first and last instants of [start, end].

label_ns

Return a bar label (or any timestamp) as a nanosecond datetime64.

last_moment

Return the latest instant an inclusive end label covers.

range_text

Return a range end as it is recorded: strings as given, else ISO.

resample_padding

Return how far outside a range a resampled request reads source bars.