Consulting | Custom Trading Systems
Built-In Indicators | Custom Indicators

February 2007 Stocks and Commodities Traders Tips

Anticipating Moving Average Crossovers (Part 1)

Original article by Dimitris Tsokakis
AIQ Code by Richard Denning

The AIQ code for the TC Indicator by Dimitris Tsokakis and a related trading system that I devised to test the indicator is shown below. I used the NASDAQ 100 list of stocks and two simple trading systems. The first uses the traditional crossover of two moving averages and buys when the shorter moving average crosses up from below the longer moving average. I used the author’s suggested parameters of 20 and 30 days. I also set up a trading system that uses the TC indicator in the way the author suggests, viz., when the TC cross down from above through the closing price then a buy signal is generated. Short sale trades use the reverse of these rules. I coded but did not include the tests for the short side. My objective was to see if the approximate one day lead on the crossovers that the TC usually provides would show a better return than using the traditional crossover of the two moving averages.

Using the AIQ EDS module, which tests all the trades on a one share basis, I compared the long side trades for 1, 2, 3, 5, 10 and 20 day fixed holding periods. No other exit criteria were used. My hypothesis was that the one day lead would have an effect only for the first few days of the trade and then, as the holding period is lengthened, the advantage to the TC indicator would fade. In Table 1, I show the results of these fixed period tests. My hypothesis was correct and the advantage of the TC indicator peaks around the 2 to 3 day holding period and then actually reverses at the 20 day holding period.


I also simulated trading the two systems with a fixed 2 day exit on the NASDAQ 100 list of stocks using the AIQ Portfolio Manager for the period 10/1/02 to 12/06/06. I ran the same two systems that were tested in the EDS module using the 2 day exit, applying 20% of capital to each trade, 3 trades per day with a total of 5 positions at any one time. The results of these two tests are show in Figure 1. The blue line is the AMAX-2 system that uses the TC Indicator and the red line is the AMAX-1 system that uses the traditional crossover of two moving averages for an entry signal. The AMAX-2 system with the TC indicator clearly outperforms the traditional crossover system with a return of 24.22% with a Sharpe ratio of 0.71 versus 8.38% and a Sharpe ratio of 0.18. I also tested the period from 10/01/00 to 10/01/02 and both systems show negative returns with large draw downs (not shown). Before trading this system on stocks, it appears that a market-timing filter should be added.


EDS Code for Anticipating Moving Average Crossovers
Anticipating MA Xovers.EDS

















Disclaimer | Privacy Policy | Contact Us | Spam Blocker | ©2009 Traders Edge Systems