top of page

MA200 trend following strategy

This is the mother of all strategies, the strategy learned on lesson 1. 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 France CAC40 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 (1988 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 59.89% of the time, we have a winrate of 29.92% and a gain/loss ratio of 5.09.



Looking at how the MA200 strategy has performed compared to just buy&hold on a yearly basis we see that the MA200 underperforms the index on 15/33 years.


So what do you actually get out of running a strategy like this? You will get better returns, with lower drawdowns and the chance to put your capital elsewhere around 31% 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. I have to say I like the results of Triangular best.

Type

Points gain

Winrate

Trades

Avg. gain

Max DD

Simple

3798.22

30.47%

128

57.8

1733.99

Exponential

6902.60

28.3%

159

43.41

1690.84

Weighted

5714.73

26.84%

190

30.08

1999.65

Wilder

4604.00

26.23%

122

37.74

2676.37

Triangular

6236.85

29.10%

134

46.54

1687.68

End point

2577.79

28.15%

270

9.55

3566.75

Time Series

2166.00

28.78%

271

7.99

3746.11

Hull

-1055.42

28.57%

203

-5.2

3145.34

Zero Lag

2094.41

28.34%

307

6.82

3542.09


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

41 views0 comments

Recent Posts

See All

Komentarze


bottom of page