Interactive illustrations to Chapters 9 and 10 of the book Market Timing with Moving Averages: The Anatomy and Performance of Trading Rules by Valeriy Zakamulin
Chapter 9 utilizes the longest historical sample of data on the S&P Composite stock index and comprehensively evaluates the profitability of various moving average trading rules. Among other things, the chapter investigates the following: which trading rules performed best; whether the choice of moving average influences the performance of trading rules; how accurately the trading rules identify the bullish and bearish stock market trends; whether there is any advantage in trading daily rather than monthly; and how persistent is the outperformance delivered by the moving average trading rules. The results of this study allow us to revisit the myths regarding the superior performance of the moving average trading rules in this well-known stock market and fully understand their advantages and disadvantages.
Chapter 10 tests the profitability of various moving average trading rules in different financial markets: stocks, bonds, currencies, and commodities. The results of these tests allow us to better understand the properties of the moving average trading strategies and find out which trading rules are profitable in which markets. The chapter concludes with a few practical recommendations for traders testing the profitability of moving average trading rules. The analysis presented in this chapter also suggests a hypothesis about simultaneous existence, in the same financial market, of several trends with different durations.
These interactive illustrations demonstrate the results of the in-sample tests conducted using the monthly data on the following stock market indices:
S&P Composite Stock Index;
Dow Jones Industrial Average;
Large cap stocks;
Small cap stocks;
The user can define:
The start and end dates of the in-sample period. Note that the in-sample period must be long enough! If you see this error message: An error has occurred. Check your logs or contact the app author for clarification, it means that you have to increase the length of the in-sample period.
The amount of one-way transaction costs, in percentages.
Choose either a single (examples are MOM, MAC, etc) or a combined rule (denoted “All of them”) to test.
The type of a moving average to use in the tested rule.
The performance measure used for the purpose of optimization.
Whether to move to cash or sell short when the trading rule generate a Sell signal.
The following single rules are tested:
MOM(n) for n in [2,25], totally 24 trading strategies;
P-MA(n) for n in [2,25], totally 24 trading strategies;
CDIR(n) for n in [2,25], totally 24 trading strategies;
MAC(s,l) for s in [1,12] and l in [2,25], totally 222 trading strategies;
MAE(n,p) for n in [2,25] and p in [0.25,0.5,…,10.0], totally 960 trading strategies;
MACD(s,l,n) for s in [1,12], l in [2,25], and n in [2,12], totally 2,442 trading strategies.
Panel Plot plots the cumulative returns the buy-and-hold strategy (BH) and the top 7 moving average strategies.
Panel Performance reports the performances of the buy-and-hold strategy and the top 7 moving average strategies.
Panel Outperformace plots the 5-year rolling outperformance for the top 5 moving average strategies. The outperformance is defined as the difference between the performance measure of the moving average strategy and the performance measure of the buy-and-hold strategy.
Panel Summary reports the descriptive statistics of the monthly returns to the buy-and-hold strategy and the top moving average strategy.
It is useful to observe the following results:
The short selling strategy, when the trader sells stocks short when a Sell signal is generated, is risky and does not pay off. Specifically, the performance of the short selling strategy is substantially worse than the performance of the corresponding strategy where the trader switches to cash;
From a practical point of view, the choice of performance measure does not have a crucial influence on the selection of the best trading strategy in a back test. Therefore the Sharpe ratio, which has become the industry standard for measuring risk-adjusted performance, seems to be the most natural choice for performance measurement;
From a practical point of view, the choice of moving average does not have a crucial influence on the performance of moving average trading strategies. In particular, regardless of the choice of moving average, the performance of the best trading strategy in a back test remains virtually intact. In this regard, the SMA can be preferred as the simplest, best known and best understood moving average;
Even in a back test the performance of the best trading strategy is very uneven over time; this strategy might underperform the buy-and-hold strategy over relatively long periods;
The profitability of a moving average trading strategy depends on the stock price index. The best profitability seems to be attained when either a well diversified index of large cap stocks is used (S&P 500 is an example of such index) or the small cap stock index is used.