PVI
PVI
Summary
Positive Volume Index: a running cumulative index that changes only on days when
volume rises versus the prior day, compounding that day's percentage price change.
The premise is that active, high-volume days reflect the actions of the
less-informed "crowd", so PVI is read as a proxy for that cohort's positioning.
Formula
PVI[startIdx] = 1000
For each subsequent bar i:
PVI[i] = PVI[i-1] + ( inVolume[i] > inVolume[i-1]
? ((inClose[i] - inClose[i-1]) / inClose[i-1]) * PVI[i-1]
: 0 )
The index carries forward unchanged on bars whose volume did not rise (and on the
degenerate case of a zero previous close, which would otherwise divide by zero).
Inputs
inCloseโ Closing price series, providing the bar-over-bar percentage changeinVolumeโ Volume series, compared bar-over-bar to gate each update
Outputs
outRealโ Cumulative positive volume index (seeded at 1000)
Implementation
TA-Lib Definition: pvi.c ยท pvi.yaml
| Native | File |
|---|---|
| C | ta_PVI.c |
| Rust | pvi.rs |
| Java | Core_PVI.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Positive Volume Index
References
- Norman G. Fosback, Stock Market Logic, The Institute for Econometric Research (ISBN 0917604482)