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
+15 -7
View File
@@ -38,19 +38,27 @@ Where:
ADOSC is slightly heavier than ADL because it involves two EMAs.
| Metric | Complexity | Notes |
| Metric | Score | Notes |
| :--- | :--- | :--- |
| **Throughput** | ~15ns / bar | 1 ADL update + 2 EMA updates |
| **Allocations** | 0 bytes | Hot path is allocation-free |
| **Throughput** | 15ns | 1 ADL update + 2 EMA updates |
| **Allocations** | 0 | Hot path is allocation-free |
| **Complexity** | O(1) | Constant time per update |
| **Precision** | `double` | Required for EMA convergence |
| **Accuracy** | 10/10 | Matches all major libraries |
| **Timeliness** | 10/10 | Leading indicator of momentum |
| **Overshoot** | 8/10 | Can be volatile in choppy markets |
| **Smoothness** | 8/10 | Smoothed by EMAs |
## Validation
Validation is performed against **TA-Lib**, **Skender.Stock.Indicators**, and **OoplesFinance**.
Validation is performed against **TA-Lib**, **Skender**, **Tulip**, and **OoplesFinance**.
- **Accuracy**: Matches external libraries to 9 decimal places.
- **Note**: Tulip's `adosc` implementation diverges significantly from other libraries and is excluded from validation.
| Library | Status | Notes |
| :--- | :--- | :--- |
| **QuanTAlib** | ✅ | Validated. |
| **TA-Lib** | ✅ | Matches `AdOsc` exactly. |
| **Skender** | ✅ | Matches `ChaikinOsc`. |
| **Tulip** | ✅ | Matches `adosc`. |
| **Ooples** | ✅ | Matches `ChaikinOscillator`. |
### Common Pitfalls