Files
QuanTAlib/lib/momentum/_index.md
T
Miha Kralj 2193c4e6ea Fix MAMA phase discriminator, NATR test bug, tolerance unification, ROC naming, add 12 validation files
- 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.
2026-09-23 14:47:41 +02:00

2.6 KiB

Momentum

Momentum indicators measure the velocity and acceleration of price changes. Unlike trend indicators (which answer "where is price going?"), momentum indicators answer "how fast?" and "is it slowing down?". This distinction matters: a strong trend can have weakening momentum (divergence), and a ranging market can show momentum spikes (false breakouts).

Indicators

Indicator Full Name Description
ASI Accumulation Swing Index Wilder's cumulative swing index. Breakout confirmation.
BIAS Bias (also known as Disparity Index) Percentage deviation from moving average. Measures overextension.
BOP Balance of Power Measures buyer/seller strength by comparing close to open relative to range.
CCI Commodity Channel Index Measures price deviation from statistical mean, identifies cyclical turns.
CFB Composite Fractal Behavior Measures trend duration and quality via fractal efficiency across 96 time scales.
CMO Chande Momentum Oscillator Momentum using both up and down changes, bounded but not clamped like RSI.
MACD Moving Average Convergence Divergence Relationship between two EMAs, identifies momentum and trend direction.
MOM Momentum Raw price change over specified period.
PMO Price Momentum Oscillator Double-smoothed ROC oscillator.
PPO Percentage Price Oscillator MACD expressed as percentage for cross-instrument comparison.
ROC Rate of Change Percentage price change over N periods.
ROCP Rate of Change (Fractional) Decimal fractional price change over N periods.
ROCR Rate of Change Ratio Price ratio over N periods.
RS Price Relative Strength Performance ratio between two assets.
RSI Relative Strength Index Speed and change of price movements, bounded 0-100.
RSX Relative Strength Quality Index Noise-free RSI using cascaded IIR filters, zero lag at turning points.
SAM Ehlers Smoothed Adaptive Momentum Ehlers. Hilbert Transform cycle detection + adaptive momentum + Super Smoother output.
TSI True Strength Index Double-smoothed momentum oscillator.
VEL Jurik Velocity Market acceleration via PWMA vs WMA differential.
VWMACD Volume-Weighted MACD VWMA-based MACD with signal line and histogram. Volume-aware momentum.