Debated1 min read
◆ The PatternA running total of volume, signed by each day’s direction: does volume confirm the move or not
On-Balance Volume — Joe Granville's cumulative volume indicator (1963).
If Close > Prior Close → OBV += Volume
If Close < Prior Close → OBV -= Volume
If Close = Prior Close → OBV unchanged
If Close < Prior Close → OBV -= Volume
If Close = Prior Close → OBV unchanged
The absolute value doesn't matter — the slope reveals accumulation or distribution.
"Volume precedes price":
• OBV rising + price flat → accumulation → expect breakout UP
• OBV falling + price flat → distribution → expect breakdown DOWN
• Divergence between OBV and price = powerful signal
• OBV rising + price flat → accumulation → expect breakout UP
• OBV falling + price flat → distribution → expect breakdown DOWN
• Divergence between OBV and price = powerful signal
Worked example
Add the day’s volume on an up close, subtract it on a down close. Days 13–15 add −95,000, +64,000 and +71,000, taking OBV from −39,000 to +1,000. Days 11 and 15 both close at 104, but OBV was 36,000 then and 1,000 now: the same price, with less volume behind the way back.
The example data: 15 days, used in every indicator here
| Day | High | Low | Close | Volume |
|---|---|---|---|---|
| 1 | 101 | 99 | 100 | 50,000 |
| 2 | 103 | 100 | 102 | 62,000 |
| 3 | 103 | 100 | 101 | 48,000 |
| 4 | 105 | 101 | 104 | 70,000 |
| 5 | 108 | 104 | 107 | 85,000 |
| 6 | 108 | 105 | 106 | 60,000 |
| 7 | 110 | 106 | 109 | 90,000 |
| 8 | 110 | 107 | 108 | 72,000 |
| 9 | 108 | 104 | 105 | 80,000 |
| 10 | 105 | 102 | 103 | 66,000 |
| 11 | 105 | 102 | 104 | 55,000 |
| 12 | 104 | 101 | 102 | 75,000 |
| 13 | 102 | 98 | 99 | 95,000 |
| 14 | 102 | 99 | 101 | 64,000 |
| 15 | 105 | 101 | 104 | 71,000 |
Where it misleads
- A day’s whole volume is counted as buying or selling from the sign of the close, so a day up one cent counts as much as a day up 5%.
- The level is arbitrary — it depends on where you start counting. Only its direction and divergences carry information.
- Divergences between OBV and price are common, and most resolve without a reversal.
In code
direction = np.sign(df['close'].diff()).fillna(0) df['obv'] = (direction * df['volume']).cumsum()
Assumes import numpy as np, import pandas as pd, and a DataFrame df with columns high, low, close and volume — the 15 days above.
Sources
- J. Granville, Granville’s New Key to Stock Market Profits, Prentice-Hall, 1963
- L. Blume, D. Easley & M. O’Hara, “Market Statistics and Technical Analysis: The Role of Volume”, Journal of Finance 49(1), 1994 — why volume can carry information
Last reviewed October 2026 · How this site checks its content · Report a mistake
Pattern bridge: Cumulative volume adds up conviction — a cumulative sum (CDF-like) of directional volume. In ML, backpropagation accumulates gradients through the graph. The accumulation/distribution line refines the idea, weighting volume by where the close lands in the day’s range.
Linked from 1