Skip to content
All library documents

Using Warm-Up History for Point-in-Time SQL Time-Series Values

Article BigQuant

Summary

This forum post addresses how to retrieve a time-series calculation for one specific date using SQL. The reported problem is that filtering the input directly to the target date can leave a rolling calculation empty, because the calculation lacks earlier observations. The example uses a 20-trading-day rolling minimum of total market capitalization, calculated separately for each instrument, and retains a historical date range before selecting the desired output date.

The suggested query pattern is to include enough prior data in the calculation stage, then apply the exact-date filter in an outer query. It also excludes rows with missing market-cap fields or nonpositive float market capitalization. The post illustrates the issue and workaround with a query, but does not establish how many warm-up observations are required in every case, explain platform-specific SQL evaluation details, or report validation results. The appropriate lookback depends on the time-series function and available trading history.

Key ideas

  • Rolling time-series functions need earlier observations to calculate values on a target date.
  • The example computes a 20-day rolling minimum for each instrument.
  • It keeps a historical input range, then filters to the requested date in an outer query.
  • The example removes rows with missing market-cap values or invalid float market capitalization.
  • The post does not validate the query or specify a universal warm-up length.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.