Refactor documentation to remove "Zero-Allocation Design" sections across various trend indicators and implement a PowerShell script for automated cleanup

- Updated mathematical foundations and performance profiles where necessary to maintain clarity and coherence.
This commit is contained in:
Miha Kralj
2025-12-21 14:37:44 -08:00
parent 54c309e5cf
commit a7b7207801
65 changed files with 1766 additions and 482 deletions
-13
View File
@@ -32,19 +32,6 @@ $$ TRIMA = SMA(SMA(Price, P_1), P_2) $$
## Performance Profile
### Zero-Allocation Design
TRIMA relies on two internal `Sma` instances, which use pre-allocated `RingBuffer`s. The chaining of updates is done via value passing, ensuring no intermediate objects are created on the heap.
| Metric | Score | Notes |
| :--- | :--- | :--- |
| **Throughput** | High | 2 SMAs |
| **Complexity** | O(1) | Constant time update |
| **Accuracy** | 6/10 | Heavily smoothed, loses detail |
| **Timeliness** | 4/10 | Significant lag (Lag ≈ N/2 + N/2) |
| **Overshoot** | 9/10 | Very stable, minimal overshoot |
| **Smoothness** | 9/10 | Triangular weighting removes high freq noise |
## Validation
Validated against TA-Lib (`TA_TRIMA`) and Skender.Stock.Indicators.