Ten Kernel Weighting Functions for Statistical Smoothing
Summary
This Pine library implements ten kernel functions that map a distance from an origin and a bandwidth to a weight. It includes compact-support choices such as uniform, triangular, Epanechnikov, quartic, triweight, tricubic, and cosine kernels, alongside Gaussian, logistic, and sigmoid forms. A selector function lets a caller choose a kernel by name, while plotted examples compare their shapes over a repeating distance series.
The library is a reusable mathematical component, not a trading strategy or a tested forecasting method. Kernel weights can support nonparametric smoothing or local estimation when combined with an appropriate data series and normalization, but the document does not show such an estimator, discuss bandwidth selection, or provide market results. The compact-support formulas return zero beyond the bandwidth, while the other formulas retain nonzero tails. Users should check scaling and normalization for their intended statistical use; the included plots only illustrate function profiles.
Key ideas
- Each kernel converts distance from an origin into a weight controlled by bandwidth.
- Several functions restrict weights to distances within the bandwidth, while Gaussian, logistic, and sigmoid forms have tails.
- A selector dispatches to a kernel by its name and reports an error for an unsupported choice.
- The examples compare kernel profiles but do not demonstrate a complete trading signal or estimator.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.