Adaptive Trend-following Using the Randomness Index Indicator

The Randomness Index was introduced yesterday in another post. The value of this indicator is calculated for any set period using the closing prices. Under normal conditions the indicator swings between +100 and -100 although values beyond those extremes are also possible. Values between +10 and -10 usually denote a random trading range but only when the indicator is on a downtrend or sideways motion.

On the SPY chart below, the bottom pane shows with red color the periods of random trading, again in the context of this indicator that is calculated at every point using the close of the past 250 trading days:


The most recent period of random trading activity in SPY was between August 2011 and July 2012, i.e. almost a full year of random action. In the past few days the index has jumped to above 30% and it is approaching levels that in the past have occurred just before major or minor corrections. Yesterday, I also showed charts of QQQ and GLD  with the indicator plotted.

Adaptive trend-following using the RI indicator

The potential of any indicator for trading the markets must be evaluated without any additional filters or other indicators. For this purpose, a long/short symmetric system was coded that uses just this indicator. The system logic is as follows:

Long positions: enter at the close when RI(250) crosses the 10% line from below
Short positions: enter at the close when RI(250) crosses the 0% line from above

Notes: Reverse entry signals cause exit. The stating capital was set at 100K and the system remains fully invested at all times. In the case of spot indices a hypothetical number of shares is bought equal to available capital divided by the index price.

Backtest range for ETFs: inception to 05/14/2013.
Backtest range for indices: 01/02/1990 (or at first trading date thereafter – 05/14/2013

Results for SPY

Below are the backtest results for SPY (non-adjusted data):


The trading system based on the RI indicators generated 7 trades in the history of this ETF capturing all major trends with 85.71% win rate, maximum drawdown of -32.48% in 2001 and a CAR equal to 10.11%. No dividends are included in the results. Recall that the buy and hold return of SPY in the same period with dividend reinvestment is about 8.6%. Based on the distribution obtained from a Monte-Carlo simulation of 20,000 random systems, the return of this system is significant at the 99.50% level meaning that only 0.5% of all 20,000 random systems generated a CAR higher than 10.11%. The system had only one negative year and during 2008 it returned 21.1%. The detailed trade-by-trade performance is shown below:


Below is a detailed profit table:


Curve-fitting and significance analysis

Although the trading system base don the RI indicators turns out to be significant at the 99.50% level when compared to a random system, a question still remains whether this system was fitted intelligently by some means to the SPY data (ex. genetic programming, data-mining, etc.). This important question can be partly answered buy studying the performance of the same exact system – without any modifications whatsoever – on other markets. If the system works well on a sufficiently large number of markets, that increases its significance because its low trade sample is increased and that also decreases the probability of a curve-fit. Below are the results for several other indices and ETFs:

Market* Buy & hold RI system
Russell 2000 7.82% 5.58%
DAX 8.12% 6.85%
CAC-40 3.32% 6.78%
FTSE 100 4.40% 5.25%
S&P/ASX 200 4.21% 4.17%
DIA 6.77% 4.13%
QQQ 3.18% 7.86%
IWM 7.38% 6.06%

*Spot index returns do not include dividends for both the buy and hold and the RI system case. In bold are shown cases where the buy and hold return was exceeded.

It may be seen from the above table that the RI system in several markets returned more than the buy and hold. This performances decreases the probability of a curve-fit in the SPY example and qualifies system for adaptive trend-following. The term adaptive is used to differentiate the RI system from those that do not adapt to changing market conditions, like for example moving average crossover systems. The RI system adapts to market conditions by measuring the level of non-randomness in the last 250 trading days.

The RI trading system is the second adaptive trend-following system that I have developed recently. Then first one was described in this post.

Disclosure: no relevant position at the time of this post and no plans to initiate any positions within the next 72 hours..

Charts created with AmiBroker – advanced charting and technical analysis software.”


This entry was posted in Trading Strategies and tagged , , . Bookmark the permalink.