- VWAP with Standard Deviation Bands combines the Volume Weighted Average Price with a single configurable standard deviation band pair, providing a ...
- Parameterized by `numdevs` (default defaultnumdevs).
- Output range: Tracks input.
- Requires `2` bars of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
VWAP with Standard Deviation Bands combines the Volume Weighted Average Price with a single configurable standard deviation band pair, providing a simpler alternative to VWAPBANDS (which uses dual $\pm 1\sigma$ and $\pm 2\sigma$ levels). Three running sums enable O(1) streaming updates. A session reset mechanism clears accumulations at configurable intervals, keeping the indicator anchored to current market structure. The configurable deviation parameter allows traders to select their desired confidence level ($1\sigma$ ≈ 68%, $2\sigma$ ≈ 95%, $3\sigma$ ≈ 99.7%).
VWAP emerged in the 1980s as institutional traders needed a benchmark reflecting actual market participation. Berkowitz, Logue, and Noser (1988) established VWAP as the standard for measuring execution quality. The concept is straightforward: weight each price by the volume traded at that price, producing an average that reflects where the most conviction-backed trading occurred.
The standard deviation extension follows the same reasoning as Bollinger Bands but applied to volume-weighted statistics. By adding bands at $n$ standard deviations from VWAP, the indicator creates a statistically grounded channel that adapts to actual volume-weighted volatility.
VWAPSD differs from VWAPBANDS only in output structure: VWAPSD emits one band pair at a configurable distance, while VWAPBANDS always emits two band pairs ($\pm 1\sigma$ and $\pm 2\sigma$). The underlying VWAP and variance calculations are identical.
On a reset condition, all running sums restart from zero. Configurable reset intervals include intraday (1m through 4H), daily, weekly, monthly, quarterly, semi-annual, annual, or never.
Streaming: $O(1)$ per bar. Three additions to running sums, one division, one square root. Memory: three doubles for running sums plus scalar state (~64 bytes per instance).