Rolling Quadratic Regression on Closing Prices
Summary
The document presents a quadratic regression indicator that fits a parabola to recent closing prices. It uses a configurable lookback window, set to 100 by default, and calculates the polynomial coefficients from rolling sums of the bar index, its square, and price. The resulting curve is returned as the indicator value for each bar, providing a smoothed representation of price that can capture curvature as well as a linear slope.
The indicator is described as a conversion of an existing trading-platform script. No rules are given for turning the fitted curve into entries, exits, or position sizes, and the document provides no performance tests or evidence that the curve predicts future returns. The window length affects the fit, but sensitivity, numerical stability, and behavior around turning points are not discussed. It is therefore a descriptive technical tool rather than a fully specified trading strategy.
Key ideas
- The indicator fits a second-degree polynomial to closing prices over a rolling window.
- The lookback length is configurable and defaults to 100 bars.
- Its fitted curve reflects both slope and curvature in recent prices.
- The document does not define trading rules or report performance evidence.
- The lookback choice and behavior near turning points are left unevaluated.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.