Add VWAPSD (Volume Weighted Average Price with Standard Deviation Bands) implementation and validation tests

- Implemented Vwapsd class for calculating VWAP with configurable standard deviation bands.
- Added methods for updating the indicator with new bars and calculating VWAPSD using both bar series and span arrays.
- Created comprehensive validation tests for VWAPSD, including checks for consistency between streaming and batch modes, mathematical correctness, and handling of edge cases such as NaN values and zero volume bars.
- Ensured that the implementation adheres to performance standards with tests for large datasets and fractional numDevs values.
This commit is contained in:
Miha Kralj
2026-01-24 19:07:52 -08:00
parent fd6c80e8db
commit 744d680435
32 changed files with 9090 additions and 538 deletions
+5 -5
View File
@@ -25,8 +25,8 @@ Channels define dynamic support and resistance. Upper band shows where price ten
| [REGCHANNEL](regchannel/RegChannel.md) | Linear Regression Channel | Linear regression line with standard deviation bands. |
| [SDCHANNEL](sdchannel/SdChannel.md) | Standard Deviation Channel | Moving average with standard deviation bands. |
| [STARCHANNEL](starchannel/StarChannel.md) | Stoller Average Range Channel | SMA with ATR bands. Similar to Keltner but uses SMA instead of EMA. |
| STBANDS | Super Trend Bands | ATR-based trend-following bands. Flips direction on breakout. |
| UBANDS | Universal Bands | Flexible band system supporting multiple MA types and band calculations. |
| UCHANNEL | Universal Channel | Flexible channel implementation supporting multiple methods. |
| VWAPBANDS | VWAP Bands | Volatility bands around VWAP. Institutional trading reference. |
| VWAPSD | VWAP Standard Deviation Bands | Standard deviation bands around VWAP. |
| [STBANDS](stbands/Stbands.md) | Super Trend Bands | ATR-based trend-following bands. Flips direction on breakout. |
| [UBANDS](ubands/Ubands.md) | Ehlers Ultimate Bands | USF-based volatility channel with RMS bands. Zero-lag smoothing by Ehlers. |
| [UCHANNEL](uchannel/Uchannel.md) | Ehlers Ultimate Channel | USF-based volatility channel with Smoothed True Range bands. Zero-lag by Ehlers. |
| [VWAPBANDS](vwapbands/Vwapbands.md) | VWAP Bands | Volume-weighted average price with dual ±1σ and ±2σ standard deviation bands. |
| [VWAPSD](vwapsd/Vwapsd.md) | VWAP Standard Deviation Bands | Standard deviation bands around VWAP. |