LTOptions at a 33% discount during the Year End Holidays.
Tell me More

Tuesday, September 11, 2012

An expectancy analysis of Regular MACD Divergences for the EURUSD currency pair

This article is a study about the effectiveness of trading Classical MACD Divergences on the EURUSD currency pair. My goal is to evaluate whether Classical MACD Divergences offer and edge and to somehow quantify the edge of the indicator that could lead to the development of likely long term profitable automated strategies.

A Classical Divergence or Regular Divergence is the one where price makes a higher high but the indicator makes a lower high, or when price makes a lower low and the indicator makes a higher low. For more information visit

I will be making use of the MACD Divergence Indicator implemented by me a few months ago.

Before going any further, I want to alert you that I will use some terminology such as the Maximum Favorable Excursion (MFE) and the Maximum Adverse Excursion (MAE). Please read the article How to measure a system's edge in order to understand the study presented here.

As explained in that article, the idea is to simulate entries on every regular divergence signal that took place, and evaluate the MFE and the MAE over a number of bars later. If, over different period lengths after the entries the MFE is greater than the MAE on average for both long and short trades, then it can be said that the strategy of using entries based on Classical/Regular MACD Divergences has a positive edge that can be exploited and result in an automated system with a positive mathematical expectancy and likely long term profitable.

The study was made from January 1, 2000 to December 31, 2009. That's ten years worth of data. The time frame used was H1, that is one hour bars. The data set was obtained from Alpari UK by direct contact with the broker. That is, this is not the free data downloaded from the Meta Quotes servers which is known to have problems such as holes of several days, sometimes months with no candles, candles with only one tick of data etc.

There was a total of 1434 MACD Classical Divergences detected in the H1 time frame. 682 of them were bullish divergences and 752 were bearish divergences. Now let's see the MFE and the MAE for different numbers of bars after the entries.

5 bars after entry
Buy trades MFE = 25.2% of the Daily ATR
Buy trades MAE = 29.0% of the Daily ATR
Sell trades MFE = 27.8% of the Daily ATR
Sell trades MAE = 26.1% of the Daily ATR

10 bars after entry
Buy trades MFE = 33.8% of the Daily ATR
Buy trades MAE = 35.3% of the Daily ATR
Sell trades MFE = 37.3% of the Daily ATR
Sell trades MAE = 34.8% of the Daily ATR

15 bars after entry
Buy trades MFE = 41.2% of the Daily ATR
Buy trades MAE = 40.4% of the Daily ATR
Sell trades MFE = 42.9% of the Daily ATR
Sell trades MAE = 39.9% of the Daily ATR

20 bars after entry
Buy trades MFE = 47.7% of the Daily ATR
Buy trades MAE = 46.4% of the Daily ATR
Sell trades MFE = 49.8% of the Daily ATR
Sell trades MAE = 45.4% of the Daily ATR

25 bars after entry
Buy trades MFE = 54.6% of the Daily ATR
Buy trades MAE = 53.2% of the Daily ATR
Sell trades MFE = 55.5% of the Daily ATR
Sell trades MAE = 53.0% of the Daily ATR

Pretty interesting results. As you can see, short trades offered a positive edge over the whole spectrum. Long trades didn't offer an edge early after the entries, but started to offer an edge 15 bars and more after the entry. Overall, Classical MACD Divergences seem to offer a positive edge. This edge is not shown immediately after the entries but a little while after: 15 hours and more in the position. It can also be said that it is a small edge, as the MFE is only slightly greater than the MAE around 3% greater.

Looking at the 15 bars study, we could design a very simple strategy without any optimization. By simply trading all the signals, using as Target Profit a distance equivalent to 41% of the Daily ATR, and a Stop Loss of also 41% of the ATR, we could create a system that will hit TP more often then SL, resulting in a profitable strategy. The strategy would automatically be adjusted to current volatility by not having hard numbers of pips set as TP or SL, but always calculating them on the fly based on current volatility reflected by the Average True Range (ATR).

A simulation using such a strategy was made on the H1 time frame, using a fixed spread of 2.0 pips, which is an unfavorable spread compared to what is mostly offered out there by the majority of brokers today. This is a necessity so that we don't deceive ourselves using very favorable spreads that might not be available under real trading conditions.

A risk of 1% of the capital per trade was used:

(Click on image to enlarge)

(Click on image to enlarge)

The capital grows 74.67% over ten years, and it does so at the cost of a maximal draw down of 27.98%. Nothing spectacular. The equity curve is not soft and smooth, but keep in mind this is a very raw version of the system. The edge exploited by trading all the signals is very small because the average MFE is only slightly greater than the average MAE, less than 3% greater. So, it is a small edge, which can obviously disappear with ease if the behavior of the currency changes slightly in the future. It is not advisable to trade based on such a small edge. If we could get a significantly greater MFE, let's say at least 5% greater than the MAE, then trading based on that market inefficiency should be safer and more likely to persist in the future because the nature of the currency would have to make a greater mutation in order to completely destroy our edge.

The system can obviously be improved. Some ideas are:
- Only use signals where the confirmation bar of the divergence is significantly powerful (large).
- Do not take signals generated during the Asian session, where bars are just too small due to lack of volume.
- Only trade signals in the direction of the long term trend by analyzing the behavior of a long term moving average.

Those are just a few ideas. Of course you can come up with your own. The important thing is that once the idea is conceived a new Mathematical expectancy analysis must be carried out to verify that the added filter improves the edge. By improving the edge, the positions will have larger TPs and smaller SLs while maintaining or improving the win/loss ratio, and that should result in smaller draw downs and better returns.

I will evaluate some of these ideas in order to come up with a likely long term profitable mechanical system entirely based on Classical MACD Divergences, with better returns and significantly smaller draw downs. I want to obtain a smooth growing equity curve based on simple trading principles, a larger statistical edge and without getting to curve fit.

If you liked this article stay tuned for the evaluation of the edge of Hidden Divergences on the H1 time frame for the EURUSD currency pair.

Related Articles:
MACD Divergence Indicator for Metatrader
How to measure a system's edge

Go to the bottom of this page in order to see the Legal Stuff

No comments:

Post a Comment