Systemicbeta

On Balance Volume

systemic:core-obvIndicators

Inputs

NameTypeDescription
PriceNumber seriesThe closing price series, which decides whether each bar's volume is added to or subtracted from OBV.
VolumeNumber seriesThe trading volume series: the number of shares, contracts or units traded in each bar.

Outputs

NameTypeDescription
OBVNumber seriesA running total of volume, added on bars where price rises and subtracted on bars where it falls.

Cost

7
credits per run
1,000
bars

0.198 + 0.00588·n credits for n bars, rounded up. The marks are each plan's limit of bars.

Overview

On Balance Volume (OBV) is a momentum indicator developed by Joseph Granville in 1963 and introduced in his book Granville's New Key to Stock Market Profits. The core idea behind OBV is simple: volume precedes price.

Granville observed that large price moves usually follow changes in volume. When large volume flows into an asset and the price does not move yet, the indicator suggests a price move is building up, like a coiled spring.

The Core Principle: OBV ignores the size of a price change and looks only at its direction. If a bar closes higher than the previous bar, all of its volume counts as "buying pressure." If it closes lower, it counts as "selling pressure."

OBV is one of the simplest volume indicators. It can still show hidden accumulation or distribution before the price catches up.


The Formula

OBV is a running total. It starts at 0 on the first bar, then adds or subtracts each bar's volume, depending on the price direction:

