Significance of different moving average periods?

So you believe that MA's work because enough people to believe them that in combination they buy or sell sufficient to move price? So indirectly, MA's move price?

Are you really saying these things?

MA's are not a self fulfilling magic number prophecy type indicator like say a Fibonnaci number. The latter only really work if people believe them. But an MA just tells you the price has moved recently. Using pretty much any sensible indicator/filter will give you exactly the same answer. There is almost no difference in outcome using a 'magic number' MA like 200, and using say 211 or 189.

So MA's only 'work' or move prices in the sense that:

a) they tell you the price has gone up or down - which isn't a special property of MAs and certainly not a special property of MAs of a specific period
b) a bunch of people like following trends, enough to move the market
c) those people will trade in such a way to continue the trend. And they would do it regardless of whether they were using a 200 day MA, 211 day MA, todays price - last years price, the beta or ^2 of a price regression, or some more complex filter; or just drawing lines on a chart by hand.

Long term moving averages are used by Wall Street. Finance professionals may use them to justify investment decisions.

I'd agree that simple 200 day moving averages are used quite a bit, though not at the more sophisticated end of the street. Importantly though the more sophisticated indicators give you almost exactly the same answer as a simple MA (albeit they are preferable due to other properties, like stationarity and lower turnover) so from the outside you couldn't tell exactly what indicator someone was using to trade with.

GAT
 
MA's are not a self fulfilling magic number prophecy type indicator like say a Fibonnaci number. The latter only really work if people believe them. But an MA just tells you the price has moved recently. Using pretty much any sensible indicator/filter will give you exactly the same answer. There is almost no difference in outcome using a 'magic number' MA like 200, and using say 211 or 189.

So MA's only 'work' or move prices in the sense that:

a) they tell you the price has gone up or down - which isn't a special property of MAs and certainly not a special property of MAs of a specific period
b) a bunch of people like following trends, enough to move the market
c) those people will trade in such a way to continue the trend. And they would do it regardless of whether they were using a 200 day MA, 211 day MA, todays price - last years price, the beta or ^2 of a price regression, or some more complex filter; or just drawing lines on a chart by hand.



I'd agree that simple 200 day moving averages are used quite a bit, though not at the more sophisticated end of the street. Importantly though the more sophisticated indicators give you almost exactly the same answer as a simple MA (albeit they are preferable due to other properties, like stationarity and lower turnover) so from the outside you couldn't tell exactly what indicator someone was using to trade with.

GAT


Yes, I know.
 
Different MA lengths pick up different length trends. Trends occur at different time periods. There is no significant difference (in the statistical sense) between the pre-cost performance of different length moving averages in the period when financial assets are generally held to trend (say between a couple of weeks and a year or so, give or take).

Ratios of 1:2 to 1:4 between the fast and slow moving average crossovers work best at capturing trends. This is true with artifical and real data. Given a piece of paper, a pencil, and some stochastic calculus I could probably show why this is the case and find the 'correct' ratio. This about as much science as you will get for this question. It matters not, since there is no significant difference between the performance of ratios in any sensible range.

Do not, as someone has said, try and optimise the moving average to use unless you do so in a robust way. Better to use many moving averages, or crossovers, and take an average.

It's intuitive to use logical MA lengths. Using business day calendars, 10 = two weeks. 20 = about a month. 40 = about two months. 60 = about 3 months, 80 = about 4 months, 120 = about 6 months, 160 = about 8 months.

Doubling the MA each time gives a similar correlation pattern. I use 10,20,40,80,160,320. Or try working downwards from a year in base 2: 256 = about a year, 128 = about 6 months, 64 = about 3 months, 32 = about 6 weeks, 16 = about 3 weeks, 8 = just under 2 weeks.

None of this will make you extra money, but it will discourage you from trying to fit 31 or 29 day MA lengths.

GAT

