Skip to content
All library documents

Non-Repainting Nadaraya-Watson Envelope Using Kernel Smoothing

Article ProRealCode

Summary

This document describes a price envelope built around a smoothed estimate of the underlying trend. It uses an endpoint Nadaraya-Watson estimator with kernel weights to calculate the centerline, then estimates deviations from that line using an exponentially averaged absolute error. A scaled deviation is added to and subtracted from the centerline to form upper and lower bands. The example specifies a window length of 21, bandwidth of 8, and multiplier of 2.

The stated purpose is to outline price extremes, with a non-repainting approach intended to behave similarly to conventional band indicators. The included indicator code illustrates the weighting, centerline, deviation, and band construction, but the document gives no market examples, signal rules, or performance tests. It does not establish that touches or breaks of the envelope predict reversals or continuations. Users would need to evaluate the estimator and settings on their own data and account for the limitations of any band-based interpretation.

Key ideas

  • The envelope centers on an endpoint Nadaraya-Watson estimate of the price trend.
  • Kernel weights combine recent prices into the smoothed centerline.
  • An exponentially averaged absolute deviation sets the distance of the upper and lower bands.
  • The example uses a window of 21, bandwidth of 8, and deviation multiplier of 2.
  • The document presents an indicator construction but no trading rules or performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.