feat: Add Cumulative Moving Average (CMA) implementation with detailed documentation

- Introduced Cma class for calculating the Cumulative Moving Average using Welford's algorithm with FMA for precision.
- Added methods for batch processing and streaming updates.
- Implemented a comprehensive markdown documentation for CMA, covering its mathematical foundation, performance profile, and use cases.
- Enhanced existing trend indicators (Bessel, Butter, Htit, Jma, Mama, Ssf, Vidya) with FMA for improved numerical stability and precision.
- Updated Adosc to utilize a single-pass algorithm for performance optimization.
- Fixed date initialization in benchmarks to ensure UTC consistency.
This commit is contained in:
Miha Kralj
2025-12-29 09:34:37 -08:00
parent 43ce6e63e4
commit 16a21a5b65
26 changed files with 1816 additions and 142 deletions
+1 -1
View File
@@ -434,7 +434,7 @@ public static class ValidationHelper
for (int i = 0; i < qSeries.Count; i++)
{
double? sValue = selector(sSeries[i]);
if (!sValue.HasValue || sValue.Value == 0) continue;
if (!sValue.HasValue || Math.Abs(sValue.Value) < double.Epsilon) continue;
double relDiff = Math.Abs((qSeries[i].Value - sValue.Value) / sValue.Value);
if (relDiff > maxDiff)