Debugging Five-Minute Bar Aggregation with ArrayManager
Summary
This excerpt describes a problem while building a five-minute bar series from minute bars or ticks with VeighNa’s BarGenerator and storing the results in an ArrayManager. The author reports that keeping direct edits to arrays such as close and high arrays inside the minute-bar handler causes five five-minute entries to appear during a single five-minute interval, when only one is expected. Removing those edits instead makes the accumulated five-minute data shrink continuously.
The example shows a rolling-window setup and a temporary ArrayManager update, but it does not provide a confirmed diagnosis or corrected implementation. It is therefore useful as a description of aggregation and state-management pitfalls, not as a validated fix. The excerpt also does not include results from a test or clarify the exact callback sequence that produces the behavior.
Key ideas
- The example aggregates minute data into five-minute bars using a bar generator.
- The author observes duplicate five-minute entries when modifying ArrayManager arrays directly.
- Removing those direct array changes causes the stored five-minute data to decrease.
- The excerpt identifies a state-management issue but does not provide a verified solution.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.