Robust Theil-Sen Regression Channels with Median-Based Bands
Summary
The document describes a regression channel built from the Theil-Sen estimator, intended to keep trend estimates less sensitive to price outliers than ordinary least squares. It calculates slopes between every pair of observations in a rolling window and takes their median. The intercept is estimated as the median residual. Channel width is based on either median absolute deviation (MAD), the robust default, or root mean square deviation (RMSD), which responds more strongly to large residuals. The bands can be read as dynamic levels around the fitted trend, and the channel may be projected forward.
The implementation finds the slope median through repeated bisection rather than sorting all pairwise slopes, while other medians use sorting. It also offers a mean-slope option that sacrifices robustness. The document explains configuration choices and suggests using slope direction, band excursions, or divergence from an ordinary regression as analytical cues. These are proposed applications, not validated trading rules: it presents no backtest or performance evidence, and the usefulness of bands as support, resistance, or reversal signals is not established.
Key ideas
- The Theil-Sen slope is the median of slopes computed from every pair of observations in the window.
- A median-based intercept and MAD-based width make the default channel less sensitive to outliers.
- RMSD bands widen in response to large residuals, while MAD is more robust to them.
- Bisection estimates the pairwise-slope median without sorting the full set of slopes.
- The document proposes trend and band interpretations but supplies no performance validation.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.