The Strategic Trader
Detailed Strategy Evaluation

MACD

Simple Profitable Strategy: Part 1 (Design)

In this article series we are going to take what we have learned from RSI, MACD, Bollinger Bands, and Aroon Oscillator to build a simple yet profitable strategy. For validation, the strategy testing period will exclude 1/1/2000-6/1/2001 and 1/1/2011 – present. This will allow us to perform sanity checks in later phases to avoid curve fitting.

The goal is to build a strategy that is still profitable after taking out both slippage and commissions. Since most of our articles to date have dealt with the 5 minute time frame on ES, we will continue using those parameters.

The Setup:

In order to build a strategy, we have to have a place to start. For this strategy, we will start by combining the best aspects of each of the trading methods we have tested thus far. Starting with the most recent Aroon Oscillator method.  We identified AroonOscillator(8) crossing below -80 as possessing a slight edge, so we will put a stick in the ground here.

Initial Results (Pre commission/Slippage):

Profit: +$54,987
PF: 1.20
Max DD: -$4,662
Sharp: .58
Trades: 6925
Win %: 58.51%
Average Trade: +$7.94

 

This is a good start, but far from profitable once commissions and slippage are applied.

Before we move on to filtering out trades or tweaking the exits we need to add more potential “entry conditions”. In this step we go back through all the indicators that showed a slight edge and see if an optimized parameter combination for it improves overall performance.

The main purpose of this phase is to get as many entries as possible while still remaining over our “statically significant” thresholds. Each individual entry criteria does not need to remain above the threshold, but as a whole when used in an if/or combination the strategy needs to at least exceed on percent profitable or pure profit.

  1. Additional Aroon Oscillator Parameter Combinations
    • No additional combinations improved results significantly. AroonOscillator(27) <-99 helped, but not enough to justify inclusion
  2. Cross below Bollinger Lower Band
    • Bollinger(2.5,7) was added to the strategy
  3. MACD cross below signal line
    • MACD(2,12,4) was added to the strategy
  4. RSI Hidden Divergence
    • RSI Hidden Divergence 29,10,4 was added to the strategy
  5. RSI Hidden Divergence
    • RSI Hidden Divergence 14,22,6 was added to the strategy
  6. RSI Hidden Divergence
    • RSI Hidden Divergence 18,6,2 was added to the strategy
  7. Aroon Hidden Divergence
    • Aroon Hidden Divergence 12,17,4 was added to the strategy

Results:

Profit: +$81,925
PF: 1.15
Max DD: -$4,700
Sharp: .59
Trades: 13600
Win %: 57.32%
Average Trade: +$6.02

trading strategy development

Summary:

Several key metrics decreased from the initial entry condition, but this is to be expected. Now we have a basic set of entry conditions providing over 13,000 trades. In the next several articles we will look at different ways of filtering out the non-performing trades, and implement an exit that makes more sense than a static 5 bar exit.

Eventually we will incorporate advanced concepts such as data mining and neural networks to improve the final product.

 


Share

MACD Part 2: Signal Cross (Long Only)

In this article we will explore the viability of trading the 5 minute ES when the MACD crosses the signal line. The signal line is nothing more than a moving average of the MACD values. To start with, we will test a very common strategy (going long when the current MACD  value crosses above the signal line).


Strategy #1
For the first test, we will enter any trade when the MACD crosses above the signal line.

Results: Exit at 5 Bars
A common theme is starting to emerge. Buying on up moves is generally a losing strategy. Buying when MACD crosses above its signal line and then holding for 5 bars is a pretty bad idea. Not a single optimized parameter set was able to turn a profit in this scenario. Winning percentages were decent, but not above the threshold required to be meaningful.


Strategy #2
Buy when the MACD crosses above the signal line and MACD above the zero line

Results: Exit at 5 Bars
Although we are still buying on an up move, the fact that we are above the zero line appears to make a difference. Based on previous testing results related to the zero line, I did not expect the strategy to do well. However, there were quite a few combinations of parameters that were profitable.  The 4,2,2 parameter combination was even able to (slightly) exceed our percent profitable threshold, but fell short of the overall profit goal.


Strategy #3
Buy when the MACD crosses above the signal line and MACD below the zero line

Results: Exit at 5 Bars
Not surprisingly based on the results from Strategy #2 and Strategy #1, this strategy does not perform very well.


Strategy #4
Buy when the MACD crosses below the signal line

Results: Exit at 5 Bars
Some profitable combinations, but no where near significant.


Strategy #5
Buy when the MACD crosses below the signal line and MACD below zero

Results: Exit at 5 Bars
Once again, we come very close to passing our thresholds on percentage and profit, but fall short.


Strategy #6
Buy when the MACD crosses below the signal line and MACD above zero

Results: Exit at 5 Bars
As logic would dictate, because Test #5 performed well, Test#6 did not do so great.

Summary
MACD signal line crosses mostly reinforce the theme that buying after an up move is a losing strategy. However, strategy 2 had an unexpected result. If you buy on signal line crosses and the MACD is above zero, the strategy performs well. In future tests we will need to examine this behavior more closely.

Source Code:

Download Source

Related Posts:



Share

MACD Part 1: Zero Line (Long Only)

In this series we will test the MACD (Moving Average Convergence Divergence) indicator. Like our other indicator series we will test the results against our 5-minute base line results found here: Long Baseline, Short Baseline, and Risk/Reward Baseline

MACD is commonly used to enter trades based on its position relative to the Zero Line. Our first test will enter long whenever MACD is above the zero line.

Results: Exit at 5 Bars
These results turned out very similar to what we saw with RSI when above 50. Very few combinations were even positive with no results coming close to demonstrating a tradeable edge.

Results: Exit Using 1:2 Risk/Reward Ratio
Not a single combination resulted in a net profit. Clearly it is not wise to buy when MACD is above the Zero Line.

Now we will test the MACD below the Zero Line. Based on the above results, we expect being below the Zero Line to outperform.

Results: Exit at 5 Bars
No combination was able to surpass our targets for total profit. However, a large number of combinations surpassed our percent profitable threshold. This indicates a potential edge, however the edge is likely too small to surpass trading costs such as commission. May be useful as a filter to filter out losing trades.

Best Combination: Fast = 2, Slow =4 Smooth =4

Results: Exit Using 1:2 Risk/Reward Ratio
No combination came close to our thresholds. This combined with the failure to reach profit thresholds using 5 bar exit, further underscores this strategy as containing a very weak if any edge.

Summary
There may be a slight edge when entering trades while below the Zero Line. However, by itself it is not tradeable. In future articles we will look at ways of using this filter to improve our overall edge.

Source Code:

Download Source

Related Posts:



Share

Archives

Designed by Get Paid Online and coded by Australian Survey Sites and Cashcrate.