Handling Long Moving Average Windows in VeighNa ArrayManager
Summary
A VeighNa community discussion addresses a futures strategy using one-hour bars, long moving averages, and calculations over a longer run of closing prices. The questioner reports that a simple moving average request above the default ArrayManager capacity returns NaN values. A respondent explains that the history supplied to the calculation must be long enough for the requested period and that ArrayManager initialization can fail when too few bars are available. The questioner then reports expanding the manager’s capacity and obtaining the longer moving average; another participant says this change is acceptable.
The exchange is practical troubleshooting rather than a full implementation guide. It provides no code review, error trace, comparison of alternatives, or discussion of memory and performance costs. The conclusion is limited to the reported setup: users should ensure sufficient historical bars are loaded and verify that their chosen capacity supports every indicator and rolling calculation their strategy requires.
Key ideas
- A moving average period requires sufficient historical bars in the manager.
- The reported default capacity caused NaN output for a longer simple moving average.
- Increasing ArrayManager capacity allowed the questioner to calculate the requested moving average.
- The discussion offers no detailed analysis of resource costs or broader implementation tradeoffs.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.