PS Some pics
UEwrctDiN2cSHb5kXL_mF9h8ub7XDBMAfNeiRWig99qEOWz9pv-3euVbE6SrEv-1dvWIFetz8W0y2p6RKXLVzktdzPSw21UFWt0-_obP0_Da0OLbefIc5OJC0ZGjt6gJxp4CaJE3fhOD821_UdnaEVw-p2KRDab_yD2UEs7HTvK7U-I_PpKKzavc6VzMxF2mZrL_DOlaVDUjJFTGEBadfRrPFdQHGZP5OmwsPHmsEGDwihnmtUv31CMX4Qq2LiWQ4fs2c2j8RQi0qqmPumkSDMsoEQ8xmHxSM7Ywt2UzibNq3CIobIcbXEQLMkAJYGneldQ9UI6E7d7jsN15Xtp079osV5MSx0SN-BcjAD_SJm-RzGVLxnGdgd6f5P_ZiyrExLQ_jQNcJA_7O54Pcr-HqUO53GEGu7sll5O5Jdp3N3kIly0Ac8lh39FImZQ0-OyeJVqOo2bZzpAwypmAQTCgMxEv6JuwXAj2HguFcGE0rPoq9x6toGrDgzH0v3tQTNh8ZYPluzXWz5NsSGphI75durVdVFg0ibaVfYIbLQWVz5BY6DuwiPZTCMSBOTOlSKtXNv6GsIaguImwp6uGRT9A-OAG6IBBnssnvBCdjJAzL6wXoNZeN1h5pgp4nNmmtu1I7jgD3maZfJreMwHc2mYv2zU-KPoXabf_jeIoO_VMj9YL35uPeZ9a8Q=w1280-h713-no

This shows, for Eurodollar, the Sharpe Ratio (Z-axis) for crossovers A and B. Any trend following system of medium length (lower left triangle) works pretty well (bright yellow).

WWjubYr93T6KOFjW2aULrsDHggQ4_zBXB6IymDAhTDPXKqWgwCm3EN9rmgUL2kAZOLYMwPlruSU7fUhbzCtUjWuqr5e0gP9XARZI2TFHEdHpQx5FO-Sn6Ymr-nfvMZm8TDcLoQhr8k6Nr7bHagtpwSKAsTnj5eY4mh9WeAFRSb-fR3SkODhJ2NU6QJ6Z8fTE8YGEORXejsCFb8Ocl3lhBQHC3gBIlh4A1P_-PSpsil9Nn-sRT_b7mAR49Rk_YfFQa9tepY3Twv-A3KgdJS6apf0V1FSp3G5Z31ufJE2tKcgjPqQXvGCvFEtUjdl3Ot-dG6T8RcVfEuR8Iz7qdUMddu_pA1LuSCF6nv97mWucy5L2YXiwfV7vcKFoAEXZiXNz15Y2c9m1VSbUqjRUkaQkK6WcPYDjzdlln8EvkYgDF_ofntSx-CsNAEzWMhJka0kM-5Oqn1mMFt6lRC5iOtHqlvBKdMDnlUxyc35K2XQGhyWjT4hDGzWSBSk6XecQJJ0WhgybP-Hz7LRISbicg_PZxGN35GofBc7g2zA4tLQf4vQrFKNp6VJ_10Wdk059qR5DeL5HONFRvBZP-lPIwRk9EqYxNlcm4gNyq_i8e99zZcGc1QHV1fgHhYY6iaam1Mc3KUDtMYIaW2Nb5-5Y592ITXvk4Q221b-012ksVhejqSuVuycRdGuyhQ=w1280-h713-no

This shows the T-statistics (bootstrapped, non parametric) comparing the optimum to the relevant system. Anything in dark blue can't be distinguished from the optimium, and is just as good as it (optimium is white). There are a wide range of possible crossover pair values in dark blue.

