Skip to main content

Usage of the as_of Parameter

The as_of parameter allows you to query historical data from a specific moment. You can specify it as a date alone (e.g., '2024-07-08') which CloudQuant Data Liberator interprets as midnight that date, or with specific times down to nanosecond precision.
All CloudQuant Data Liberator times are New York Time (US ET).

Default Behavior

When you omit the as_of parameter, CloudQuant Data Liberator assumes the current date and time.

Example Query

df = liberator.get_dataframe(liberator.query(
    name = 'daily_bars',
    as_of = '2024-07-10',
    back_to = '2024-07-10',
    symbols = ['GOOG', 'AAPL', 'MSFT']))
This returns data for the specified date range.

Without back_to Parameter

If you specify as_of but omit or set back_to to None, the query returns data through yesterday’s completed trading bar:
df = liberator.get_dataframe(liberator.query(
    name = 'daily_bars',
    as_of = '2024-07-18',
    symbols = ['GOOG', 'AAPL', 'MSFT']))

Jupyter Notebook Configuration

To display more rows in Jupyter:
import pandas as pd
pd.set_option('display.max_rows', 400)
Consider your data volume and test with smaller queries initially. See Query Considerations for more details.