Skip to main content

SuperQuery

SuperQuery enables you to resample pandas DataFrames from CloudQuant Data Liberator into a common time axis by querying multiple datasets simultaneously.

Initial setup

This loads two independent datasets: minute bars and daily bars.

Querying multiple datasets together

SuperQuery lets you specify how multiple datasets are reindexed and merged together using the superq_resample_rule parameter.

Daily (1D) resampling

For a three-day query using daily frequency, the result contains three rows with daily bars and the final minute bar of each day:

Hourly (60T) resampling

For a three-day query using 60-minute frequency, the result contains 24 rows per day. Daily bar data is timestamped at 8pm:

The superq_resample_rule parameter

The superq_resample_rule parameter uses pandas “Offset Aliases” to define the resampling frequency. Common values:
For a complete list of offset aliases, see the pandas time series offset aliases documentation.