Implement Weighted Moving Average (WMA) and Multi-Period WMA (WmaVector) classes with O(1) update complexity

- Added Wma class for calculating the Weighted Moving Average with detailed documentation and optimized performance using dual running sums.
- Introduced WmaVector class to handle multiple WMAs simultaneously, supporting batch calculations and real-time updates.
- Implemented last-value substitution for handling invalid inputs (NaN/Infinity) in both classes.
- Created comprehensive unit tests for Wma and WmaVector to ensure accuracy and reliability of calculations.
- Updated documentation to include usage examples, mathematical foundations, and performance characteristics.
This commit is contained in:
Miha Kralj
2025-11-29 19:31:50 -08:00
parent 1f80cfda74
commit 5c1fb18520
11 changed files with 2267 additions and 6 deletions
+1
View File
@@ -2,6 +2,7 @@
"recommendations": [
"ms-dotnettools.csdevkit",
"ms-dotnettools.csharp",
"ms-dotnettools.dotnet-interactive-vscode",
"bierner.markdown-mermaid"
]
}