Indicator library · Volume

On-Balance Volume (OBV), A Running Total

A running total that adds a session’s whole volume when the close rises and subtracts it when the close falls. No parameters, no smoothing, and one large assumption baked into the first line of the formula.

The calculation

Compare each close with the one before it, then act on the whole of that session’s volume:

  • Close higher: OBV = previous OBV + volume
  • Close lower: OBV = previous OBV − volume
  • Close unchanged: OBV = previous OBV

There is no period to choose and nothing to tune, which is unusual and worth noticing: an indicator with no parameters cannot be quietly optimised on past data to make a backtest look better than the future. What it has instead is an arbitrary origin. The total starts wherever your data starts, so the level of the line is meaningless and only its slope, read against the price, says anything at all.

Price at new highs while On-Balance Volume stallsThe upper panel shows a price series rising for about seventeen bars to a high before declining and partially recovering. The lower panel shows On-Balance Volume, which rises with price through the first half, flattens well before the price high, and then falls steeply during the decline as heavy volume accumulates on down sessions.CLOSEOBV250.00OBV peaksPrice at new highs while On-Balance Volume stallsThe upper panel shows a price series rising for about seventeen bars to a high before declining and partially recovering. The lower panel shows On-Balance Volume, which rises with price through the first half, flattens well before the price high, and then falls steeply during the decline as heavy volume accumulates on down sessions.CLOSEOBV250.00OBV peaks
Fig. 1: schematicComputed at build time from the price and volume series in this page's source. OBV peaks on session 19 while price goes on to its high on session 19, the advance continued for 0 more sessions on volume too light to carry the total any higher. That gap is the entire reading this indicator exists to produce, and the line's own level, which is an artefact of where the series began, says nothing whatever.

The assumption in the first line

Every share that traded had a buyer and a seller. Nothing about a session’s volume is intrinsically buying or selling, so the decision to add all of it to one side because the close finished higher is an approximation of aggression, not a measurement of it.

The approximation is cruder than it first appears. A session that closes a single cent higher contributes exactly as much to the total as one that closes eight per cent higher; a session that traded heavily all day and finished flat contributes nothing at all. Granville’s claim was that across many sessions these distortions cancel and the direction of the total becomes readable. That is plausible, it is roughly borne out in practice, and it has never been demonstrated in a way that would satisfy anyone sceptical.

Two families of measure try to do better with the same daily bar. VWAP uses volume as a weight rather than a sign, so nothing has to be classified. Money-flow measures weight the attribution by where the close sat within the bar’s range, which is a genuine refinement and still an approximation. Anything stronger needs data a daily bar does not contain.

Reading it

One reading matters and it is comparative. Drawn beneath the price it belongs to, OBV either confirms what price is doing or contradicts it.

Confirmation is the ordinary state: price rises, the total rises with it, and nothing has been learned that the price did not already say. Divergenceis the observation the indicator exists for, price making higher highs while the total flattens or falls, meaning each successive push is being made on lighter volume than the one before.

The mechanism is worth stating plainly, because it explains both the value and the limits. A large position cannot be unloaded quickly without moving the price, so it is unloaded into strength over weeks. The prices keep rising; the volume behind each advance thins as the buying that remains is smaller. OBV records that thinning as a stalling total. It is a condition, it can persist for months, and the many divergences that resolved into nothing are not in anybody’s book of examples.

Where it misleads

Known failure modes
SituationWhat goes wrong
Reading the levelThe origin is arbitrary. Two charts of the same instrument started a year apart show different levels for the same market.
Whole-bar attributionA one-cent gain claims the same volume as an eight-per-cent gain; a heavy flat session claims none.
Index rebalance and expiryMechanical volume from funds obliged to trade enters the total as though it carried an opinion.
Illiquid instrumentsA handful of trades sets both the close and the volume, so the total records those trades rather than a market.
Unadjusted pricesA split changes the sign of a session's comparison, sending a large volume to the wrong side of the total permanently.
Divergence as a triggerIt is a description of how an advance is being made. Divergences have run for many months and some never resolve.

What breadth adds

OBV describes one instrument’s participation and cannot say whether the market around it was doing the same thing. A stalling total in an instrument whose whole sector is stalling is one observation; the same stalling while the sector broadens is a different and much more specific one.

That is what the breadth section is for. Volume answers how much conviction stood behind a move in one name; breadth answers how many names were moving at all. When both narrow together while an index makes new highs, two measures built from genuinely different inputs agree, which is as close to confirmation as anything on this site gets.

Frequently asked questions

How is OBV calculated?

One line of arithmetic per session. If today’s close is higher than yesterday’s, add today’s entire volume to a running total; if it is lower, subtract the entire volume; if it is unchanged, leave the total alone. There is no averaging, no period and no parameter, which makes OBV one of the few indicators with nothing to optimise, and one of the few whose starting point is completely arbitrary.

Does the level of the line mean anything?

No, and this is the first thing to get right. The running total begins wherever the series begins, so two charts of the same instrument started a year apart show OBV at completely different levels. Only the slope, and its comparison with the price, carry information. It shares this property with the advance/decline line, and for the same reason: both are cumulative sums with an arbitrary origin.

What is the point of assigning all of a session’s volume to one side?

It is a deliberate simplification, and worth being explicit about because it is the indicator’s main weakness. Every share traded had both a buyer and a seller, so no volume is intrinsically "up" or "down"; assigning the lot to the up side because the close finished a cent higher is an approximation of who was more aggressive, not a measurement of it. Joseph Granville’s argument was that over many sessions the approximation averages out into something readable, and that is roughly true and entirely unproven.

What is the reading OBV exists for?

Divergence between the line and the price. Price making higher highs while OBV fails to follow says the advance is being made on progressively less volume, the classic distribution pattern, and the observation this whole site is organised around. The reverse, price making lower lows while OBV holds, is where accumulation shows up. Both are conditions rather than triggers, and both can persist for months.

How does OBV differ from Volume RSI?

They start from the same directional attribution and do opposite things with it. OBV accumulates without a window, so it is an unbounded trend whose level depends on where it started. Volume RSI averages the same two series over a fixed period and maps the result onto 0–100, so it is a bounded reading. OBV can be compared with the price chart beside it; Volume RSI can be compared with its own history. Neither can be compared across instruments.

Does an unchanged close really contribute nothing?

In the classic formula, yes, and it matters more on illiquid instruments than on liquid ones. Before decimalisation, unchanged closes were common enough that the treatment shaped the line; on a modern tape quoted to the cent they are rare. Some implementations split the volume or add a fraction of it, a defensible variation that produces a visibly different series, which is why two platforms can disagree about OBV on the same data.

Should OBV be smoothed?

A moving average of OBV is common and is useful for the same reason it is useful anywhere: the raw line is jagged, and a crossing of the line and its own average is a tidier way to say the slope has changed. What smoothing cannot fix is the attribution underneath, and it is worth remembering that an average of OBV is two steps away from what actually happened, a smoothing of an approximation.

Does it work on an index?

Yes, using aggregate volume, and it behaves better there than on a single stock because aggregate volume is harder to distort with one large trade. The caveat is the calendar: index rebalances, options expiries and quarterly reconstitutions push enormous mechanical volume into a single session, and OBV adds all of it to the running total as if someone had expressed a view. Around those dates the line records fund maintenance.