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
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!
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
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???
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. Not that much. Otherwise, DSP engineers would be making all the money.