mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-11-02 07:26:12 +00:00
- MAMA: replace atan2+angle-wrapping with Ehlers/TA-Lib's atan(Q/I) signed-delta discriminator for both phase and period calculations. Was diverging from TA-Lib/Skender by up to 11%; now matches within 0.01 absolute tolerance. - NATR: fix TA-Lib validation test dividing ATR by a close price ~14 bars misaligned (TA-Lib's output array is offset-compact, not absolute-indexed). Now passes at 1e-9 instead of masking the bug with a 0.10 tolerance. - ValidationHelper: tighten default tolerances to match AGENTS.md (1e-9 for Skender/TALib/Tulip, 1e-6 for Ooples, was 1e-7 uniformly). Added documented per-test tolerance overrides where large-window/large-magnitude sums (WMA/HMA/TRIMA/DWMA period=100, rolling StdDev/Variance, AD cumulative sum, linear regression) genuinely exceed 1e-9 due to floating-point accumulation order, not algorithmic divergence. - ROC/ROCP/ROCR: old Roc (Price-Price[N]) was an exact duplicate of Mom; removed. Old Rocp (100*(P-P[N])/P[N]) was actually TA-Lib's ROC formula; renamed to Roc. New Rocp created with TA-Lib's real ROCP formula ((P-P[N])/P[N], no *100). Updated C#, Quantower, Python bindings, and pandas-ta parity tests accordingly. - Added Validation.Tests.cs for 12 previously-unvalidated indicators: Sarext (TA-Lib SarExt), Minindex/Maxindex (TA-Lib MinIndex/MaxIndex, exact match), Convexity (Skender GetBeta BetaType.All), Vwmacd (Vwma+Ema composition), and independent formula re-derivations for Usi, Eeo, Net, Pta, Amfm, Hwc (no external library implements these Ehlers indicators). Lpf validated structurally (documented invariants) given its 5-stage adaptive algorithm. - Updated docs/validation.md, Roc.md/Rocp.md/Mom.md/Mama.md accordingly.