Tuesday, February 27, 2007
Platinum-gold spread revisited
Now that Chinese New Year is over, it is time to revisit the Platinum-Gold spread that I talked about last November. The theory is that with the demand for gold seasonally exhausted due to the end of Asian festivities, gold prices will decline relative to platinum. We now have the opportunity to test this theory again.
Saturday, February 24, 2007
Index arbitrage with XLE
In looking for pairs of financial instruments to pair trade, we do not have to limit ourselves to pairs that occur in "nature". We can often construct our own baskets of stocks to trade against an index (or an ETF representing this index). In fact, such pairs usually show better cointegration properties than any stock or ETF pairs. I have alluded to this index arbitrage idea in an earlier post, and the details of the methodology are explained in my articles for Subscribers. I tried this strategy on favorite sector ETF: the energy SPDR XLE.
XLE is composed of some 33 stocks (as of 2/16/2007). Our goal is to pick some smaller subset of these stocks to form a basket. We pick them based on how well they cointegrate with XLE. How big should this subset be? The higher the number, the better this basket cointegrates with XLE, but the smaller the profits. (If you include all stocks in XLE in this basket, then the basket cointegrates perfectly with XLE, but there will be no trading opportunities!) The lower the number, the higher the (specific) risk as well as return. So it is more of a personal risk-return preference than any scientific criterion which determines how many stocks to pick. I pick a basket with 10 stocks. I have found that this basket cointegrates with XLE with better than 99% probability since 2001/05/22. The half-life for mean-reversion is about 20 days, which means you have to hold a position for at most a quarter. (My own rule is to exit when the spread hasn't reverted in 3 times the half-life.) If you enter into a position when the z-score is about ±2, you can expect a profit of about $2,000 on an investment of about $58,000 on one side. This comes to a return per trade of about 3%. You can of course boost this return by using options to implement the XLE position instead.
As an aside, if you use Interactive Brokers, you can easily trade an entire basket of stocks using their Basket Trader.
I have created an online spreadsheet with (almost) real-time values of this spread in the subscription area. (The detailed composition of this basket of 10 stocks are also described there.) Note that in theory, every time the XLE changes composition, we will have to re-compute our basket composition as well. But fortunately XLE composition does not change very much or very often, so I will only update my basket at most once a month.
XLE is composed of some 33 stocks (as of 2/16/2007). Our goal is to pick some smaller subset of these stocks to form a basket. We pick them based on how well they cointegrate with XLE. How big should this subset be? The higher the number, the better this basket cointegrates with XLE, but the smaller the profits. (If you include all stocks in XLE in this basket, then the basket cointegrates perfectly with XLE, but there will be no trading opportunities!) The lower the number, the higher the (specific) risk as well as return. So it is more of a personal risk-return preference than any scientific criterion which determines how many stocks to pick. I pick a basket with 10 stocks. I have found that this basket cointegrates with XLE with better than 99% probability since 2001/05/22. The half-life for mean-reversion is about 20 days, which means you have to hold a position for at most a quarter. (My own rule is to exit when the spread hasn't reverted in 3 times the half-life.) If you enter into a position when the z-score is about ±2, you can expect a profit of about $2,000 on an investment of about $58,000 on one side. This comes to a return per trade of about 3%. You can of course boost this return by using options to implement the XLE position instead.
As an aside, if you use Interactive Brokers, you can easily trade an entire basket of stocks using their Basket Trader.
I have created an online spreadsheet with (almost) real-time values of this spread in the subscription area. (The detailed composition of this basket of 10 stocks are also described there.) Note that in theory, every time the XLE changes composition, we will have to re-compute our basket composition as well. But fortunately XLE composition does not change very much or very often, so I will only update my basket at most once a month.
Thursday, February 15, 2007
Do Gold and Oil Cointegrate?
I have written extensively here about cointegration between gold-miners and gold ETF's (GDX vs GLD), as well as between energy companies and oil ETF's (XLE vs USO). (See, for e.g., this article, or this article.) On another occasion, I also commented on an Economist magazine article about the possible cointegration between bond yield and oil prices. However, my fellow blogger Yaser recently pointed out an interesting link between gold and oil also. The reasons why gold and oil may be cointegrated are very similar to that of bond yield and oil: as oil price rise a) the oil revenue is invested heavily in gold, therefore pushing up gold price; b) there is an upward pressure on inflation, which increases the appeal of gold as an inflation hedge.
I did a cointegration analysis between gold and oil prices, and though their spread certainly looks somewhat mean-reverting since the 90's, it doesn't pass the cointegration test. The reason may simply be that this spread mean-reverts at a glacial pace: I estimate that the half-life (see my explanation of this term here) is over 14 months. Therefore, it may require historical data back to the 1970's to convince ourselves of their cointegration. (My own data on crude oil and gold prices only go as far back as the 1990's. If any reader knows of historical data source that goes back further, please let me know.) If, however, one is willing to take their cointegration by faith despite the inadequate data, then one may believe that gold is currently (as of Feb 12, 2007) just slightly undervalued relative to oil (the spread is about $8). I certainly don't recommend entering into a position on either side at this point!
I did a cointegration analysis between gold and oil prices, and though their spread certainly looks somewhat mean-reverting since the 90's, it doesn't pass the cointegration test. The reason may simply be that this spread mean-reverts at a glacial pace: I estimate that the half-life (see my explanation of this term here) is over 14 months. Therefore, it may require historical data back to the 1970's to convince ourselves of their cointegration. (My own data on crude oil and gold prices only go as far back as the 1990's. If any reader knows of historical data source that goes back further, please let me know.) If, however, one is willing to take their cointegration by faith despite the inadequate data, then one may believe that gold is currently (as of Feb 12, 2007) just slightly undervalued relative to oil (the spread is about $8). I certainly don't recommend entering into a position on either side at this point!
Wednesday, February 14, 2007
Another article on political futures markets
A NYTimes article yesterday talked about the political futures market intrade.com in the context of the November election, particularly the Virginia Senate race, which I blogged about before. I urged my readers to curb their enthusiasm for using such markets for prediction in my article, while the NYTimes article is certainly much more enamored of them. However, I think we can all agree that such markets are very efficient in synthesizing all existing information and opinion in making a prediction, but it cannot reveal information that nobody can possibly know at this point, such as who is going to win the 2008 general election.
Monday, February 12, 2007
Use the right discount rate to avoid jail time
Here is a fascinating story about the former treasurer of Essex County, New Jersey, who was sentenced to seven and a half years in prison because the prosecutor used the wrong discount rate to value certain tax-exempt bonds.
Saturday, February 10, 2007
In praise of day-trading
A recent article by Mark Hulbert in the NYTimes talked about the Value Line's rankings, and how this system is under-performing the market index in recent years. Mr. Hulbert asked Professor David Aronson of Baruch College whether this drop in performance means that the system has stopped working. Prof. Aronson says no: he believes that it takes 10 or more years [my emphasis] of under-performance of this strategy before one can say that it has stopped working! This statement, if taken out-of-context, is so manifestly untrue that it warrants some elaboration.
To evaluate whether a strategy has failed bears a lot of resemblance to evaluating whether a particular trade has failed. In my previous article on stop-loss, I outlined a method to determine how long it takes before we should exit a losing trade. This has to do with the historical average holding period of similar trades. This kind of thinking can also be applied to a strategy as a whole. If your strategy, like the Value Line system, holds a position for months or even years before replacing it with others, then yes, it may take many years to find out if the system has finally stopped working. On the other hand, if your system holds a position for just hours, or maybe just minutes, then no, it takes only a few months to find out! Why? Those who are well-versed in statistics know that the larger the sample size (in this case, the number of trades), the smaller the percent deviation from the mean return.
Which brings me to day-trading. In the popular press, day-trading has been given a bad-name. Everyone seems to think that those people who sit in sordid offices buying and selling stocks every minute and never holding over-night positions are no better than gamblers. And we all know how gamblers end up, right? Let me tell you a little secret: in my years working for hedge funds and prop-trading groups in investment banks, I have seen all kinds of trading strategies. In 100% of the cases, traders who have achieved spectacularly high Sharpe ratio (like 6 or higher), with minimal drawdown, are day-traders.
To evaluate whether a strategy has failed bears a lot of resemblance to evaluating whether a particular trade has failed. In my previous article on stop-loss, I outlined a method to determine how long it takes before we should exit a losing trade. This has to do with the historical average holding period of similar trades. This kind of thinking can also be applied to a strategy as a whole. If your strategy, like the Value Line system, holds a position for months or even years before replacing it with others, then yes, it may take many years to find out if the system has finally stopped working. On the other hand, if your system holds a position for just hours, or maybe just minutes, then no, it takes only a few months to find out! Why? Those who are well-versed in statistics know that the larger the sample size (in this case, the number of trades), the smaller the percent deviation from the mean return.
Which brings me to day-trading. In the popular press, day-trading has been given a bad-name. Everyone seems to think that those people who sit in sordid offices buying and selling stocks every minute and never holding over-night positions are no better than gamblers. And we all know how gamblers end up, right? Let me tell you a little secret: in my years working for hedge funds and prop-trading groups in investment banks, I have seen all kinds of trading strategies. In 100% of the cases, traders who have achieved spectacularly high Sharpe ratio (like 6 or higher), with minimal drawdown, are day-traders.
Monday, February 05, 2007
Index tracking, arbitrage, and cointegration
Mr. Lange, a reader of mine from Germany, alerted me to the following paper regarding a strategy related to index arbitrage that involves the EUROStoxx50 index. It is a nice illustration of a common application of cointegration techniques to statistical arbitrage trading. I have written an exposition of this paper, together with an additional index arbitrage strategy not discussed in the original paper, which I posted to my subscribers only area. (Mr. Lange has graciously allowed me to share this exposition with other readers of this blog.)
Sunday, February 04, 2007
Cointegration between oil and bond yield? Not!
An article in the Feb 1 issue of the Economist magazine suggested that there may be a link between crude oil price and long-dated US treasuries. Their reasoning is that if oil price is high, OPEC will need to re-invest the pile of cash that they generate, and eventually a lot of this ended up invested in US 10-year bond. Therefore, when crude prices go up, 10-year yield should go down. As I explained before, the fact that these 2 numbers are anti-correlated do not prevent them from being cointegrated. And in fact, the Economist article plotted the crude oil prices together with bond yield over the last year together, and they seem tantalizingly close to being cointegrated.
My curiosity piqued, I proceeded to get a longer history of these data to examine.
In the graph above, I plotted the (normalized) difference between the 10-year treasury yield and oil price. One can see that over the last year and a half, they are indeed cointegrated to a good degree. (To see that, notice the spread is range-bound, or mean-reverting, from mid-2005 to the present.) But this relationship breaks down completely over the longer history.
Though I think that the Economist magazine is doing a disservice to its readers for plotting this graph over just one year and making innuendos of linkage, it is a nice illustration of the danger of studying cointegration over a short window.
My curiosity piqued, I proceeded to get a longer history of these data to examine.
In the graph above, I plotted the (normalized) difference between the 10-year treasury yield and oil price. One can see that over the last year and a half, they are indeed cointegrated to a good degree. (To see that, notice the spread is range-bound, or mean-reverting, from mid-2005 to the present.) But this relationship breaks down completely over the longer history.
Though I think that the Economist magazine is doing a disservice to its readers for plotting this graph over just one year and making innuendos of linkage, it is a nice illustration of the danger of studying cointegration over a short window.
Subscribe to:
Posts (Atom)