Divergence

Let us have a look at the figure below that shows a price chart together with a 14-day RSI indicator under. The indicator usually follows the price, i.e. a high in RSI corresponds to a high in price etc.

(from NinjaTrader)

Nevertheless, in the figure we can observe a “divergence”, that is, even though the price makes a lower low (see the right blue circle), the indicator seems to increase (see the right red circle in the indicator). This may reveal that the downtrend is over so that a trader may consider bullish position.

But is it really true? This is something I decided to check by creating a computer program that detects two lows close to each other. As soon as it happens, the software gives a “buy” signal, as shown in the figure above. The take profit level is assumed to be at the maximum between the lows (denoted as TP in the figure) and a stop-loss is assumed to be 50 cents below the right minimum. Of course, this is a very simple strategy, which we will not use in practice as it is. The objective is only to check whether a bullish divergence in an indicator (i.e. 14-day RSI) will help to “lift” the market.

At first, we will test stocks that are currently in the S&P 500 index, without considering any bullish divergence. Here are some selected results (using NinjaTrader software using data from Kinetick):

Profit factor 1.12
Max. drawdown -35.70%
Number of trades 10092
Percent profitable 38.58%
Average trade 0.64%
Ratio win/loss 1.81
Number of days held 32

The results for the Russell 3000 index are as follows:

Profit factor 1.10
Max. drawdown -32.97%
Number of trades 26070
Percent profitable 38.09%
Average trade 0.64%
Ratio win/loss 1.81
Number of days held 32

And now let us consider the case when the bullish divergence occurred. For the stocks from S&P 500 index:

Profit factor 1.20
Max. drawdown -12.36%
Number of trades 1512
Percent profitable 43.45%
Average trade 0.91%
Ratio win/loss 1.59
Number of days held 25

and for stocks from the Russell 3000 index:

Profit factor 1.19
Max. drawdown -11.07%
Number of trades 3834
Percent profitable 43.90%
Average trade 0.78%
Ratio win/loss 1.53
Number of days held 23

So the results actually improve for the case when the bullish divergence was detected, see the better maximum drawdown, a higher average trade, and a higher percent of profitable trades. The ratio/win loss ratio is perhaps lower but this can be due to the lower number of days in trade.

Advertisements