Enhance documentation and validation for various indicators

This commit is contained in:
Miha Kralj
2025-12-22 20:42:26 -08:00
parent 5bb8c122c0
commit 4efa0e773e
81 changed files with 4267 additions and 640 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ public class VidyaValidationTests
var refResults = CalculateVidyaReference(_testData.Data, period);
// Compare
ValidationHelper.VerifyData(qResults, refResults, x => x);
ValidationHelper.VerifyData(qResults, refResults, x => x, tolerance: 1e-9);
_output.WriteLine("VIDYA validated successfully against reference implementation");
}
@@ -61,7 +61,7 @@ public class VidyaValidationTests
var refResults = CalculateVidyaReference(_testData.Data, period);
// Compare
ValidationHelper.VerifyData(qResults, refResults, x => x);
ValidationHelper.VerifyData(qResults, refResults, x => x, tolerance: 1e-9);
_output.WriteLine("VIDYA Batch validated successfully against reference implementation");
}
+17 -1
View File
@@ -35,9 +35,25 @@ $$ VIDYA_t = (\alpha_{dynamic} \times Price_t) + ((1 - \alpha_{dynamic}) \times
## Performance Profile
| Metric | Score | Notes |
| :--- | :--- | :--- |
| **Throughput** | 9 | High; O(1) calculation with CMO volatility index. |
| **Allocations** | 0 | Zero-allocation in hot paths. |
| **Complexity** | O(1) | Constant time regardless of period. |
| **Accuracy** | 10 | Matches reference implementation exactly. |
| **Timeliness** | 8 | Adaptive; speeds up in trends, slows in ranges. |
| **Overshoot** | 2 | Minimal overshoot; constrained by dynamic alpha. |
| **Smoothness** | 7 | Variable; smooth in ranges, responsive in trends. |
## Validation
Validated against the original formula and reference implementations.
| Library | Status | Notes |
| :--- | :--- | :--- |
| **QuanTAlib** | ✅ | Validated. |
| **TA-Lib** | N/A | Not implemented. |
| **Skender** | N/A | Not implemented. |
| **Tulip** | ❌ | Uses Standard Deviation ratio (1992), not CMO (1994). |
| **Ooples** | ❌ | Diverges significantly due to volatility logic. |
### Common Pitfalls