NVI
NVI
Summary
Negative Volume Index: a running cumulative index that changes only on days when
volume falls versus the prior day, compounding that day's percentage price change.
The premise is that quiet, low-volume days reflect the actions of well-informed
"smart money", so NVI is read as a proxy for that cohort's positioning.
Formula
NVI[startIdx] = 1000
For each subsequent bar i:
NVI[i] = NVI[i-1] + ( inVolume[i] < inVolume[i-1]
? ((inClose[i] - inClose[i-1]) / inClose[i-1]) * NVI[i-1]
: 0 )
The index carries forward unchanged on bars whose volume did not fall (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 negative volume index (seeded at 1000)
Properties
Numerical Stability: Path-Dependent
| Display Flags |
|---|
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
Implementation
TA-Lib Definition: nvi.c · nvi.yaml
| Native | File |
|---|---|
| C | ta_NVI.c |
| Rust | nvi.rs |
| Java | Core_NVI.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Negative Volume Index
References
- Norman G. Fosback, Stock Market Logic, The Institute for Econometric Research (ISBN 0917604482)