mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-16 01:28:05 +00:00
Enhance validation tests for various indicators with external library comparisons
- Added detailed comments explaining the validation limitations for MMA and ZLEMA due to differences in algorithm implementations. - Implemented validation tests for True Range against TALib and Tulip, ensuring directional agreement. - Updated Ulcer Index validation to clarify differences in algorithmic approaches between QuanTAlib and Skender. - Enhanced Ease of Movement tests to verify directional agreement with Tulip's EMV, noting differences in volume scaling. - Expanded Klinger Volume Oscillator tests to validate against Skender and Tulip, focusing on directional agreement across multiple period configurations. - Improved Negative Volume Index tests to compare percentage changes with Tulip, addressing differences in starting values. - Updated Positive Volume Index tests to validate against Tulip, emphasizing percentage change comparisons. - Enhanced Williams Accumulation/Distribution tests to verify directional agreement with Tulip, highlighting formula differences.
This commit is contained in:
@@ -661,4 +661,12 @@ public class UiValidationTests
|
||||
double expected = Math.Sqrt(22.6757369614512 / 3.0);
|
||||
Assert.Equal(expected, result.Value, 5);
|
||||
}
|
||||
|
||||
// === External Library Validation ===
|
||||
// NOTE: Skender.Stock.Indicators uses a different Ulcer Index algorithm variant:
|
||||
// Skender: For each bar j in the period window, highestClose = max(closes from window_start to j)
|
||||
// Each bar gets its own "growing" highest reference within the evaluation window.
|
||||
// QuanTAlib: highestClose = max(closes over the entire rolling period window)
|
||||
// Both are valid implementations of the Ulcer Index concept, but produce different values.
|
||||
// No external validation test is added for UI due to this algorithmic difference.
|
||||
}
|
||||
Reference in New Issue
Block a user