top of page
Writer's pictureProRealAlgos

MA200 trend following strategy

This is the mother of all strategies, the strategy learned on lesson 1 on your every day trading class. The MA200 long only strategy. Although already widely recognized, there's value to revisit old edges to see if they are holding up. In this post we're going through how this strategy has performed on the German DAX40 index.


We're also investigating if there are other Moving Average types that works even better, like the Exponential Moving Average.


So the conditions here are super simple.

  1. Enter a long trade when the price crosses over MA200

  2. Sell when close crosses under MA200


Here are the results compared to just buying and holding throughout the whole backtest period (15 aug 1972 until today)



So what do we see in the equity curves? We see that the MA200 strategy has similar overall return as buying&holding but with smaller drawdowns.


If we go in to the backtest report we see that we are in market 61.58% of the time, we have a winrate of 25.58% and a gain/loss ratio of 1.99.


Looking at how the MA200 strategy has performed compared to just buy&hold on a yearly basis we see that the MA200 overperforms the index(buy&hold) on 22/53 years. 22

So what do you actually get out of running a strategy like this? You will get similar returns, with lower drawdowns and the chance to put your capital elsewhere around 37% of the time (when the index is below MA200).


But can we improve it?

Well, you can always improve the backtest of a strategy, but to avoid curve fitting I'll just try one more thing: testing some other moving averages. I will not go through the difference between the moving averages. It's just one google away.


Anyway, here are the results. For other indexes like CAC and OMX I have found that the triangular moving average works best, but it's clear that for DAX the best moving average is the simple moving average.

Type

Gain

Winrate

Trades

Avg. gain

Max DD

Simple

18,422

32.30%

161

114.43

3,726

Exponential

17,736

30.14%

209

84.87

2,972

End Point

9,955

36.49%

370

26.91

4,079

ZeroLag

13,959

32.25%

369

37.83

2,940

Weighted

13,997

28.84%

267

52.43

4,970

Hull

12,367

35.89%

443

27.92

3,344

Wilder

14,789

30.97%

155

95.35

3,630

Time Series

10,206

34,89%

364

28.04

3,344

Triangular

14,329

34,08%

179

79.55

5,127


That was it. I think it's a viable strategy that can be combined with other edges to make something even better.



The ProRealTimeâ„¢ code

DEFPARAM CumulateOrders = False 

MA200 = average[200, MovingAverageType](close)

BuyCondition = close crosses over MA200
SellCondition = close crosses under MA200

IF BuyCondition THEN
BUY 1 CONTRACT AT MARKET
ENDIF

IF SellCondition THEN
SELL 1 CONTRACT AT MARKET
ENDIF

Please optimize the variable MovingAverageType between 0-8 with step interval 1 to try out the different moving average types available in ProRealTimeâ„¢

96 views0 comments

Recent Posts

See All

Comments


bottom of page