Add validation tests for various volume and momentum indicators

- Introduced Massi validation tests to ensure mathematical properties hold for the Mass Index indicator.
- Added Va validation tests for Volume Accumulation, checking for finite outputs and correct accumulation behavior.
- Implemented Vf validation tests for Volume Force, verifying outputs for rising and falling prices, and ensuring batch and streaming results match.
- Created Vo validation tests for Volume Oscillator, confirming behavior with constant, increasing, and decreasing volumes.
- Developed Vroc validation tests for Volume Rate of Change, validating outputs for constant volume and changes in volume.
- Updated project file to include new momentum indicators (MACD and RSI) in the compilation.
This commit is contained in:
Miha Kralj
2026-02-12 19:43:09 -08:00
parent 92709ef2ed
commit 951842acca
56 changed files with 12350 additions and 359 deletions
+5
View File
@@ -116,9 +116,14 @@ Bounded indicators that oscillate around a centerline or between fixed extremes.
| [**PGO**](../lib/oscillators/pgo/Pgo.md) | Pretty Good Oscillator | ATR-normalized SMA displacement |
| [**SMI**](../lib/oscillators/smi/Smi.md) | Stochastic Momentum Index | Distance from range midpoint (K/D lines) |
| [**STOCH**](../lib/oscillators/stoch/Stoch.md) | Stochastic Oscillator | Close within N-period H/L range (%K/%D) |
| [**STOCHF**](../lib/oscillators/stochf/Stochf.md) | Stochastic Fast | Unsmoothed Stochastic (%K/%D, SMA smoothing only) |
| [**STOCHRSI**](../lib/oscillators/stochrsi/Stochrsi.md) | Stochastic RSI | Stochastic applied to RSI (%K/%D) |
| [**TRIX**](../lib/oscillators/trix/Trix.md) | Triple Exponential Average | ROC of triple-smoothed EMA |
| [**MACD**](../lib/momentum/macd/Macd.md) | MACD | EMA crossover system |
| [**RSI**](../lib/momentum/rsi/Rsi.md) | Relative Strength Index | Bounded 0-100 momentum |
| [**ULTOSC**](../lib/oscillators/ultosc/Ultosc.md) | Ultimate Oscillator | Multi-timeframe weighted |
| [**TTM_WAVE**](../lib/oscillators/ttm_wave/TtmWave.md) | TTM Wave | Fibonacci-period MACD composite (A/B/C waves) |
| [**WILLR**](../lib/oscillators/willr/Willr.md) | Williams %R | Inverse Stochastic (-100 to 0) |
### Dynamics
+5 -4
View File
@@ -247,10 +247,10 @@ No external reference exists. Implementation verified through unit tests, edge c
| **Standard Deviation Channel** | [Sdchannel](../lib/channels/sdchannel/sdchannel.md) | - | - | - | ❔ |
| **Standardization (Z-score)** | Standardize | - | - | - | ❔ |
| **Starc Bands** | Starc | - | - | - | - |
| **Stochastic Fast** | Stochf | ✔️ | - | - | ❔ |
| **Stochastic Fast** | [Stochf](../lib/oscillators/stochf/Stochf.md) | ✔️ | - | - | ❔ |
| **Stochastic Momentum Index** | [Smi](../lib/oscillators/smi/Smi.md) | - | - | ✔️ | ❔ |
| **Stochastic Oscillator** | [Stoch](../lib/oscillators/stoch/Stoch.md) | - | - | ✔️ | - |
| **Stochastic RSI** | Stochrsi | ✔️ | ✔️ | ✔️ | ❔ |
| **Stochastic RSI** | [Stochrsi](../lib/oscillators/stochrsi/Stochrsi.md) | ✔️ | ✔️ | ✔️ | ❔ |
| **Stoller Average Range Channel** | [Starchannel](../lib/channels/starchannel/starchannel.md) | - | - | - | ❔ |
| **Super Trend Bands** | [Stbands](../lib/channels/stbands/Stbands.md) | - | - | - | - |
| **SuperTrend** | [Super](../lib/trends/super/super.md) | - | - | ✔️ | ❔ |
@@ -262,11 +262,12 @@ No external reference exists. Implementation verified through unit tests, edge c
| **Time Weighted Average Price** | Twap | - | - | - | - |
| **Trade Volume Index** | Tvi | - | - | - | ❔ |
| **Triangular Moving Average** | [Trima](../lib/trends/trima/trima.md) | ✔️ | ✔️ | ✔️ | ❔ |
| **Triple Exponential Average** | Trix | ✔️ | ✔️ | ✔️ | ❔ |
| **Triple Exponential Average** | [Trix](../lib/oscillators/trix/Trix.md) | ✔️ | ✔️ | ✔️ | ❔ |
| **Triple Exponential Moving Average** | [Tema](../lib/trends/tema/tema.md) | ✔️ | ✔️ | ✔️ | ❔ |
| **True Range** | Tr | ✔️ | ✔️ | ✔️ | - |
| **True Strength Index** | Tsi | - | - | ✔️ | ❔ |
| **TTM Trend** | Ttm | - | - | - | - |
| **TTM Wave** | [TtmWave](../lib/oscillators/ttm_wave/TtmWave.md) | - | - | - | - |
| **Two-Argument Arctangent** | Atan2 | - | - | - | - |
| **Ulcer Index** | Ui | - | - | ✔️ | ❔ |
| **Ultimate Bands (Ehlers)** | [Ubands](../lib/channels/ubands/Ubands.md) | - | - | - | - |
@@ -289,7 +290,7 @@ No external reference exists. Implementation verified through unit tests, edge c
| **VWAP with Standard Deviation Bands** | [Vwapsd](../lib/channels/vwapsd/Vwapsd.md) | - | - | - | - |
| **Weighted Moving Average** | [Wma](../lib/trends/wma/wma.md) | ✔️ | ✔️ | ✔️ | ✔️ |
| **Wiener Filter** | Wiener | - | - | - | - |
| **Williams %R** | Willr | ✔️ | ✔️ | ✔️ | ❔ |
| **Williams %R** | [Willr](../lib/oscillators/willr/Willr.md) | ✔️ | ✔️ | ✔️ | ❔ |
| **Williams Accumulation/Distribution** | [Wad](../lib/volume/wad/Wad.md) | - | - | - | [⚠️](../lib/volume/wad/Wad.md#validation) |
| **Williams Alligator** | Alligator | - | - | ✔️ | ❔ |
| **Williams Fractal** | Fractals | - | - | ✔️ | ❔ |