Hs0Q9_goFlPdQfT8JU1kAQ-pbv25Ln9Fea_GxAv4TERqcNNNFXQCW7-kgc3JlQPxy9lJwtoW_4P1cnzfCB3_gBJpB7hU_qyLKfQbn9tMQvKbweMRAbcUNDoCw0fNY-dpIm_sZkjG51iIpoHcj8nGOTYtPH94ZmcjWNRv1RG9u7RbFGeuRyV_fG675TP4QK6rwyZr7nFZyMjVVWA1lwAYpX7zN8JPabKDBSve6XULtZarDuxVJzIoRzbUDOjuEDbRnImyFrvcTaiKVQlwkuCOff6BYsnsgLXSChXdqk15bg_QUQLfoCb67A-n8U-xjrA-5DJqDBH2jJby5At_kSeQqoWeRrPNjvB40wa4SgZGyk11cMVM8SHhb93et5Z4pwGJOHtYRLnxNKZ1McB27LBNPDY0W4CI5kB4scd82I53qOtIUukBJvdLJeVXqPkxBHKtFwiOFBGyaQS4QsACN38S_klqDx-yckqjcgGVRvU3zk2QQLKmQ25qaGzJggfx2XTcPeNOyomuLYfa3AWC_r6GGiJ5d74BbEBdaePqJnfTEca7uNRImFFh2g1rtIlK7wxJfDvHd3zZcRx17Ds21Y2nNfQ8_nT16zyRDlplBwJ9-CUNsgjNU30ZrLqMchbIUz5ksj6C3PT74VnFE9d-i2Cl35k1HGp2ztq439jM2mFAoVYagT6dA5xHfw=w1280-h713-no

Finally this shows the T-statistics with all insignificant results whited out. Any trading system in the white area is as good as any other. So for example 30,175 is as good as 8,20.

Another way of looking at this, here is the box and whiskers plot for some commonly used crossovers (averages taken across 40 futures, pre-cost returns):

YRontUXIpoVhzJTzaS4WsZuhFmyI2XV0p9dbLvAhvp3yI-OWs_Hi4QvSkai7-FFmHG64x69SXgolEkCuHUVSeViYbFfrq-PflQ0zaasnmy-wng_Yka4b1m_I7-aZyrqub6oMoUzBBTtPdRuMo9vStZFLjhojlFZa4i72t2wSk70vf4eEqsXes_fNsPO0VQVYUlo3NNeGolZ97h1xRTIdxDE8GNiW3jwQArvqPrg9612u10luAdzvu15s-U8AQkE8j0Ad5pvJCtm1pDFzhzbaX4UzGf_cqkUJElZ1uBu5d_3WiUK7zOgIKdr3AGSNLtpi3z0kDIrkINTi2KrheyOajvZUfKqnlRCu1XVZyGqQyTsWWIWyPcPPLVKdA2qdkJOD-pqeQEEEqczopmncjv1rIZFANHn0F3c4nY_mGoFX-NNzVTZsUyYQXe8qWfUzR3P-2AoXoOkjkRibROo7vLRyjTFryzNUhkl-wIKHz-yY66yZMaB4YkZi1e-WWwKn_31TvqPpySFIw5mU3Jdfnc1pAuFxmi0FP2xPSbiVusklhC9mIdbA4WeJhg4qBBzQfxqq7N8neD9o2-SafWVLws68KyclYbdi2Nf9s_EP3c58pftKrYnIU-5Czvzro74iztMOyEE8cXZDcGtkAuFsoN4Ijm9c25QTcybjkaROu17uwVb4xsFSEDWXKg=w1650-h937-no

Apart from the first two, there are no significant differences in performance.

Thanks for the effort on this post I think it makes a great contribution to the thread! I certainly agree with your views on this as i had never really looked into why we use what we use in the moving average time frames.

I truly believe that understanding is the key, or you just can't assess the worthiness of various tools.

Great post!
 
I was wondering if anybody had come across some resources or books explaining the significance of the different and more popular moving average periods?

For example what is the significance of 20 days when we are using the 20 day moving average why not 22 days why not 30?

Or another example would be why the 200. Moving average, why not 220.

I figured there must be some science behind this and I wanted to delve into it a lot more.

Any help on this would be very much appreciated.

Thanks

A very simple trend indicator is whether today's price is higher than the price N periods ago. This measure, called rate-of-change (ROC) or momentum, has been used in academic studies, where one buys/shorts the quintiles of stocks with the highest/lowest N-month momentum, where N of 6 or 12 is often used. Sometimes a 1-month cut-out is used to ignore the return of the latest month. A problem with ROC is echo effects -- the indicator can flip from long to short because a large move that happened N periods ago rolls off the sample. A moving average deviation indicator gives linearly declining weights to past returns, which I think makes more sense. Whether you use ROC or a moving average, the choice of lookback depends on how important you think recent returns are compared to older ones. A good paper on moving averages is

