Friday, June 17, 2011

When cointegration of a pair breaks down

I have written a lot in the past about the cointegration of ETF pairs, and how this condition can lead to profitable pairs trading. However, as every investment advisor could have told you, past cointegration is no guarantee of future cointegration. Often, cointegration for a pair breaks down for an extended period, maybe as long as a half a year or more. Naturally, trading this pair during this period is a losing proposition, but abandoning such a pair completely is also unsatisfactory, since cointegration often mysteriously returns after a while.

A case in point is the ETF pair GLD-GDX. When I first tested it in 2006, it was an excellent candidate for pair trading, and I not only traded it in my personal portfolio, but we traded it in our fund too. Unfortunately, it went haywire in 2008. We promptly abandoned it, only to see the strategy recovered sharply in 2007.

So the big question is: how do we know whether the loss of cointegration is temporary, and how do we know when to resume trading a pair?

To answer the first question, it is often necessary to go beyond the technicals, and delve into the fundamentals of pair. Take GLD-GDX as the example. When I taught my pairs trading workshop in South Africa, several  portfolio managers in attendance told me that there are 2 reasons why gold spot price diverged from gold miners' stock prices. Firstly, due to the sharp increase in oil prices during the first half of 2008, it costs the gold miners a lot more in energy to extract the gold from the ground, hence the gold miners' income lags behind the rise in gold prices. Secondly, many gold miners hedge their exposure to fluctuating gold prices with derivatives. Hence when gold price rise beyond a certain limit, the gold miners cease to benefit from this rise. Recently, the Economist magazine published an article that essentially confirms this view. But further confirmation can be gained by introducing oil (future) price into the cointegration equation. If you do that, and if you trade this triplet of GLD-GDX-USO, you will find that it is profitable throughout the entire period from 2006-2010. If you find trading a triplet too complicated, you can at least backtest a trading filter such that you will cease to trade GLD-GDX whenever USO goes beyond (above, and maybe below too) a certain band. If you have done all these backtests, you will have a plan in place to tell you when to resume trading this pair. But even if you haven't done this backtest, and you find that you need to stop trading a pair because of cumulating losses, you should at least continue paper trading it to see when it is turning around!

(By the way, if you think trading ETF pairs offers too low returns due to the low leverage allowed, consider the single stock futures on ETF's trading on the OneChicago exchange. Certainly the future on GDX is available there, while you might just trade the futures GC and CL directly on CME. There is, of course, the usual caveat that applies to futures pairs trading: the switch from contango to backwardation and vice versa can ruin many a pairs-trading strategy, even if the spot prices remain cointegrating. But that's a story for another time.)

Thursday, June 02, 2011

Even more on news driven trading

News driven trading is even more in vogue today than when I last mentioned it, judging from the increasing number of vendors (e.g. Ravenpack, Sensobeat, Recorded Future, etc.) and researchers pitching their wares. Not only are traditional financial and economic news deemed important, but researchers have found even blog posts (at least those on Seeking Alpha) and Twitter (Hat tip: Satya and William) to be predictive of stock prices.

One key ingredient to success in this type of trading is of course the ability to gain access to breaking news ahead of other traders. On the macroeconomic news front, the MIT Billion Prices project has spun off a company called PriceStats to deliver daily consumer product price index to subscribers. PriceStats compiles this index by continuously scanning online retailers' websites, and hopefully provides a preview of the official CPI numbers. Whether this is useful for futures and currencies traders is of course subject to their rigorous backtests, though the chart displayed on their website does suggest that the daily price index is a leading indicator of the CPI.

There is an important caveat to using news trading: not all news are equal. So another key ingredient to success is to carefully differentiate between the different types of news and backtest their predictive abilities separately. For example, I recall some research has indicated that an analyst downgrade of a stock from a "hold" to a "sell" rating has more impact than from "buy" to "hold" rating.

My own experience with news driven trading is that for all this trouble, the trading opportunities are relatively few compared to pure price driven trading, the consistency of success is low, and finally the profitability lifespan is short. If you have better experience, do share it with us.