| Automated Trading Black box systems, strategy automation, algorithmic trading, etc... |
![]() | | Tweet | |
| | #1 | ||
![]() ![]() | Trend Testing Indicators For Adaptive Trading Systems The most simple way to divide the market is to use a 200-period simple moving average (SMA). When price is above it we are in a bull mode. When price is below it, we are in a bear mode. This simple concept can improve many trading systems. I’ve personally used this technique many times. Yet there are other techniques to divide a market and some of these might produce better results than our old reliable 200-day SMA. In this article I want to take a look at a few different methods and test them on several markets. The indicators we are going to test are:
The Smoothed Adaptive Momentum and Relative Strength Ranking are two indicators you may not be aware of. First, the Smoothed Adaptive Momentum was created by John Ehlers. It’s a complex indicator and more then I want to get into during this article. Google it if you wish and you can also find the EasyLanguage code here. As for the RS Rank, you can find more about here. I will say this about the RS Rank for now, traditionally it’s used as a ranking tool to compare a group of stocks or ETFs to determine which specific instrument is performing best. As its name implies, it ranks each instrument based on how well the instrument has been performing. You can then compare this score to the other stocks or ETFs in your basket of trading instruments. Thus, you can simply pick the instrument with the highest RS Rank score when creating a momentum based trading system. In this article I’m using it for a completely different purpose and was curious on how well it would hold up. We are going to use a 140 day period for all our examples. 140 days represents about seven months of trading if you figure there are about 20 trading days per month. This is not a magic number by any means. I was first going to pick 120 days because this represents half a year. However, it seemed too obvious a choice so I pushed it back to seven months. I did not want to pick a smaller number than six months because I don’t want the buy/sell signals to occur very often. The idea is capture the long term market mode, not every market gyration. I did not want to look at 200 either. I wanted to do something a little different. Maybe we can find something more responsive than a 200-day SMA. Of course I encourage you to perform your own testing as well. The strategy code to test the effectiveness of these different indicators is rather simple. We are only going long during a bull market and closing our position when that bull market switches to a bear market. In essence we are creating a very simple trend following system. For each indicator the transition is based upon:
First I will take a look at the SPY ETF. S&P 500 ETF (SPY) FROM 1993 – 2011 ![]() The chart above compares our four different methods vs. some common system performance metrics such as profit factor and average net profit. The bar graph specifically compares each system’s profit factor score. Here we can see the RS Rank has clearly performed better at distinguishing between a bull or bear mode. The ETF history is not very extensive, so let’s take a look at the cash index, which goes back to 1960, and see what the results look like. S&P 500 INDEX (SPX) FROM 1960 – 2011 ![]() Here we can see even going back to 1960 on the S&P 500 cash index that RS Rank does a nice job. What about the futures market? Let”s look at the S&P E-mini. S&P 500 E-MINI (ES) FROM 1998 – 2011 ![]() Now we see a huge difference from the previous two markets. Notice all the profit factors are below 1. This means the strategy performance produces a loss. On the ETF and Cash index all indicators produce a positive result. What’s going on? The futures market is a different beast. The trending characteristics of the S&P E-mini market is very weak. In fact, much has been written about the mean reversion characteristics of the S&P 500 E-mini index futures market. Our study is simply confirming this fact. Based upon what we know now, if you were going to design a trading system to trade the S&P 500 ETF it appears using the RS Rank would be a good choice. On the other hand, if you were going to use the E-mini as your market you might want to use the SMA. This is in fact what is done with our Aurora trading system. While the SMA does not perform well as a trading system, it does do a good job of breaking the market into the two bullish or bearish modes. Often you will see increased performance in your trading systems by utilizing a SMA filter for the E-mini. Let’s look at a different market. The Euro currency market. First up is the ETF. EURO CURRENCY ETF (FXE) FROM 2006 – 2011 ![]() We don’t have much historical data to look at, so these results don’t mean a whole lot. However, they do appear consistent with our results from the S&P 500 ETF results. There appears to be one clear winner: RS Rank. We have more historical data on the futures market so, let’s look at that. EURO CURRENCY FUTURES (EC) FROM 2001 – 2011 ![]() The above bar graph is the same as the Euro ETF! From the graph above we can see the futures market for the Euro has solid trending characteristics. We also see, once again, RS Rank shines. However, the number of trades is low, but do we see a pattern? Based on these limited tests RS Rank show superior results when determining a bull market from a bear market. The exception is the S&P 500 E-mini. In the case of the S&P 500 E-mini a simple moving average appears to be the better indicator. I would imagine similar results would be found between the DOW futures vs the DOW ETF. In summary, put this to use in your own efforts at building a trading system. Use an indicator to determine the market mode and trade accordingly. The point here is to have your automated trading system automatically adapt to a changing market. For example, when the market is bullish you may want to look for longs only while ignoring shorting opportunities. Or if the market is within a bearish mode the criteria for entering a long position might be stricter than when in a bull market. Too often people simply trade the same setup or method during different market conditions. By breaking the market up into two modes, you are making your trading system dynamic and adaptive to the changing market. There are ways to segment a market further. In a future post I will discuss how to segment a market into four distinct modes. Each of these four modes can be used to further adapt your trading system. | ||
| |
|
| The Following 12 Users Say Thank You to jswanson For This Useful Post: | ||
Blaiserboy (10-22-2011), Charlton (10-17-2011), djsinha (10-18-2011), ecredic (10-19-2011), gero (10-19-2011), gmcleod (10-18-2011), hansjs (11-02-2011), kpt (10-18-2011), MadMarketScientist (10-17-2011), oliveagle (03-30-2012), peterbee77 (10-18-2011), SIUYA (03-23-2012) | ||
| | #2 | ||
![]() | Re: Trend Testing Indicators For Adaptive Trading Systems We formed a hypothesis that the most important thing for adaptive systems is to know the moment of adaptation and to optimize only on the current market patterns. The Elliottware approach is a machine learning extension of the Elliott wave principle. The key is to find a stable structure and to train your algorithms on it. The sampling should be adaptive and the human pattern recognition is a key aspect. | ||
| |
|
| The Following 2 Users Say Thank You to John Last For This Useful Post: | ||
Blaiserboy (10-22-2011), jswanson (10-19-2011) | ||
| | #3 | ||
![]() | Re: Trend Testing Indicators For Adaptive Trading Systems Quote:
With regard to the point above, my expectation would be that the ETF would be more mean-reverting than the future (although I agree that the trending quality of both is poor). When you were testing, did you test against the @ES.D cash session data, as this would really be the true equivalent for the SPY, which only trades exchange hours? Bluehorseshoe | ||
| |
|
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Trend & Momentum - Indicators of Choice | optiontimer | Technical Analysis | 14 | 06-10-2011 07:47 PM |
| AMIBROKER Custom Indicators and Systems | mihai0509 | Coding Forum | 1 | 07-03-2009 05:09 PM |
| Amibroker Indicators & Systems | mihai0509 | Technical Analysis | 2 | 07-03-2009 03:03 PM |
| Testing indicators info please | increase | Market Analysis | 0 | 12-21-2007 09:46 PM |
| Trend Following Systems | Soultrader | Brokers and Data Feeds | 7 | 03-06-2007 10:58 AM |