mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-19 02:58:05 +00:00
Merge branch 'dev'
This commit is contained in:
@@ -13,9 +13,7 @@
|
||||
| **PineScript** | [sum.pine](sum.pine) |
|
||||
|
||||
- The Sum indicator calculates a rolling window summation using the Kahan-Babuška algorithm (also known as "improved Kahan" or "second-order compensa...
|
||||
- Parameterized by `period`.
|
||||
- Output range: Varies (see docs).
|
||||
- Requires `period` bars of warmup before first valid output (IsHot = true).
|
||||
- **Trading note:** Rolling sum; cumulative total over lookback window. Building block for many indicators (e.g., OBV, A/D).
|
||||
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
|
||||
|
||||
The Sum indicator calculates a rolling window summation using the Kahan-Babuška algorithm (also known as "improved Kahan" or "second-order compensated summation") for maximum numerical precision. This approach captures rounding errors that even classic Kahan summation misses, making it suitable for numerical libraries, statistics, and trading applications where precision matters.
|
||||
@@ -206,4 +204,4 @@ source.Add(new TValue(DateTime.UtcNow, 100.0));
|
||||
* Values are similar magnitude
|
||||
* Sequence length is bounded and small
|
||||
* Maximum throughput is critical
|
||||
* Using `decimal` type instead
|
||||
* Using `decimal` type instead
|
||||
Reference in New Issue
Block a user