As of 04/24/2024
  Indus: 38,461 -42.77 -0.1%  
  Trans: 15,078 -358.61 -2.3%  
  Utils: 893 +6.79 +0.8%  
  Nasdaq: 15,713 +16.11 +0.1%  
  S&P 500: 5,072 +1.08 +0.0%  
YTD
 +2.0%  
-5.2%  
 +1.3%  
 +4.7%  
 +6.3%  
  Targets    Overview: 04/12/2024  
  Up arrow39,800 or 37,150 by 05/01/2024
  Up arrow16,200 or 15,000 by 05/01/2024
  Up arrow885 or 850 by 05/01/2024
  Up arrow16,700 or 15,800 by 05/01/2024
  Up arrow5,250 or 5,025 by 05/01/2024
As of 04/24/2024
  Indus: 38,461 -42.77 -0.1%  
  Trans: 15,078 -358.61 -2.3%  
  Utils: 893 +6.79 +0.8%  
  Nasdaq: 15,713 +16.11 +0.1%  
  S&P 500: 5,072 +1.08 +0.0%  
YTD
 +2.0%  
-5.2%  
 +1.3%  
 +4.7%  
 +6.3%  
  Targets    Overview: 04/12/2024  
  Up arrow39,800 or 37,150 by 05/01/2024
  Up arrow16,200 or 15,000 by 05/01/2024
  Up arrow885 or 850 by 05/01/2024
  Up arrow16,700 or 15,800 by 05/01/2024
  Up arrow5,250 or 5,025 by 05/01/2024

Bulkowski on Testing Divergence

My book, Trading BasicsTrading Basics: Evolution of a Trader book., discusses divergence in the section titled, "Is Indicator Divergence a Dud?" starting on page 86.

If you click on the above link and then buy the book (or anything) while at Amazon.com, the referral will help support this site. Thanks.

-- Tom Bulkowski

$ $ $

This article discusses test results of comparing the performance of hundreds of stocks and the RSI for bullish and bearish divergence.

Divergence: Test Summary

First, tests show that divergence between price and the Wilder relative strength index (RSI) beat the performance of the S&P 500 index consistently only in a bull market using bullish divergence. The other combinations of bull/bear markets and bullish/bearish divergence underperform the market index.

For the winning combination, bullish divergence in a bull market, I found that it wins between 45% and 48% of the time. In other words, the performance of the index beats stocks showing bullish divergence more often than not.

Second, I read that when the indicator makes a shallow dip or rise between the end points in divergence, it means a more powerful move. That turns out to be true but only in a bear market.

Third, it's best to ignore divergence when the first peak or valley occurs between 30 and 70. Including divergence within that range hurts performance in nearly all categories.

Top of page More

Divergence: Background

Bearish divergence.

Divergence occurs when price makes a higher peak and an indicator makes a lower one (bearish divergence), or price makes a lower valley and the indicator makes a higher one (bullish divergence). The picture on the right shows an example of bearish divergence.

Some say that divergence should be ignored when it begins in the neutral zone, between 30 and 70 on the RSI scale. That makes sense since the indicator should read overbought (over 70) or oversold (below 30) to indicate that price might be willing to change direction. Testing reveals that including divergence in the 30 to 70 range hurts results except for a few instances and usually for hold times of 3 months

Divergence: Test Methodology

I found all peaks and valleys in 994 stocks starting from January 1995 to September 2010 that were at least 8 days apart, yielding 19,294 samples. That means I found the lowest low from 8 days before the valley to 8 days after, or peaks from 8 days before to 8 days after, for a total of 17 days. I removed those samples in which the RSI was over 30 or under 70 at the first price bottom or top. I compared the RSI values on the dates of the peaks or valleys for divergence. Often, when price peaks, so does the RSI; when price valleys, so does the RSI.

I separated the results into bull and bear markets. Two bear markets graced the test period: March 24, 2000 to October 10, 2002 and October 12, 2007 to March 6, 2009.

The tests assume entry on day 9 at the opening price, which is one day after we find and qualify a top or bottom. That delay is necessary since price is known to be moving down (forming a top) or up (forming a bottom) for 8 days. I also excluded all peaks or valleys that were not between 3 weeks and 2.5 months apart. Experience has shown that divergence works best when the peaks or valleys are about 1 to 2 months apart. There were enough samples qualifying within that range that if divergence worked, it would appear in the results.

For the presentation in the table that follow, I limited the samples from the start of the first bear market, March 24,2000. I did that only to avoid violating my own copyright since I intend to publish the full results.

Top of page More

Divergence: Test Results

