Skip to content
All library documents

Calculating Week-to-Date Indicators in Daily Trading Data

Article BigQuant

Summary

The document addresses a timing problem when using weekly indicators in a daily trading strategy. A weekly calculation may be absent or incomplete during the current week if the data pipeline only forms values after the week closes. Its example asks how to calculate a running weekly value on a Thursday using all daily observations from Monday through that date, rather than using Thursday’s close alone. For the stated rolling-close example, the intended weekly value is the minimum close across the elapsed trading days of the week.

The response says this can be implemented with pandas and points readers to shared code, but the code itself is not included in the document. The key practical idea is to group daily observations by trading week and compute a partial-week statistic using only data available up to each date. The post does not discuss handling holidays, week boundaries, missing sessions, or whether the indicator should use completed weeks or current partial-week data. Those choices matter for consistent calculations and avoiding look-ahead bias.

Key ideas

  • A weekly indicator can be calculated during the week from daily observations available so far.
  • The example uses the minimum close from Monday through the current weekday rather than that day alone.
  • The response recommends pandas and links to an implementation, but does not include the code in the document.
  • Week boundaries, holidays, missing data, and the use of partial-week values require explicit handling.

Tags

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