OBVt=OBVt−1+{+Vtif Pt>Pt−1 (up day)−Vtif Pt<Pt−1 (down day)0if Pt=Pt−1 (unchanged)\text{OBV}_t = \text{OBV}_{t-1} + \begin{cases} +V_t & \text{if } P_t > P_{t-1} \text{ (up day)} \\ -V_t & \text{if } P_t < P_{t-1} \text{ (down day)} \\ 0 & \text{if } P_t = P_{t-1} \text{ (unchanged)} \end{cases}

Where:

  • VtV_t = Volume at time tt
  • PtP_t = Closing price at time tt
  • OBVt−1\text{OBV}_{t-1} = Previous OBV value

Calculation Logic

flowchart TD
    START["📊 New Period Data<br/>(Price, Volume)"]
    
    COMPARE{"Compare Today's Close<br/>to Yesterday's Close"}
    
    UP["Today > Yesterday<br/>🟢 UP DAY"]
    DOWN["Today < Yesterday<br/>🔴 DOWN DAY"]
    FLAT["Today = Yesterday<br/>⚪ UNCHANGED"]
    
    ADD["Add Volume to OBV<br/>OBV = OBV + Volume"]
    SUB["Subtract Volume from OBV<br/>OBV = OBV − Volume"]
    KEEP["Keep OBV Unchanged<br/>OBV = OBV"]
    
    OUTPUT["📈 New OBV Value"]
    
    START --> COMPARE
    COMPARE -->|Higher| UP --> ADD --> OUTPUT
    COMPARE -->|Lower| DOWN --> SUB --> OUTPUT
    COMPARE -->|Equal| FLAT --> KEEP --> OUTPUT

Step-by-Step Example

Consider a stock over 5 days with the following data:

DayCloseVolumePrice ChangeOBV CalculationOBV
1$10.001,000—Start at 00
2$10.502,000↑ Up0 + 2,0002,000
3$10.301,500↓ Down2,000 − 1,500500
4$10.30800→ Unchanged500 + 0500
5$10.803,000↑ Up500 + 3,0003,500

On Day 4, 800 shares traded, but the price did not change, so none of that volume affected OBV. Only bars with a price change count.


Interpreting OBV

The Absolute Value Doesn't Matter

Unlike price, the level of OBV has no meaning by itself: it depends on where the calculation started. What matters is the trend and direction of OBV:

OBV BehaviorInterpretation
Rising OBVVolume is flowing into the asset (accumulation)
Falling OBVVolume is flowing out of the asset (distribution)
Flat OBVNo clear volume conviction

Smart Money Theory

Granville believed OBV could reveal the activity of institutional investors ("smart money") before retail traders caught on:

  1. Institutional accumulation: Large buyers start purchasing before a rally. OBV rises while price stays flat.
  2. Price follows volume: Eventually, retail buyers notice and push prices up.
  3. Institutional distribution: Large sellers exit at the top. OBV falls while price stays elevated.
  4. Price catches down: Retail holders are left with falling prices.

Key Trading Signals

1. Trend Confirmation

When OBV moves in the same direction as price, the trend is confirmed:

Price TrendOBV TrendInterpretation
↑ Rising↑ RisingStrong uptrend with volume support
↓ Falling↓ FallingStrong downtrend with volume support

2. Divergences

Divergences between OBV and price can signal potential reversals:

flowchart LR
    subgraph BULL["🟢 Bullish Divergence"]
        B1["Price makes<br/>LOWER lows"]
        B2["OBV makes<br/>HIGHER lows"]
        B3["Accumulation detected<br/>Potential reversal UP"]
    end
    
    subgraph BEAR["🔴 Bearish Divergence"]
        C1["Price makes<br/>HIGHER highs"]
        C2["OBV makes<br/>LOWER highs"]
        C3["Distribution detected<br/>Potential reversal DOWN"]
    end
    
    B1 --> B2 --> B3
    C1 --> C2 --> C3

3. Breakout Confirmation

OBV can confirm price breakouts:

  • Strong breakout: Price breaks resistance AND OBV breaks its own resistance
  • Weak breakout: Price breaks resistance but OBV fails to confirm (potential false breakout)

Practical Applications

Volume-Price Confirmation Strategy

Before you act on a signal, use OBV to check that volume supports the price move:

  1. Identify a price trend or potential breakout
  2. Check if OBV confirms the direction (rising OBV for bullish, falling for bearish)
  3. Watch for OBV to break its own trendlines or levels
  4. Treat the signal as valid only when both price AND volume confirm

Accumulation/Distribution Detection

OBV can reveal hidden buying or selling:

  • Flat price + Rising OBV: Someone is quietly accumulating shares
  • Flat price + Falling OBV: Someone is quietly distributing shares
  • These patterns often precede significant moves

Multi-Asset Flow Analysis

Compare OBV trends across related assets to see where capital is flowing. For example, if Bitcoin's OBV is rising while Ethereum's is falling, it may indicate rotation from ETH to BTC.


Edge Cases and Limitations

Leading Indicator Risks

As a leading indicator, OBV can give signals before price confirms them, and some of them are false. Always use OBV together with other analysis.

Gap Days Can Distort OBV

If a stock gaps up on very large volume (for example after an earnings surprise), all of that day's volume is added to OBV, even if the move is a one-time event. This can skew the indicator for a long time.

No Magnitude Consideration

OBV treats a $0.01 gain with 1 million shares the same as a $10 gain with 1 million shares. Both add 1 million to OBV. Consider using Volume-Price Trend (VPT) if magnitude matters.

Low-Volume Periods

In low-volume markets or during consolidation, OBV can give erratic signals. It works best when there is enough volume to analyze.


Data Alignment and Multi-Input Considerations

OBV needs Price and Volume series that cover the same bars. Systemic matches the two inputs by time, bar by bar.

Critical Alignment Warning

OBV's logic depends on comparing consecutive closes:

If Pt>Pt−1 then add Vt\text{If } P_t > P_{t-1} \text{ then add } V_t

Misaligned data can produce:

  • Incorrect direction assignments when price and volume correspond to different periods
  • Distorted cumulative totals that compound over the entire OBV history

Best Practice: Always take Price and Volume from the same data source, symbol and period. OBV is cumulative, so an early mismatch stays in every later value.

Missing Data (Closed-Market Bars)

On a bar with no price or no volume (a weekend, holiday or data gap), OBV is empty. It does not assume "unchanged". The running total continues on the next bar that has both values, and that bar is compared with the last known close. Monday is therefore compared with Friday. OBV starts at 0 on the first bar that has both price and volume. A bar with a price but no volume still updates the last known close used by the next comparison.


Indicator Profile

quadrantChart
    title OBV Indicator Profile
    x-axis Low Popularity --> High Popularity
    y-axis Low Reliability --> High Reliability
    quadrant-1 High potential  
    quadrant-2 Established leaders
    quadrant-3 Niche tools
    quadrant-4 Popular but risky
    OBV - Stocks: [0.75, 0.70]
    OBV - Crypto: [0.65, 0.55]

Profile Dimensions

DimensionStocksCryptoExplanation
Popularity0.750.65Classic indicator from 1963, widely taught and used. Cryptocurrency traders increasingly use volume-based analysis.
Reliability0.700.55Well-established for stocks with centralized volume data. Crypto reliability lower due to fragmented exchange volume and wash trading concerns.
ComplexityLowLowSimple directional logic makes OBV one of the most accessible volume indicators.
VersatilityHighModerateWorks across all liquid equity markets. Crypto applicability limited by volume data quality concerns.
Recent InterestStableGrowingEstablished staple in technical analysis. Crypto traders exploring volume indicators to detect whale activity.

Further Reading

Rendering diagrams...
© 2026 WanoLabs. All rights reservedBeta v0.1.5