mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-24 13:38:05 +00:00
Merge branch 'dev'
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user