Market Timing with Moving Averages: Anatomy and Performance of Trading Rules
33 Pages Posted: 27 Mar 2015 Last revised: 29 May 2016
Valeriy Zakamulin
University of Agder - School of Business and Law
Date Written: May 2016
Abstract
The underlying concept behind the technical trading indicators based
on moving averages of prices has remained unaltered for more than half
of a century. The development in this field has consisted in proposing
new ad-hoc rules and using more elaborate types of moving averages in
the existing rules, without any deeper analysis of commonalities and
differences between miscellaneous choices for trading rules and moving
averages. The first contribution of this paper is to uncover the
anatomy of market timing rules with moving averages. Our analysis
offers a new and very insightful reinterpretation of the existing
rules and demonstrates that the computation of every trading indicator
can equivalently be interpreted as the computation of a weighted
moving average of price changes. Therefore the performance of any
moving average trading rule depends exclusively on the shape of the
weighting function for price changes. The second contribution of this
paper is a straightforward application of the useful knowledge
revealed by our analysis. Specifically, we evaluate the out-of-sample
performance of 300 various shapes of the weighting function for price
changes using historical data on four financial market indices. The
goal of this exercise is to suggest answers to long-standing questions
about optimal types of moving averages and whether the best performing
trading rule can beat the passive counterpart in out-of-sample tests.
Keywords: technical analysis, trading rules, market timing, moving averages, out-of-sample testing
JEL Classification: G11, G17

Zakamulin has written a 300-page book “Market Timing with Moving Averages: The Anatomy and Performance of Trading Rules” (2017), Palgrave Macmillan, ISBN 978-3-319-60969-0 with an associated web site.
 
Last edited:
A very simple trend indicator is whether today's price is higher than the price N periods ago. This measure, called rate-of-change (ROC) or momentum, has been used in academic studies, where one buys/shorts the quintiles of stocks with the highest/lowest N-month momentum, where N of 6 or 12 is often used. Sometimes a 1-month cut-out is used to ignore the return of the latest month. A problem with ROC is echo effects -- the indicator can flip from long to short because a large move that happened N periods ago rolls off the sample. A moving average deviation indicator gives linearly declining weights to past returns, which I think makes more sense. Whether you use ROC or a moving average, the choice of lookback depends on how important you think recent returns are compared to older ones. A good paper on moving averages is

Market Timing with Moving Averages: Anatomy and Performance of Trading Rules
33 Pages Posted: 27 Mar 2015 Last revised: 29 May 2016
Valeriy Zakamulin
University of Agder - School of Business and Law
Date Written: May 2016
Abstract
The underlying concept behind the technical trading indicators based
on moving averages of prices has remained unaltered for more than half
of a century. The development in this field has consisted in proposing
new ad-hoc rules and using more elaborate types of moving averages in
the existing rules, without any deeper analysis of commonalities and
differences between miscellaneous choices for trading rules and moving
averages. The first contribution of this paper is to uncover the
anatomy of market timing rules with moving averages. Our analysis
offers a new and very insightful reinterpretation of the existing
rules and demonstrates that the computation of every trading indicator
can equivalently be interpreted as the computation of a weighted
moving average of price changes. Therefore the performance of any
moving average trading rule depends exclusively on the shape of the
weighting function for price changes. The second contribution of this
paper is a straightforward application of the useful knowledge
revealed by our analysis. Specifically, we evaluate the out-of-sample
performance of 300 various shapes of the weighting function for price
changes using historical data on four financial market indices. The
goal of this exercise is to suggest answers to long-standing questions
about optimal types of moving averages and whether the best performing
trading rule can beat the passive counterpart in out-of-sample tests.
Keywords: technical analysis, trading rules, market timing, moving averages, out-of-sample testing
JEL Classification: G11, G17

