Month: January 2013

The Signal and the Noise Review

I just managed to finish the The Signal and the Noise: Why So Many Predictions Fail but Some Don’t [Note: This is an affiliate link], by Nate Silver. It was an enjoyable read from a personal perspective, but only because I just enjoy reading technical books written towards a laymen audience, such as this book, Fooled By Randomness, The Black Swan, etc. However, I didn’t really learn that much from this book, and I wouldn’t recommend it if you are knowledgeable about basic trading system design methodologies and problems.

Things that I learned:

  1. Philip Tetlock’s Hedgehog vs Foxes 

    • Reading about this was more of a refresher because I vaguely recall reading this somewhere else, but it was useful re-solidifying the information.
    • While reading Falkenblog’s review of the Signal and the Noise, he mentioned John Cochrane’s opinion on the Hedgehog vs Fox debate which I found insightful
  2. The Frequentism vs Bayesianism debate

Things that I already knew:

  1. Financial data is prone to look-ahead bias
  2. Simpler models are often better
  3. Sometimes the data set does not provide signal, only noise
  4. More competition = less profits, especially for the less skilled
  5. Don’t over optimize models

Rotational Momentum Investing: Normalizing the Data

I’ve been looking into trading a rotational model using momentum lately. This post covers a few good reason for why one should trade momentum. My personal reasons are:

  • It provides diversification
    • I plan to trade a mean-reversion system soon, so adding a trend-following trading system will smooth my equity curve.
  • It is proven within academia
    • There are multitudes of research papers written over the momentum effect, and it is well-established anomaly within academia. You can find some of these for free over at QuantPedia.
  • Easy to trade
    • Trading a momentum system will only require to monitor it weekly, or monthly, leaving time for research into other efforts.

The momentum system being tested:

  • Invests 100% of equity in the top four stocks using equal weights.
  • The stock universe is all NASDAQ-100 stocks according to the NASDAQ website on 01/01/2013 (ticker list: NASDAQ Ticker List)
    • Not free from survivor-ship bias – results will be inflated
  • Test will be frictionless, from 01/01/1998 – 01/13/2013
  • Re-ranks and trades monthly. Does NOT re-balance monthly.
    • I used AmiBroker to test this. I re-rank at the first, second, and third day of every month. I also set an option where I am forced to hold onto a position for at least 5 days before selling. There are some occurrences where this may not perfectly replicate a monthly re-rank.

For this test, I will be using four different indicators:

  • TSI()
    • CAGR: 31.52%
    • MDD: -69.06%
  • Close relative to the 250-day high of the high
    • CAGR: 13.38%
    • MDD: -50.84%
  • 250-day ROC of Close
    • CAGR: 35.25%
    • MDD: -73.00%
  • Close relative to the all-time high of the high
    • CAGR: 15.17%
      MDD: -49.86%

For the purposes of creating a better performing ranking criterion, I will aggregated all four indicators into one. There are two obstacles I must first overcome:

  1. Normalizing the criterion
    1. The four indicators each have different scalings and different distributions. To create an aggregate indicator, we should normalize the indicators so they have similar sensitivies.
  2. Weighting the criterion
    1. The four indicators will most likely not contribute equal amounts to increasing performance. TSI() may have twice as much predictive power as the 250-day ROC, or it may be the other way around. Designing a weighting scheme will assign relative importance to the contribution of an indicator to ranking criterion

Normalizing the data:

There are two methods of normalizing the data which I will be testing for individual performance. The perfect rank function, and the z-score function.


  • TSI()
    • CAGR: 18.48%
    • MDD: -68.04%
  • Close relative to the 250-day high of the high
    • CAGR: 17.33%
    • MDD: -49.88%
  • 250-day ROC of Close
    • CAGR: 25.55%
    • MDD: -46.69%
  • Close relative to the all-time high of the high
    • CAGR: 19.29%
    • MDD: -42.78%

Percent Rank:

  • TSI()
    • CAGR: 20.21%
    • MDD: -65.30%
  • Close relative to the 250-day high of the high
    • CAGR: 14.45%
    • MDD: -54.53%
  • 250-day ROC of Close
    • CAGR: 22.48%
    • MDD: – 45.45%
  • Close relative to the all-time high of the high
    • CAGR: 16.07%
    • MDD: -50.51%


Z-score turned out to be better at normalizing indicator sensitivities while maintaining (or in the case of close relative to the all-time high of the high/250-day high of the high, increasing) performance.  From this test, we can also form a tentative conclusion that TSI and 250-day ROC are indicators that perform better as a ranking indicator on an absolute basis (it doesn’t matter historically where the indicator resided), whereas for indicators such as the close relative to a variable, they perform better on a relative basis (where the indicator has resided historically positively impacts performance).

