Back

Do moving averages actually work in identifying stock market trends? Can one ride them profitably?

Answer somebody's question on quora https://www.quora.com/Do-moving-averages-actually-work-in-identifying-stock-market-trends
It depends on what stock you are trading.
Let us use the most general and broad use stock SPY as example.
Simply buy and hold SPY since 01/01/1998 to 01/01/2016, Compounding Annual Return 6.028% and maximum drawdown 55.3% and sharpe ratio 0.394
Update Backtest








Hold SPY only when SMA50>SMA250 from 01/01/1998 to 01/01/2016, Compounding Annual Return 7.257 and maximum drawdown 17.3 and sharpe ratio 0.632
0


What about the short period Simple Moving Average like commonly used SMA5 and SMA50?
We can see that it is actually worse than buy and hold. In addition, we pay more broker transaction fees and pay more tax since we hold a short time less than 1 year.

SMA5>SMA50
Compounding Annual Return 2.775% and maximum drawdown 35.70 and sharpe ratio 0.298 and 158 trades
SMA50>SMA250
Compounding Annual Return 7.257% and maximum drawdown 17.3 and sharpe ratio 0.632 and 11 trades
Buy and hold SPY
Compounding Annual Return 6.028% and maximum drawdown 55.3% and sharpe ratio 0.394

In conclusion, we can say that "longer time moving averages(50/250) actually work in identifying ETF SPY market trends. But relative short period of time moving average only make things worse.
But What about other ETF like QQQ or XOP or any stock? Is SMA 50/250 always better than buy and hold for other stock?
If we backtest QQQ and XOP, a different conclusion may happen. Let us address it in another post.
0


Thanks for the studies. Where would you draw the line between curve fitting (to pick the 50/250 number) vs optimization? I tended to think to think optimization is only relevant when you're working with physical properties (e.g. optimize the temperature of a cup of coffee).
1

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


What do u mean by "the line between curve fitting (to pick the 50/250 number)" and "optimization"?
I do not think that i talk about any optimization.
0

QN,

For practical trading purposes to the question that was posed, doesn't one need to start with
1) A definition of a trend?
2) What does "identify" mean and how one intends to trade the trend once identified?

So for example on (1), wouldn't it be fair to say that short moving averages actually do a better job of identifying "short term" trends and longer moving averages do a better job of identifying "long term" trends or regimes?

And for example on (2), would you not be able to use a 'faster' MA (shorter length SMA, EMA, Hull MA, etc etc) to identify short term trends but then trade very differently. I.E. trading short term trends may require a fundamentally different approach than entering on a cross of a MA (even if you can reduce the lag).

Further, my point on (2) is that definitively answering "do MA's identify stock market trends" with backtest results from a cross-over strategy conflates "identification" of conditions and "profitably trading" those conditions. So even on long term trends, what if i was interested in identifying long term trend but then trading short term reversion to the mean in those conditions?

So, sure, the answer to the (very broad) question asked on Quora may be what you state but for quantitative trading purposes I wonder if the answer is likely more nuanced.

thx.
1

Mohsin, each backtesting needs to define an enter point and exit point. For SPY SMA 50/250 is better than SMA 5/50. For other ETFs, only backtesting result can say about it. But for the question on Quora i think this result is enough since the question is "Do moving averages actually work in identifying stock market trends? Can one ride them profitably?". As far as we can find one SMA strategy that works and be profitable. We can say "Yes" to the question.

Of course, there are more profitable and more safe(high Sharpe ratio and less maximum drawdown) strategy by just a little more complex trading strategy like this.
0

Where would you draw the line between curve fitting (to pick the 50/250 number) vs optimization?


Oh, man. I think entire libraries could be filled with opinions on that, Jared. :)
2

Personally I could never get comfortable with MA techniques for this purpose- Sharpe too low, drawdowns too high and too much voodoo in picking the right parameters. Perhaps counter-intuitively, EMAs are essential ingredients/components for mean reverting strategies....

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed