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** | [geomean.pine](geomean.pine) |
- The Geometric Mean computes the nth root of the product of n positive values over a sliding window.
- Parameterized by `period`.
- Output range: Varies (see docs).
- Requires `period` bars of warmup before first valid output (IsHot = true).
- **Similar:** [Harmean](../harmean/Harmean.md), [CMA](../cma/Cma.md) | **Trading note:** Geometric mean; proper average for returns/growth rates. Accounts for compounding.
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
The Geometric Mean computes the nth root of the product of n positive values over a sliding window. Unlike the arithmetic mean, it captures multiplicative relationships and is the correct average for growth rates, ratios, and log-normally distributed data. For financial time series, this means it properly accounts for compounding.
@@ -151,4 +149,4 @@ Geomean.Batch(inputSpan, outputSpan, period: 14);
- Euclid, *Elements*, Book VI, Proposition 13 (ca. 300 BCE).
- Cauchy, A.-L. "Cours d'analyse de l'Ecole royale polytechnique" (1821). First rigorous proof of AM-GM.
- Kahan, W. "Pracniques: Further Remarks on Reducing Truncation Errors" (1965).
- PineScript `ta.geomean()` reference implementation.
- PineScript `ta.geomean()` reference implementation.