4-Hour Body Principles in Trading

I was reading The 4-Hour Body by Tim Ferriss and found two quotes that are highly applicable to trading:

On psychology:

Does that mean [the workout routine] won’t work for some people? No, it just means that it will fail for most people. We want to avoid all methods with a high failure rate, even if you believe you are in the diligent minority. In the beginning everyone who starts a program believes they’re in this minority.

Take adherence seriously: will you actually stick with this change until you hit your goal?

If not, find another method, even it it’s less effective and less efficient.

On listening to others:

Everyone you meet (every male, at least) will have a strong opinion about how you should train and eat. for the next two to four weeks, cultivate selective ignorance and refuse to have bike-shed discussions with others. Friends, foes, colleagues, and well-intentioned folks of all stripes will offer distracting and counterproductive additions and alternatives.

Nod, thank them kindly, and step away to do what you’ve planned. Nothing more and nothing different.

RSI of Volatility Indicator

It’s common knowledge by now that low volatility is conducive to bullish behavior and high volatility is conducive to bearish behavior. To create a trading system that would short bursts of high volatility and buy short periods of low volatility I took the 5-day RSI of the daily Close-Open Range.

Edit: Commenter Ramiro called to my attention that I do not actually take the RSI of the Close-Open range, just the Close-Open. I’m actually measuring the magnitude AND the direction, meaning that this is just simply another mean-reversion indicator, NOT a volatility indicator.

To turn my indicator into a trading system, I optimized buy and sell threshold (1-100) on SPY from 1/1/2000 – 12/29/2012. I optimized a long-only version of the system. Here is a picture of the 3D optimization with CAGR on the z-axis.

RSI 5-Day Extreme Close Range Optimization Buy Thresh 1-1-2000 - 12-29-2012

Buy Threshold

RSI 5-Day Extreme Close Range Optimization Sell Thresh 1-1-2000 - 12-29-2012

Sell Threshold

There is a small hilly region near the middle. I chose 40 as my buy threshold and 55 as my sell threshold since they are round numbers within the hilly region.

One thing peculiar that I noticed, but can’t seem to explain is that there are two of every set of system statistics, and the only difference is 1) the parameters of buy/sell threshold are switched and 2) the number of trades:

RSI 5-Day Extreme Close Range Optimization Peculiar 1-1-2000 - 12-29-2012

After some pondering I noticed that it might be because some of the buying is negligible. For example, if we have a 40/60 threshold then we will buy if the RSI is at 30, regardless if the 40 or the 60 is the buy threshold. However, the problem that I came across is that if the RSI is at 30 today, but is at 50 tomorrow, then we will buy & hold for a 40/60 threshold (buy when RSI < 40 and sell when RSI > 60), but we will buy & sell for a 60/40 threshold ( buy when RSI < 60 and sell when RSI > 40). I can’t seem to figure out why there each set of system statistics has a twin.

Next, I optimized the short and cover threshold (1-100) on the same data, using a short-only version of the system. Here is a picture of the 3D optimization with CAGR on the z-axis.

RSI 5-Day Extreme Close Range Optimization Short Thresh 1-1-2000 - 12-29-2012

Short Threshold

RSI 5-Day Extreme Close Range Optimization Cover Thresh 1-1-2000 - 12-29-2012

Cover Threshold

There is another small hilly region near the middle. I chose 55 as my short threshold and 40 as my cover threshold since they are round numbers within the hilly region.

The peculiarity of the long only side of the system does not seem to exist on the short side.

Here is the optimized equity curve with a system of the following rules:

  • Buy RSI < 40
  • Sell RSI > 55
  • Cover RSI < 40
  • Short RSI > 55

RSI 5-Day Extreme Close Range Optimization Equity Curve 1-1-2000 - 12-29-2012

The equity curve looks similar to that of many mean-reversion trading systems.

To check for robustness, I tested this system on multiple ETFs from 1/1/2000 – 12/29/2012.

RSI 5-Day Extreme Close Range ETF Scan 1-1-2000 - 12-29-2012

For further robustness, I tested this system using different lengths of RSI on SPY.

RSI 5-Day Extreme Close Range Length Optimization 1-1-2000 - 12-29-2012

One of my concerns is the success of the system since 2010, since many systems seemed to have performed differently or even completely stopped working from around that period. Here is the performance of the system on multiple markets from 1/1/2010 – 12/29/2012

RSI 5-Day Extreme Close Range ETF Scan 1-1-2010 - 12-29-2012