Merge branch 'dev'

This commit is contained in:
Miha Kralj
2026-03-13 13:47:10 -07:00
404 changed files with 2754 additions and 1763 deletions
+2 -4
View File
@@ -14,9 +14,7 @@
| **Signature** | [nw_signature](nw_signature.md) |
- NW computes the Nadaraya-Watson kernel regression estimator with a Gaussian kernel, producing a nonparametric smooth of the price series.
- Parameterized by `period` (default 64), `bandwidth` (default 8.0).
- Output range: Tracks input.
- Requires `period` bars of warmup before first valid output (IsHot = true).
- **Similar:** [Loess](../loess/Loess.md), [SGF](../sgf/Sgf.md) | **Complementary:** Bandwidth selection via cross-validation | **Trading note:** Nadaraya-Watson kernel regression; non-parametric smoother with Gaussian kernel.
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
NW computes the Nadaraya-Watson kernel regression estimator with a Gaussian kernel, producing a nonparametric smooth of the price series. For each bar, every observation in the lookback window is weighted by a Gaussian function of its temporal distance, with the bandwidth parameter $h$ controlling the effective smoothing radius. Small $h$ tracks price tightly (low bias, high variance); large $h$ smooths heavily (high bias, low variance). This implementation is non-repainting (backward-looking only).
@@ -127,4 +125,4 @@ AVX2 dot product on contiguous double array: ~200-250 cy for N=200 vs ~1200 scal
- Nadaraya, E.A. (1964). "On Estimating Regression." *Theory of Probability and Its Applications*, 9(1), 141-142.
- Watson, G.S. (1964). "Smooth Regression Analysis." *Sankhyā: The Indian Journal of Statistics*, Series A, 26(4), 359-372.
- Wand, M.P. & Jones, M.C. (1995). *Kernel Smoothing*. Chapman & Hall/CRC. Chapter 2: The Density Estimator.
- Wand, M.P. & Jones, M.C. (1995). *Kernel Smoothing*. Chapman & Hall/CRC. Chapter 2: The Density Estimator.