Author: shyam

Direction vs. Magnitude

Sometimes, it is useful to remove information from the data that you have.

Lets say, you have a time-series of returns: +0.001, +0.001, +0.001, +0.1, -0.01, -0.01. What if, you removed magnitude information and kept only the direction? You end up with: UP, UP, UP, UP, DN, DN. Now, you can analyze this transformed dataset using a whole bunch of algorithms designed to work on binary sequences.

Run Length Encoding (rle) is one such algo. We used it while looking for streaks (Part I, Part II.) We dismissed the backtest as a datamining artefact. Which it might very well be. However, if you believe that a timeseries can exhibit both trend and mean-reversion, then looking at it through this lens can be useful.

Knowing the “average” length of streaks can also help in position sizing in a trend-following system and regime classification.

Stay tuned.

SPDR Sector ETF Average-Momentum Rotation

We’ve been having a bit of fun with the S&P Sector “Spider” ETFs: Intro, Momentum, Anti-Momentum. We saw how strategies that backtested well with pre-2011 data failed later. In this post, we see if buying all ETFs with a positive return over n-months help us beat the S&P 500 index.

Rules of Rotation

For ETFs: XLY, XLP, XLE, XLF, XLV, XLI, XLB, XLK, XLU

  1. Calculate rolling returns over n months. Where n = 1, 3, 6, 12.
  2. For the n+1th month, go long the ETFs that had positive returns in Step 1.

Like before, we split the dataset into Before 2010 and After 2011.

Pick your Fighter

The Before 2010 dataset shows rotation by 6- and 12-month look-back periods to be better than buying-and-holding the S&P 500.

The SPY Rope-a-Dope

MOM6 and MOM12 were too close to call in the training set. If you had “course-corrected” after the first couple of years of under-performance of MOM12 and switched to MOM6, you would’ve out-performed. On the other hand, staying the course would’ve meant losing out to the mighty S&P 500.

Once again, by simply holding onto the ropes, a passive buy-and-hold S&P 500 investor would’ve come out miles ahead of someone who tried to time sectors systematically.

What did we learn?

We tested a few basic allocation strategies that investors typically use to approach the “rotation” problem. Some of them worked well in the training set but their performance failed to carry over. Besides, if you add transaction costs and taxes, we are not sure if it was worth the effort given the post-2011 market regime.

Maybe there are more sophisticated qualitative/fundamental ways to approach this problem that work. However, most media articles about “sector rotation” are written with perfect hindsight and it is near impossible to do it with simple strategies that are accessible to the average investor.

Book Review: The Laws of Trading

The Laws of Trading: A Trader’s Guide to Better Decision-Making for Everyone (Amazon,) Agustin Lebron is a must read for anyone remotely interested in trading and trading-linked philosophy.

What it is not: a book that promises to teach you a trading strategy.

What it is: a sort of memoir where the author weaves together his experiences while trading different markets, anecdotes and financial history.

If you think your costs are negligible relative to your edge, you’re wrong about at least one of them. This rule is saying that magical super-profitable trades don’t really exist in the real world. If a trade appears to have far more edge than other available trades, then that appearance is illusory.

I personally found the the author’s attempt to apply trading analogies to real life a bit tedious. But, @naval has 1.4 million followers, so maybe that works.

Recommendation: Must Read.

SPDR Sector ETF Anti-Momentum Rotation

Previously, we saw how buying the best performing sector and holding it for a month didn’t quite pan out. What if, we bought the worst performing sector instead? The “Dogs of Sector Spiders,” if you will.

Rules of Rotation

For ETFs: XLY, XLP, XLE, XLF, XLV, XLI, XLB, XLK, XLU

  1. Calculate rolling returns over n months. Where n = 1, 3, 6, 12.
  2. For the n+1th month, go long the ETF that had the lowest return in Step 1.

Like before, we split the dataset into Before 2010 and After 2011.

Pick your Fighter

The Before 2010 dataset shows rotation by 3- and 6-month look-back periods to be better than buying-and-holding the S&P 500.

The 6-month look-back rotation strategy – MOM6 – would’ve been the strategy to bet on.

The SPY Rope-a-Dope

“Sure-things” don’t exist in finance.

MOM6 spent the last decade getting absolutely decimated by the S&P 500.

Once again, by simply holding onto the ropes, a passive buy-and-hold S&P 500 investor would’ve come out miles ahead of someone who employed this rotation strategy.

SPDR Sector ETF Momentum Rotation

While introducing S&P 500 sector ETFs, we showed how the cross-correlations between them were unstable. This makes developing simple strategies challenging. One common momentum strategy is to simply go long whatever worked best in the previous period.

Rules of Rotation

For ETFs: XLY, XLP, XLE, XLF, XLV, XLI, XLB, XLK, XLU, and SPY

  1. Calculate rolling returns over n months. Where n = 1, 3, 6, 12.
  2. For the n+1th month, go long the ETF that had the highest return in Step 1.
  3. In Step 2, if the selected ETF has -ve returns, stay in cash and earn zero.

We split the dataset into Before 2010 and After 2011.

Pick your Fighter

The Before 2010 dataset shows rotation by all look-back periods to be better than buying-and-holding the S&P 500.

Probably because of the prolonged dislocation caused by the GFC in 2008 and 2009, all rotation strategies based on the rules above exhibited great stats.

The 6-month look-back rotation strategy – MOM6 – gave an annualized return of 13.04% vs. S&P 500’s 1.19%. Coming out of the crisis, this would have been the fighter to bet on.

The SPY Rope-a-Dope

In boxing parlance, a “Rope-a-Dope” is

When you maintain a defensive posture on the ropes in an attempt to outlast or tire your opponent. It is most recognized and was actually given that name by Muhammad Ali when he employed the technique to defeat George Foreman.

titleboxing.com

The After 2011 dataset is a prime exhibit of why “sure-things” don’t exist in finance.

The S&P 500 spent the next decade demolishing everything.

MOM6, the winner from our first round, went on to underperform the S&P 500 for the next 10 years by ~4%

By simply holding onto the ropes, a passive buy-and-hold S&P 500 investor would’ve come out miles ahead of someone who employed this rotation strategy.