Building Cross-Timeframe Factors from Daily and Monthly Data
Summary
The discussion addresses how to combine daily observations with data from a longer period, such as the previous month, when constructing factors. Its suggested workflow is to convert daily market data into weekly or monthly bars with Python resampling, then calculate factors from the resulting period data. It notes that a factor derived from weekly data will generally remain the same during that week, which has implications for how often a strategy needs to rebalance.
For repeated calculations, the discussion proposes storing results in a user-created table that can be updated or cleared, allowing later joins and calculations without recomputing everything. It points readers to an example for implementation, but the excerpt does not provide code, specify how to align period data with daily rows, or address look-ahead bias. In particular, users must ensure monthly values are only used after they would have been available.
Key ideas
- Daily observations can be resampled into weekly or monthly data for longer-period factor calculations.
- A factor based on weekly data may remain unchanged throughout the week, affecting sensible rebalance frequency.
- Persisting calculated data in a custom table can support reuse, updates, and joins.
- Cross-timeframe alignment must avoid using period values before they were available.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.