Troubleshooting Rolling Features and Model Inputs in a Quant Workflow
Summary
This Chinese-language support post describes a feature-engineering question: how to count, over a recent window, the days when a five-day moving average exceeds a ten-day average. The proposed first feature assigns a positive or negative value according to that comparison, but the author reports that summing the named feature over ten days fails and that an attempted integer conversion is unsupported. The post does not give a clear expression that solves this rolling-sum problem.
Instead, the response points to workflow and model-input issues. It notes that a stock-selection model using a ranking algorithm is not meaningful with a universe of only one stock. It also explains that, when a factor is assigned an alias, the resulting data column has the alias as its name; a training module expecting a column name should receive that name rather than an assignment expression. The post refers readers to a revised strategy but offers no reproducible code or performance evidence, so its guidance is mainly about checking the stock universe and matching factor-column names to model inputs.
Key ideas
- The question asks how to aggregate a moving-average comparison feature across a rolling ten-day window.
- The post does not provide a working expression for the requested rolling sum.
- A ranking model cannot meaningfully rank a universe containing only one stock.
- When a factor is given an alias, downstream training inputs should identify the resulting column by that alias.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.