Technical indicators offer powerful insights into what is happening in the market. While price is a factor in technical analysis, volume is as important as price as this tells traders the level of activity on a given security. The On-Balance Volume Trading Strategy is one of the most popular volume indicators. Let’s find out what it is.
The On-Balance Volume Trading Strategy (OBV) is a volume-based technical indicator that shows the buying and selling pressure in the market. It estimates the buying and selling pressure by adding volume on days when the market rallies and subtracting volume on days when the market closes lower. We end the article by making a backtest of on balance volume (OBV) (OBV trading strategy).
Related reading: –Volume trading strategy with backtest
What is the on-balance volume?
The on-balance volume is a trading indicator that is used to assess buying and selling pressure in the market. It shows the buying and selling pressure by adding volume on days when the market rallies and subtracting volume on days when the market closes lower. A market is said to have an up-volume only when the price closes higher. On the other hand, a down-volume happens when the market closes lower than its prior low close.
OBV will usually follow the market during an uptrend and keep on going higher as the price rallies — that is, both the price and the indicator move in the same way.
Similarly, in a downtrend, the OBV will make lower peaks and lower troughs, confirming that the current downtrend in the market is supported by volume.
The chart below is an example of how the indicator looks on SPY (the ETF for S&P 500):
The lowest pane with the orange line shows OBV. It goes up and down depending on the intensity of the fall or rise coupled with the volume.
However, there are certain scenarios in the market when the OBV fails to react to price. The following are some of the scenarios that are likely to play out:
Non-confirmation of uptrend and downtrend
In this case, the price makes a new higher high but the OBV is unable to break above its previous high. This is often assumed an indication of weakness in the uptrend.
What this implies is that though prices were advancing and creating new highs, volume is unable to maintain the momentum. It means that volume does not support the price rise. This particular scenario can and does take place at the end of an uptrend.
In a downtrend, the market breaks below its prior low, but just like in the case of the uptrend, the OBV fails to break below its prior low as prices make new lows indicating that lesser volume is not supporting the downtrend. At this point, we know that the current downtrend is fading away, which signals the end of the downtrend. Unfortunately, this pattern is quite difficult to backtest.
Advanced breakout and breakdown
Price and volume rise together with each breaking its prior high. However, there are certain times when the price fails to break above a prior high and the on-balance volume breaks out to create a new high. The implication of this is that although price fails to breakout, volume on the other hand is significant enough to break above its recent highs. This shows that the price will soon break above its high. Unlike the non-confirmation of an uptrend that shows weakness, the advanced breakout shows strength and a trend continuation. Unfortunately, this pattern is also quite difficult to backtest.
An advanced breakdown tells us of a trend continuation to the downside. This is so because volume breaks below to create a new low even when the price fails to break lower. This shows that the price will break lower and the downward pressure will continue.
What is the formula for On Balance Volume (OBV)?
The On balance volume tells us whether the total volume is running in or out of a security. They are three guidelines when calculating the on-balance volume.
If the current day’s closing price is higher than the previous day’s closing price,
OBV = OBVprev + Vtoday
If the current day’s closing price is lower than the previous day’s closing price,
OBV = OBVprev – Vtoday
If there is equality between today’s closing price and yesterday’s closing price,
OBVtoday = OBVprev
OBV is on-balance volume.
OBVprev is the previous day’s OBV.
OBVtoday is today’s OBV.
Who invented the on-balance volume?
The on-balance volume was first published in 1963 by Joseph Granville in his book New Key to Stock Market Profits. He stated that volume was the main force behind major market moves, and created the OBV to help spot these turning points in the market based on changes in volume.
Granville created the volume indicator for the analysis of stocks, but it has since been used by traders in other financial trading markets, such as commodity futures and forex trading.
What does the on-balance volume tell you?
Joseph Granville’s main idea behind the on-balance volume is smart money – which is also known as institutional investors. As pension and mutual funds managers begin to get more involved in the market as retail investors sell, the volume may increase even though prices do not react immediately. Price then follows suit but it is at this time institutional investors get out of the market while retail traders get in it.
Even though the OBV does appear on a price chart, little concern is taken about the reading but rather the behavior of the slope which is the weight of all analysis.
Additionally, the reading of the indicator can be used to track large buying and selling especially that of institutional investors. An OBV sloping downward with a price increase may tell us that market has reached a turning point as volume is flowing out of the security signifying that smart money is exiting the market. But when a downward price move is followed by an upward movement of the indicator, it shows that the market will soon bottom out and reverses back up as more and more smart money is getting involved in the market.
As a trader, it is very important to take note of these changes in the indicator because these larger traders move the market most of the time. Don’t be like most retail traders who get into the market when institutional traders are selling.
On balance volume backtest
Let’s go on to backtest the OBC indicator.
As always, there are multiple ways to backtest indicators. In this article, we decide to run a rather unorthodox backtest. We use RSI on the indicator. Usually, we use the RSI indicator on the instrument we are trading. But today we use RSI on the indicator itself:
On balance volume (OBV) backtest
We like to start backtesting with a strategy optimization. The reason is simple: we find out how the strategy performs overall for different settings, and we also see at which levels it performs well (or bad). We backtest OBV on S&P 500 (SPY).
We backtest the following strategy:
When the N-day RSI of the OBV drops below threshold X, then we buy. We sell when the close is higher than yesterday’s high:
- We use an N-day RSI period from two to ten days (intervals of one).
- We use a threshold level from 10 to 40 (intervals of 10)
This is all there is to it.
When we optimize, we get the following table:
Columns 1 and 2 show the different RSI levels and thresholds for buying. For example, row 1 shows the result when we use a 9-day RSI of the OBV indicator and we enter when the RSI level crosses below 20.
Row 3 shows the performance when we use a 6-day RSI period and a buy level of 20.
Cirka half the backtests have a profit factor that is bigger than 2 (we like to see above 2).
Let’s pick one of the options from the backtest optimizations: a 5-day RSI and a buy threshold of 30. We get the following equity curve:
On balance volume (OBV) indicator – ending remarks
Volume is an indicator that can be used for building trading strategies, but we have found volume to be of limited value (overall). Today we backtested just one hypothesis of the on balance volume indicator, and also just one asset class (S&P 500). Our backtest of the on balance volume indicator kind of confirms that volume is not an optimal parameter, at least not alone. There is normally no point in trading many different indicators that are based on the same principle (mean reversion strategies) and thus we believe there are better indicators out there.