Nadaraya-Watson Envelope
By LuxAlgoOct 18, 2021
Nadaraya-Watson Envelope estimates the underlying price trend with kernel regression and builds an envelope around the fit by adding and subtracting mean absolute deviations. Crossings of the upper or lower extremity print triangles and can trigger alerts, giving contrarian traders a systematic cue that price has stretched unusually far from its estimated center.
Two calculation modes are offered. The default smoothing recalculates the fit across the window and therefore repaints; the alternative uses an endpoint Nadaraya-Watson estimator that does not, delivering results akin to traditional band indicators. Triangles stay fixed where they first appear, so the real-time record holds even while a repainting fit updates.
How to Trade the Nadaraya-Watson Envelope?
- Price crosses the upper extremity: an unusually stretched advance relative to the estimated trend — contrarian setups look for rotation back toward the center.
- Price crosses the lower extremity: the mirror case, flagging stretched declines for mean-reversion longs.
- Triangle labels: mark each crossing as it happens and remain anchored to their bar, which is what makes them usable in real time.
A note on expectations: extremity crossings describe stretch, not guaranteed reversals, and nothing suggests this envelope outperforms traditional band tools — treat it as a single input within a broader plan rather than a standalone system.
Nadaraya-Watson Envelope Settings
- Bandwidth: controls the smoothness of the envelopes; higher values produce smoother results.
- Mult: sets the width of the envelope.
- Source: the input series used for calculation.
- Repainting Smoothing: chooses between the repainting fit and the non-repainting endpoint method.
Frequently Asked Questions
Does the Nadaraya-Watson Envelope repaint?
With the default settings, yes — the kernel fit is recomputed over the window as new bars arrive. Switch Repainting Smoothing to the endpoint method and the indicator stops repainting, behaving like a conventional band tool.
How does it relate to the Nadaraya-Watson Smoothers?
It is built directly on them: the Nadaraya-Watson Smoothers plot the kernel fit itself, while this tool wraps deviation-based bands around that fit and adds the extremity-crossing triangles and alerts.
What does it cost to use the Nadaraya-Watson Envelope?
Nothing — it ships free in the LuxAlgo Library, and you can compare the repainting and endpoint modes by running it in Quant, LuxAlgo's AI, via this page.
Free indicator
Get free access to this indicator on the platforms below.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
.png&w=1200&q=75)