Comparing Today’s Close with Earlier Closes in a Factor Expression
Summary
The response explains how to reference the current close alongside earlier close values in a BigQuant factor expression. It constructs a series of conditional comparisons: for each of several prior indexed closes, it checks whether the current close is lower and returns a binary flag. Those flags are joined by addition, allowing the expression to count how many of the comparisons are true.
This is a compact example of building repeated lagged-price conditions programmatically rather than writing each comparison by hand. The document is a brief technical answer, not a trading strategy or an evaluation of the resulting factor. It provides no backtest, interpretation of the count as a signal, or guidance on timing and data availability, so users would need to establish those details in their own research.
Key ideas
- The example compares the current close with a sequence of earlier indexed closes.
- Each comparison produces a binary indicator based on whether the current close is lower.
- Adding the indicators yields a count of comparisons that satisfy the condition.
- The answer demonstrates expression construction but provides no evidence that the resulting factor is predictive.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.