I show the period from March 24, 2000 to September 6, 2010. That period includes two bear markets.

SecurityDivergenceMarket3 Wks1 Mo.2 Mos.3 Mos.
StocksBullishBull0.7%1.5%2.9%4.9%
Index0.4%0.9%1.8%3.3%
StocksBullishBear-1.2%-2.2%-3.2%-4.9%
Index-0.2%-0.9%-3.3%-5.9%
StocksBearishBull0.4%0.7%2.0%4.0%
Index0.3%0.5%1.3%2.1%
StocksBearishBear0.3%-0.3%-2.9%-5.5%
Index-0.9%-1.8%-3.9%-6.4%

For example, in a bull market showing bullish divergence, 3 weeks after price made the second bottom, the stocks gained an average of 0.7% compared to the S&Ps rise of 0.4%. One month after the second bottom, stocks gained 1.5% versus 0.9% for the index. In this row, the stocks beat the index in every measurement period. In other words, bullish divergence worked.

The next set of rows shows the picture changing. Here we're looking for bullish divergence in a bear market. The technique shows superior results after 3 months when stocks decline less than the index. The 2 month measure also favors stocks, but the difference is small.

Bearish divergence in a bull market should show stocks with smaller gains or larger losses (since bearish divergence indicates the stock will drop). In every case, the table shows that stocks outperform the index, meaning bearish divergence does not lead to larger drops.

The last two rows tell the same tale. Stocks showing bearish divergence should decline more than the index but don't.

Looking at the best performing combination, bullish divergence in a bull market, how often does it beat the index (since the performance numbers shown in the table are averages of hundreds of samples)? Answer: between 50% (at 3 weeks) to 55% (at 3 months). In fact, changing the start date to 1995, which would lengthen the bull market and provide more samples shows that the success rates drop to 45% to 48%, respectively. In other words, bullish divergence fails more often than it works.

Top of page More

Picture of divergence in Abaxis.

Test: Small Divergence Dips

I read that when the indicator makes a shallow dip between divergent peaks or a shallow rise between valleys, it means a more powerful move (in other words, if the indicator does not decline below the 50 line in bearish divergence or rise above 50 during bullish divergence, it's beneficial).

The associated figure shows a modified chart of Abaxis (I collapsed the vertical movement somewhat to shrink the footprint so it would fit on this page) on the daily scale. The bottom of the chart shows a portion of the RSI indicator.

In this case of bearish divergence in a bull market (price makes a higher high but the indicator does not), point A is below 50. According to the theory, this divergence should not be as powerful than if point A were higher up the RSI scale.

In the performance numbers that follow, I totaled the percentage changes for the 4 periods: 3 weeks, 1, 2 and 3 months and those the totals in the below table.

DivergenceMarketLess Than 50More Than 50
BullishBull10.0%*9.9%
BullishBear-3.8%*-17.50%
BearishBull9.4%4.9%*
BearishBear-7.6%-9.4%*

* Note: Less than 50 (bullish divergence) or more than 50 (bearish divergence) are best for this type of divergence.

For bullish divergence in a bull market when the indicator remained below 50, the stocks gained a total of 10.0% over the four periods. When the indicator peaked above 50, the stocks gained 9.9%.

In a bear market (bullish divergence), the results improved: -3.8% for stocks with indicators remaining below 50 compared to -17.5% for stocks with indicators above 50. Bullish divergence in a bear market means that stocks showing it should decline less.

Bearish divergence in a bull market using this method means that the indicator should remain above 50 (a shallow dip). Those stocks with indicators remaining above 50 showed declines averaging 4.9% compared to 9.4% for those with dips less than 50. The indicator test improves results (the stocks showing bearish divergence gained less).

The last test, bearish divergence in a bear market shows stocks with the indicator remaining above 50 dropping 9.4% versus a decline of 7.6% for those in which the indicator dipped below 50.

In other words, this method works only in a bear market.

-- Thomas Bulkowski

Top of page More

See Also

 

Support this site! Clicking any of the books (below) takes you to Amazon.com If you buy ANYTHING while there, they pay for the referral.
Legal notice for paid links: "As an Amazon Associate I earn from qualifying purchases."

My Stock Market Books
My Novels

Copyright © 2005-2024 by Thomas N. Bulkowski. All rights reserved.
Disclaimer: You alone are responsible for your investment decisions. See Privacy/Disclaimer for more information.
Some pattern names are registered trademarks of their respective owners.
Home Advertise Contact Donate Privacy/Disclaimer

Today is the tomorrow you worried about yesterday.Smiley