A test to find the best moving average selling strategy

Gaming

To develop or refine our business algorithms and systems, our operators often conduct experiments, tests, optimizations, etc. One of our traders tried a variety of selling strategies based on moving averages and now we share some of those findings. Richard Donchian popularized the system in which a sell occurs if the 5-day moving average crosses below the 20-day moving average. RC Allen popularized the system in which a sell occurs if the 9-day moving average crosses below the 18-day moving average. Some traders feel that they give up less of the gains they make if they use a shorter long moving average. These people prefer to sell if the 5-day moving average crosses below the 10-day moving average. Traders have used variations of these ideas (some touting the benefits of one variation and others touting the benefits of another). A friend told me about the crossover of the 7 and 13 day exponential moving averages. Because that system was highly recommended, it was included in the tests for comparative purposes.

The strategies covered in this particular series of tests were as follows and all involved simple moving averages, except where otherwise noted.

Sell ​​if the stock’s 9-day average crosses below the 18-day average,

Sell ​​if the stock’s 10-day average crosses below the 18-day average,

Sell ​​if the stock’s 10-day average crosses below its 19-day average,

Sell ​​if the stock’s 9-day average crosses below the 19-day average,

Sell ​​if the stock’s 9-day average crosses below the 20-day average,

Sell ​​if the stock’s 10-day average crosses below the 20-day average,

Sell ​​if the stock’s 4-day average crosses below its 18-day average,

Sell ​​if the stock’s 5-day average crosses below the 18-day average,

Sell ​​if the stock’s 4-day average crosses below its 20-day average,

Sell ​​if the stock’s 5-day average crosses below the 20-day average,

Sell ​​if the stock’s 5-day average crosses below the 9-day average,

Sell ​​if the stock’s 4-day average crosses below its 9-day average,

Sell ​​if the stock’s 4-day average crosses below the 10-day average,

Sell ​​if the stock’s 5-day average crosses below the 10-day average,

Sell ​​if the stock’s 7-day average crosses below its 13-day average (exponential),

Sell ​​if the stock’s 7-day average crosses below its 14-day average (exponential).

We wanted to avoid “curve fitting”. That is, we wanted to test these strategies across a wide range of stocks representing a variety of industries and market sectors. Also, we wanted to test in a variety of market conditions. Therefore, we test the strategies on each of approximately 3000 stocks over a period of about 9 years (or during the period during which the stock has traded if it has traded for less than 9 years), taking into account the commissions. but not the “slip”. Slippage occurs when the sell order is $ 30 but the price at which the sale is executed is $ 29.99. In this case, the slippage would be one penny per share. The same “buy” strategy was used consistently for each trial. The only variable was the selling rule. For each strategy, we total the returns of all stocks. We conducted a total of 47,312 tests.

The idea behind this experiment was to find out which of these selling strategies achieved the best results most of the time for the most stocks. Remember that the profitability of a system that is applied to a single share (even if this is repeated for 3000 shares as in our test) does not paint the whole picture. Profitability per unit of time invested is a better way to compare systems. In designing this test, we required each system to wait for a new buy signal on the particular stock being tested. In real life, a trader could jump to another action immediately after a sale. Therefore, the merchant would have little to no “downtime” while waiting to make the next purchase. A system that is less profitable when a single stock is traded but exits a position earlier could generate higher profits for a year by allowing a person to reinvest in a different security as soon as the first is sold. On the other hand, it would perform worse if it had to wait for the next buy signal on the same stock while another slower system is still holding and making money.

The different sales systems were organized in order of profitability. We created a table where the left column was the short moving average and the middle column was the long moving average. Sell ​​signals were generated when the short average crossed below the long average. The right column was the total return for all stocks analyzed. However, the key element of comparison was not the actual magnitude of profit for each sales system. This would vary considerably with different combinations of “buy” and “sell” systems. We were not testing the profitability of any complete system, but the relative merit of the various “selling” systems in isolation from their respective optimal “buying” systems. The main points can be briefly stated as follows. Either of these systems can be the most profitable when trading a particular stock at a certain time. However, this experiment has shown to our satisfaction that selling when the 9-day moving average crossed below the 18-day moving average was generally not as profitable as selling when the 10-day moving average crossed below the 20-day moving average. days. The Donchian 5-day moving average crossover of the 20-day average was also generally more profitable than the 9-day average crossover of the 18-day average. All the tests were identical. The only variable was the combination of moving averages selected for the sales system.

This study supports the idea that a triple moving average system based on the 5, 10 and 20 day moving averages is likely to be more profitable than the similar combination of the 4, 9 and 18 day moving average. It has the added advantage of allowing a person to monitor the crossover of the 5-day moving average with the 20-day moving average. The latter is the Donchian system, and it is a strong system in its own right. It also gives earlier signals than the 9-18 or 10-20 combinations, although the 10-20 combination tends to generate higher average returns. So including the 5, 10, and 20-day moving averages on your chart gives you an additional option. You can use the 5, 10 and 20 day triple moving average system or you can use the Donchian 5, 20 day dual moving average system. If the stock pattern doesn’t look or “feel” right for you, the crossover of the 5-day moving average will give you an earlier exit. Otherwise, you can wait for the 10-20 crossover. Either one will likely give a more profitable signal than the 9 or 18 day combination. The decision of which to use can be based on independent considerations related to the behavior of stocks.

Copyright 2009, by Stock Disciplines, LLC. also known as StockDisciplines.com

Leave a Reply

Your email address will not be published. Required fields are marked *