Many books and articles have been written about how to use moving averages and a variety of technical indicators to trade the markets. Amazingly, very few of these books or articles show actual test results. Back testing is a relatively straightforward process, simple to accomplish with trading software, and provides valuable insights. A simple use of back testing is to determine if a system was profitable in the past. If it isn’t profitable in a back test, a trading strategy probably shouldn’t be used in real time. In this article, we’ll present some actual test results and see if some simple strategies work well enough to trade.
All of the test results will be shown for a diversified basket of futures contracts. Small investors need leverage to make significant profits in their accounts and stocks, even if you’re day trading with leverage of four to one, don’t offer enough potential. The futures contracts tested will include cotton, copper, feeder cattle, sugar, crude oil, the US dollar index, and five-year Treasury notes. The required exchange minimum margins for this basket totals roughly $27,000.
This testing will cover the time period from January 1, 2000 through August 10, 2011, a time that includes significant market volatility in both directions along with extended periods of consolidation. Daily data is used and trades will be taken at the open on the day following a signal. Round trip commissions and slippage of $45 per trade will be subtracted from the results to estimate the costs of trading.
That last point is often overlooked in the few published test results. Excluding trading costs can make a large difference in returns and can even turn a losing strategy into a winner. But, in the real world, there are costs and back tests should always recognize that. It presents a higher hurdle to success and incorporates the idea that trading for a living is hard.
Finally, the test results will be unoptimized. The same parameters will be used for each contract. Optimization could be used to improve the back test results, but this increases the risk that the future performance won’t be like that seen in the testing. A good strategy should work with the same parameters over different markets. No stops are used in these tests; in fact no exits other than a reversal are used. In practice, stops that take you out of a winning trade will improve performance.
Stocks and gold are very different from other futures contracts, and they should usually be tested separately. Futures markets tend to trade with strong trends, which seem to be driven by fundamentals. While fundamental factors influence stocks and gold, both of those markets have occasional periods when prices seem to become completely removed from fundamentals and are instead moving more on sentiment. This makes these markets more mean reverting in the short-term, and since the personality of the markets differ from most other futures, different systems should be used in stocks and gold.
The simplest trading strategy is probably a moving average crossover with a single moving average. If the price closes above the average, a long trade is initiated. That trade is closed and a short trade is opened when the price closes below the moving average. For this test, a 20-day moving average will be used.
The returns from such a simple approach are surprisingly good, an average annualized return of 12.5% a year. Eight years were positive, four showed negative results including the partial year returns available for 2011. The dollar index and Treasuries lost money over that time frame, but the other contracts were winners. Gains in the dollar and Treasuries generally offset losses in years the systems was unprofitable. For this strategy, the drawdown is very high and exceeds 100% of the maximum profit attained during the test period. Large drawdowns generally make a system untradeable, even if the annual returns seem acceptable.
Two moving averages can also be used as a trading strategy. Buys are signaled when the short-term average crosses above the longer one, and sells occur when the shorter moving average falls below the longer average. In theory, this should result in fewer whipsaw trades because the shorter moving average will be smoother than the raw price data used in the single moving average system. A whipsaw trade occurs when a signal is rapidly reversed, resulting in a trade that lasted only a short amount of time and ended in a small loss. In reality, whipsaws are inevitable and will occur in almost any system. They can be reduced, but there is no way to eliminate all whipsaw trades.
Moving average lengths of 21 and 34 days were used in the test. These values were selected just because they are consecutive Fibonacci numbers. While Fibonacci levels and numbers are generally not useful in trading, they do make good parameters for testing since they are nearly random. Advocates will argue that the markets respect Fibonacci targets, and offer a few well-selected examples to show success. Usually, prices will come very close, within pennies of the desired target in these examples. There are many more examples where Fibonacci targets are useless on charts, but those who like them ignore the weight of the evidence. The same idea could work with any random number and 42.1% retracements are actually as common, when an error band is introduced, as the 38.2% Fibonacci level.
Testing shows the two moving average system works well, better than the single moving average. There are still a number of whipsaw trades and overall only 39% of the trades are winners, but the annualized average rate of return is 24.9%. The maximum drawdown is more than a third of the total profits, which is the upper bound of an acceptable system. Profits are fairly evenly distributed by year, with only three losing years.
Indicators can also be used as a simple strategy. The MACD (Moving Average Convergence Divergence) indicator offers clear signals. Trades will be taken when the MACD crosses zero with long positions held when MACD is greater than zero and shorts established when the indicator is negative. The settings for MACD that will be used are the standard default settings in most software, 12 and 26 days with a 9 day signal line.
The default MACD calculation subtracts a long-term moving average from a shorter-term moving average, so the 26-day exponential moving average is subtracted from the 12-day moving average. A 9-day average of the difference is found, and when the MACD is above its 9-day average, the MACD is positive. It is negative when MACD is below its 9-day average. More details on MACD are available at a number of web sites.
This strategy is very profitable, with an average gain of 26.7% a year. All commodities are profitable and the worst drawdown is about 12% of the total profits. Three years showed small losses. On average, about one trade a week is made. Average winning trades are about three times larger than average losses, so the system is profitable even though less than a third of the trades are winners.
The test results indicate that futures trading can be profitable for small accounts, and that it is actually possible to make a living even when starting with a relatively small account. In all three examples, an account of $27,000 grew to at least $100,000 at a time when the stock market went nowhere. This is not a get-rich-quick strategy, but futures do offer the potential for long term financial security even though common wisdom is that they are among the riskiest possible investments.
Given the choice of the three systems, the MACD strategy delivers the best annualized returns and has the least risk when risk is expressed in terms of drawdowns. Optimization could help increase the profits and also decrease the likelihood that the future will be as profitable. The default variables offer good enough results, and this basic system would be a good starting point for those wanting to trade for a living.
By Michael J. Carr, CMT