Price Volume Trend (PVT)
Summary
Price Volume Trend: a running cumulative total of each bar's volume weighted by that bar's fractional price change. It is the On Balance Volume idea with partial credit — where OBV adds or subtracts a bar's whole volume on the sign of the move, PVT adds only the fraction of that volume proportional to the size of the move.
Read the slope and the divergences, not the level: the total's zero point is arbitrary, so only the shape of the curve carries information. A rising PVT while price is flat says volume is accumulating on the up moves; a falling PVT while price rises is the classic bearish divergence.
Formula
PVT[i] = PVT[i-1] + inVolume[i] * (inClose[i] - inClose[i-1]) / inClose[i-1]
The series starts at zero on the first bar of the requested range.
Notes
- The absolute level is arbitrary and depends on where the accumulation started, so two ranges over the same data give curves of the same shape at different offsets.
- Some libraries scale the per-bar term by 100. This implementation follows the fractional definition, which every primary reference below states.
- A bar whose previous close is exactly zero contributes nothing and the running total is carried forward unchanged, rather than dividing by zero. A flat stretch of the output can therefore mean either genuine zero net accumulation or a run of zero previous closes.
Inputs
inClose— Close price of each barinVolume— Volume of each bar
Outputs
outReal— Cumulative price volume trend, seeded at zero
Properties
Numerical Stability: Path-Dependent
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
| ☐ Can Output NaN or ±Inf |
| ☐ Identity at Period 1 |
Implementation
TA-Lib Definition: pvt.c · pvt.yaml
| Native | File |
|---|---|
| C | ta_PVT.c |
| Rust | pvt.rs |
| Java | Core_PVT.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Price Volume Trend, Volume Price Trend, VPT