mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-18 10:38: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:
@@ -4,6 +4,13 @@ namespace QuanTAlib.Tests;
|
||||
|
||||
public class MmaValidationTests
|
||||
{
|
||||
// Note: External library validation is not feasible for MMA:
|
||||
// - MMA (Modified Moving Average) is a QuanTAlib-specific algorithm that blends SMA with
|
||||
// a weighted deviation component: output = SMA + weightedSum * 6/(count*(count+1)).
|
||||
// - Skender's GetSmma() / Tulip's wilders = Wilder's smoothing (SMMA), a completely different algorithm.
|
||||
// - TALib, OoplesFinance: No equivalent MMA implementation.
|
||||
// Validated against independent reference implementation in tests below.
|
||||
|
||||
[Fact]
|
||||
public void Mma_Streaming_MatchesReference()
|
||||
{
|
||||
|
||||
@@ -4,6 +4,14 @@ namespace QuanTAlib.Tests;
|
||||
|
||||
public class ZlemaValidationTests
|
||||
{
|
||||
// Note: External library validation is not feasible for ZLEMA:
|
||||
// - Tulip: Uses SMA-seeded EMA initialization, producing a persistent offset vs QuanTAlib's
|
||||
// debiased warmup (diff ~0.009% at bar 200, does not converge). Algorithm variant.
|
||||
// - Skender.Stock.Indicators: Does not have a ZLEMA implementation.
|
||||
// - TALib: Does not have a ZLEMA function.
|
||||
// - OoplesFinance: Does not have a ZLEMA implementation.
|
||||
// Validated against independent reference implementation in tests below.
|
||||
|
||||
[Fact]
|
||||
public void Zlema_Streaming_MatchesReference()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user