Wednesday, November 29, 2006
One may note that IGE also cointegrates with the Emerging Markets index fund EEM. (The chart below is the spread between 100 shares of IGE and 100 shares of EEM.)
This is not surprising. But does this imply the unsettling conclusion that the Canadian economy cointegrates with the emerging markets? No. I will not bore you with yet another chart: just be assured that cointegration is not a transitive relation.
Friday, November 24, 2006
The strategy is extremely simple: buy 2 July contracts of PL and short 1 June contract of GC around the end of February, and exit the positions around mid-April. (The gold futures contract specifies 100 ounces, while platinum is only 50, therefore we need to buy 2 contracts of PL vs. 1 contract of GC.) I first read about this strategy in an article by Jerry Toepke in the SFO Magazine in the beginning of 2006 and I decided not only to backtest it, but also paper trade this strategy in 2006 to see if it works its magic again. Both the backtest and the paper trade worked as advertised, despite being widely publicized by the magazine. I plot the P/L in this chart:
This spread earned an average of $6,600 every year since 1995. We earned $15,400 in the best year, while in the worst year we lose only $3,810. With a margin requirement of only $743 for trading this spread at NYMEX, the return per trade is not bad!
What is the fundamental reason this seasonal spread works? Amusingly, it has to do with the end of the Chinese New Year. According to Mr. Toepke, the demand for gold is driven by demand for jewelry. Asian countries such as India and China are the largest consumers of gold. A series of festivals and celebrations in these countries around year-end lasted till the end of the Chinese New Year in February, after which demand for delivery of gold is seasonally exhausted. Platinum, on the other hand, is primarily used in catalytic converters for automobiles, and the seasonality is much weaker. It is therefore handy as a hedge for gold prices.
Further reading: Jerry Toepke, “Give Seasonal Spreads Some Respect”, Stocks, Futures and Options Magazine, January 2006 issue.
Tuesday, November 21, 2006
Monday, November 20, 2006
An interesting feature emerged from this extended analysis. CL and XLE are still found to be cointegrated over this long period, albeit with a slightly lower probability (90%). However, we can see something of a regime shift around mid-2002, when CL went from generally under-valued to over-valued relative to XLE. (Even after including this regime with lower relative crude oil prices in my calculations, I still find the current spread to be undervalued by about $10,521 as of the close of Nov 17, which is near its 6-year low.)
What was the reason for this apparent shift in mid-2002? And are we in the middle of a similar regime shift in the opposite direction? Maybe our readers who have a better grasp of the economic fundamentals of the energy markets can shed light on this.
Sunday, November 19, 2006
Saturday, November 18, 2006
Friday, November 17, 2006
This certainly looks like a fairly safe strategy. Of course, if one desires more frequent signals, one can always enter into smaller positions at smaller spread values.
By the way, just when we were celebrating the reversion of the GLD - GDX spread this morning, the QM - XLE spread plunged to another multi-year low. With crude oil prices down about 30% from its all-time-high, XLE, the energy stocks ETF, is still within 5% of its all-time high. Does this make any sense? We shall see after this quarter's earnings from the oil companies are announced ...
Sunday, November 12, 2006
The mean-reversion of this spread is even more obvious than my plot in the earlier article. Also, with the longer history, we get a much better feel for the range of fluctuations. While the value of the spread is about -$213 as of the close of Nov 9, it can certainly go much lower before reverting, based on the highs and lows of the last 3 years.
A reader of my earlier article made an interesting comment about shorting ETF’s such as GDX and GLD. He argued that since ETF shares can be constantly created, it should not require existing shares to be borrowed for shorting. I asked Mr. Phillips of Van Eck Global about this, and he confirmed to me that a newer ETF like GDX can in fact be hard to borrow. He went on to say that the borrowing of ETF’s has nothing to do with the issuer. The issuer can indeed create an unlimited supply of the shares, but the trader still need to borrow them from his or her broker for shorting. He also told me he is currently working hard to eliminate any borrowing problems in GDX that may have existed.
Friday, November 10, 2006
John Netto, a principal in a commodities fund that focuses heavily on gold, wrote me the following concerning my article on arbitrage between gold and gold-miners: "... there is a paradox that exists in many instances with gold companies and the underlying metal, which could potentially unwind most pairs traders. This is the dynamic of non-recourse loans that companies take on when doing a project. This would never show up in a quantitative model but can put companies in a position that when gold rises, they can get hurt to some degree. Banks that do non-recourse loans require the companies to sell futures to guarantee payment for the project in case the price of gold falls. This way, they will not lose if the project no longer becomes a viable business endeavour. If gold rises, these companies must show massive mark-to-market losses on their books based on new accounting rules. So the theory that gold companies can trade correlated to the price of the underlying is correct, however a dynamic exists that has the potential on a per company basis to materially affect that."
I find Mr. Netto's comments very insightful. I would make one further point: if the mark-to-market accounting losses are temporary and will recover next quarter, we can expect their stock prices to revert. This is exactly the cointegration scenario that I talked about -- a price reversion after some period of time, but not a day-to-day or week-to-week correlation.
Wednesday, November 08, 2006
As an example, I watched with amusement the tradesports.com futures market prediction of the Virginia Senate race between Democrat Jim Webb and Republican George Allen. This is one of the two close races that will determine the control of the Senate. For months, the market predicts that the Democrat will lose (the probability of winning, which is the same as the price divided by 100, is always below 50% until the beginning of November). Then in November, the market began to see the light, and started to predict a Democratic win. See the chart below.
But look what happened on the night of the election:
As the vote counts started to be released, the market first thought the Republican was going to win, driving the prices down to the teens. That was due to the votes from the conservative southern Virginia, which were the first to come in. Then, as the vote counts from the more liberal northern Virginia were published at around 11:30 pm, the prices shot up to above $60, and continued on to over $80. Clearly, the market does not know more about the future than your average news anchor.
As someone interested in the predictability of election outcomes based on futures markets, this raises a serious question. What is the proper time to take a snapshot of the market? Should it be 1 month before the election (in which case this market prediction failed, presuming a Democratic win after the recount)? Or should it be 1 week before the election, in which case this market prediction succeeded? And without an answer to this question, how can one claim whether the prediction is accurate or inaccurate?
Monday, November 06, 2006
A reader asked me recently why I believe that energy stock prices (e.g. XLE) are correlated with crude oil futures front-month contract (QM). Actually I don’t believe they are necessarily correlated – I only think they are “cointegrated”.
What is the difference between correlation and cointegration? If XLE and QM were really correlated, when XLE goes up one day, QM would likely go up also on the same day, and vice versa. Their daily (or weekly, or monthly) returns would have risen or fallen in synchrony. But that’s not what my analysis was about. I claim that XLE and QM are cointegrated, meaning that the two price series cannot wander off in opposite directions for very long without coming back to a mean distance eventually. But it doesn’t mean that on a daily basis the two prices have to move in synchrony at all.
Two hypothetical graphs illustrate the differences. In the first graph, stock A and stock B are correlated. You can see that their prices move in the same direction almost everyday.
Stock C clearly doesn’t move in any correlated fashion with stock A: some days they move in same direction, other days opposite. Most days stock C doesn’t move at all! But notice that the spread in stock prices between C and A always return to about $1 after a while. This is a manifestation of cointegration between A and C. In this instance, a profitable trade would be to buy A and short C at around day 10, then exit both positions at around day 19. Another profitable trade would be to buy C and short A at around day 31, then closing out the positions around day 40.
Cointegration is the foundation upon which pair trading (“statistical arbitrage”) is built. If two stocks simply move in a correlated manner, there may never be any widening of the spread. Without a temporary widening of the spread in either direction, there is no opportunity to short (or buy) the spread, and no reason to expect the spread to revert to the mean either.
For further reading:
Alexander, Carol (2001). Market Models: A Guide to Financial Data Analysis. John Wiley & Sons.
Thursday, November 02, 2006
I talked about before why I believe energy futures and energy companies ETF are “cointegrated”, i.e. when their spread wanders far from a mean value, there is a high probability that they will revert to the mean. The same analysis can be made about other pairs of commodity futures and ETF’s. Therefore I apply this to gold.
Looking around for ETF’s that hold gold miners, I found GDX. It started trading on May 23, 2006 and therefore has a relatively short history for us to analyze. We could have paired it against the front-month gold futures contract GC, but this may be inconvenient because one has to rollover the contracts monthly. So instead, we pair it against an ETF that holds gold as a commodity. GLD is one such example. (So is IAU, but GLD is far more liquid.) Using the same Matlab cointegration package that I mentioned in the previous article, I determine that even with the short history, GLD cointegrates with GDX with a 90% probability. Also, the package tells us the proper combination is 60 shares of GLD vs. 100 shares of GDX. So if we form a pair by buying 60 shares of GLD and shorting 100 shares of GDX, we can plot the value over time here:
There are some caveats with trading this spread. First, it is not always easy to borrow GDX or GLD to short. It depends on if your broker has a good securities lending desk. Secondly, the history of GDX is short. So any analysis must be taken with a grain of salt. To overcome this short history, I could have constructed my own basket of gold mining stocks and plot the price of this basket against the gold futures GC. If you intend to invest heavily into this spread, I would definitely recommend doing this piece of hard work.
Wednesday, November 01, 2006
We are now faced with the usual arbitrage trader's quandary. Is this an unprecendented profit opportunity to double up on this trade, or was this a colossal blunder on my part? I came across this New York Times article about the earnings reports from Exxon and Shell that gave me some comfort. While both energy companies posted huge profits, the article quoted Fadel Gheit, a senior energy analyst at Oppenheimer & Company, that for the fourth quarter, "“the question is not if earnings will decline, the question is by how much.” According to the article, analysts say that for every dollar the price of a barrel of crude oil drops, Exxon forgoes $500 million in profit.
So yes, with my fingers crossed, I am still waiting for the day when this spread closes up.