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
@@ -13,9 +13,7 @@
| **PineScript** | [harmean.pine](harmean.pine) |
- The Harmonic Mean computes the reciprocal of the arithmetic mean of reciprocals over a sliding window.
- Parameterized by `period`.
- Output range: Varies (see docs).
- Requires `period` bars of warmup before first valid output (IsHot = true).
- **Similar:** [Geomean](../geomean/Geomean.md), [CMA](../cma/Cma.md) | **Trading note:** Harmonic mean; appropriate for averaging rates/ratios. Always ≤ geometric mean ≤ arithmetic mean.
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
The Harmonic Mean computes the reciprocal of the arithmetic mean of reciprocals over a sliding window. It is the correct average for quantities defined in terms of rates or ratios (speed, P/E ratios, yield). For financial time series, the harmonic mean gives the largest discount to outliers, making it the most conservative of the three Pythagorean means.
@@ -128,4 +126,4 @@ Self-validated against mathematical properties and Wolfram Alpha known values.
- Bullen, P.S. "Handbook of Means and Their Inequalities." Kluwer Academic Publishers, 2003.
- Ferger, W.F. "The Nature and Use of the Harmonic Mean." Journal of the American Statistical Association, 1931.
- PineScript reference: `lib/statistics/harmean/harmean.pine`
- PineScript reference: `lib/statistics/harmean/harmean.pine`