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— Close price of each barinVolume— Volume of each bar
Outputs
outReal— Cumulative positive volume index (seeded at 1000)
Properties
Numerical Stability: Path-Dependent
| Display Flags |
|---|
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
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)