Zakamulin has written a 300-page book “Market Timing with Moving Averages: The Anatomy and Performance of Trading Rules” (2017), Palgrave Macmillan, ISBN 978-3-319-60969-0 with an associated web site.


A big thanks for this! This is exactly the kind of thing I am looking for. I really appreciate the time you have taken add to this thread!

I am in Southeast Asia at the moment but I will download and print that off at read it. As previously mentioned, a better understanding of the tools I am using is instrumental.

Cheers
 
So you believe that MA's work because enough people to believe them that in combination they buy or sell sufficient to move price? So indirectly, MA's move price?

Are you really saying these things?

I'm talking about the MA periods that people tend to use. Why use a period of 200, 30, 50, 100, etc? People use them because either they think they are significant or because they think others think they are significant. There's no other reason to use an MA period of say 19 or 21 vs. 20.
 
I'm talking about the MA periods that people tend to use. Why use a period of 200, 30, 50, 100, etc? People use them because either they think they are significant or because they think others think they are significant. There's no other reason to use an MA period of say 19 or 21 vs. 20.

Remember, frequency = 1/period. So a lowpass filter with a cutoff frequency of 0.1 will have a 10 day period. The filter's cutoff period controls the group delay (lag) and attenuation.

How much lag you can stand in your MA, and the smoothness of the curve will be determined by the number of days, or period, in your calculation.

Also, for sampled data, such as daily end-of-day data, the Nyquist frequency would be 0.5 cycles per day (2 day period). You want the cutoff frequency of your filter to be at least a couple of octaves above the Nyquist frequency. That would be a period of 8 days (frequency of 0.125 cycles per day.)

If all this DSP stuff gives you headaches, good, you need to get out of your comfort zone and learn something new, like how moving averages are really engineered.
 
Interesting...If I may,how much added value do you think having an understsnding of "all this DSP"stuff brings relative to extensive backtesting/WFA??

I fully agree to be great at anything one needs to step outside their comfort zone,but to what degree/direction???











Remember, frequency = 1/period. So a lowpass filter with a cutoff frequency of 0.1 will have a 10 day period. The filter's cutoff period controls the group delay (lag) and attenuation.

How much lag you can stand in your MA, and the smoothness of the curve will be determined by the number of days, or period, in your calculation.

Also, for sampled data, such as daily end-of-day data, the Nyquist frequency would be 0.5 cycles per day (2 day period). You want the cutoff frequency of your filter to be at least a couple of octaves above the Nyquist frequency. That would be a period of 8 days (frequency of 0.125 cycles per day.)

If all this DSP stuff gives you headaches, good, you need to get out of your comfort zone and learn something new, like how moving averages are really engineered.
 
If all this DSP stuff gives you headaches, good, you need to get out of your comfort zone

Can't say whether DSP is useful or not. Background is mathematics/statistics. However, digital signals are not price processes.

I found it most useful to transform data using linear combinations of indicators and prices, then put algorithms and variables on those to get useful info.

This could be something as simple as taking bollinger bands, and then calculating the ratio of a fast set of bands and a slower set, then put indicators on that.....

Or you could create an algo that uses variables that are referencing spreads of moving averages......

Ideas like this helped me find something that worked.
 
Can't say whether DSP is useful or not. Background is mathematics/statistics. However, digital signals are not price processes.

I found it most useful to transform data using linear combinations of indicators and prices, then put algorithms and variables on those to get useful info.

This could be something as simple as taking bollinger bands, and then calculating the ratio of a fast set of bands and a slower set, then put indicators on that.....

Or you could create an algo that uses variables that are referencing spreads of moving averages......

Ideas like this helped me find something that worked.

Thanks for sharing. Filters (aside from the all-pass filter) throw out information and introduce lag. Instead, I find it more useful to look at new highs and new lows and assess the significance of those highs and lows. That is much more difficult to develop an algorithm around vs. the simple MA crossover, but the advantage is no lag.

Interesting...If I may,how much added value do you think having an understsnding of "all this DSP"stuff brings relative to extensive backtesting/WFA??

Not that much. Otherwise, DSP engineers would be making all the money.
 
Back
Top