TWO MOVING AVERAGE CROSSOVER

The two moving average crossover is probably the simplest and most robust trend-following trading system. Traders initiate long positions and exit shorts whenever the shorter-term moving average settles above the longer-term moving average; they stop and reverse whenever the shorter-term moving average settles below the longer-term moving average.

Using CQG, the programming code for a typical two moving average crossover system is written in this way:

Long Entry and Short Exit:

MA(@,Sim,9)[−1] XABOVE MA(@,Sim,26)[−1]

Short Entry and Long Exit:

MA(@,Sim,9)[−1] XBELOW MA(@,Sim,26)[−1]

Table 3.2 presents the backtested portfolio results from December 31, 1992, to December 31, 2002, for this system.

Assuming $200,000.00 under management, the portfolio would have enjoyed an 8.48 percent average annualized return on investment over the 10-year backtested period while enduring a 19.98 percent maximum drawdown. Although these results are somewhat encouraging, traders employing this system must be willing to endure 61.18 percent losing trades, 10 consecutive losses, and lengthy intervals (almost two years) prior to achievement of new equity peaks.

It is interesting to notice how the low correlations of assets within our portfolio improved overall performance of this system. Diversification is probably among the most underemphasized benefits of system trading. A brief glance through the “totals” column shows that the portfolio's worst drawdown was only around ...

Get Mechanical Trading Systems: Pairing Trader Psychology with Technical Analysis now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.