Monday, May 2, 2011

Commodities vs. commodity stocks


Just got back from a couple of months vacation in NZ so brief posting this month.

Another common field of mean reversion analysis relates to commodities and commodity related stocks.  In this analysis, I compare the prompt month crude oil price, CL1 to the price of XOP, an ETF that invests in oil & gas exploration & production companies.

As expected, these two prices track each other fairly closely over time:
 A similar analysis as before, performing an ADF test suggests that over its history the ratio of price series has exhibited mean reversion characteristics with a half life of 37 trading days or approximately two months.  This isn’t ideal for trading; it would be preferable if the relationship exerted itself more strongly.  Nevertheless with an ADF test statistic of 4% the evidence seems strong.
This relationship can be generalized to other commodities and commodity equity groupings, providing a guide to over/under valuation of commodity equities in relationship to their corresponding commodity prices.



Tuesday, January 11, 2011

Platinum - Palladium relationship


Ok, so they start with the same letter and are part of the same group of elements, but why are they so often proposed as pairs in trading strategies?  As a spread strategy they look especially tempting right now:
Palladium outshone Platinum for most of 2010.  Is the run over?  Or will it go further?

Cointegration testing
Before attempting to answer this question, perhaps an analysis of the relationship is warranted.  Do PL and PA exhibit co-movement over time?  A chart of the historical prices of both (back-adjusted for contract roll) is as follows:
Cointegration testing in different years leads to the following results:

Year
ADF P value
Hedge ratio
Cointegration half life
2004
0.60
0.30
18
2005
0.94
0.25
33
2006
0.57
0.30
21
2007
0.35
0.27
66
2008
0.29
0.22
18
2009
0.46
0.22
27
2010
0.96
0.33
39

In other words, the ADF test [http://en.wikipedia.org/wiki/Augmented_Dickey%E2%80%93Fuller_test] for cointegration has no significant results in any of the past 7 years.
In a statistical sense there is no reason to assume that PL & PA have any sort of relationship whereby they could be part of a pairs trading strategy.

Looking at the 2010 chart one wonders how many traders have been drawn into this spread strategy waiting for the reversion to arrive…

Wednesday, December 22, 2010

Oil - Natural Gas Cointegration - turning point?


Much has been written and said about the NG / CL relationship.  For most of 2009 pundits touted NG as historically underpriced relative to CL.  As always the reality is more complex.  Comparing a largely domestic USD commodity with an internationally traded commodity increasingly consumed by emerging markets has inherent risks.

More subtly, most commentators ignore the roll issues in both markets in making comparisons of relative value.  For a long / short convergence trade to make sense over any time frame of more than one month, the reality of dealing with a periodically expiring contract has to be addressed.

Recently I was experimenting with applying cointegration metrics to the NG & CL markets.  More can be found about cointegration elsewhere [http://en.wikipedia.org/wiki/Cointegration] but in a sentence cointegration measures the likelihood of convergence as opposed to correlation which measures the likelihood of comovement.  Convergence provides a more useful measure of potential profitability of a long/short trade.  In theory cointegration provides a useful filter against spurious correlations.
[Also for both a great exposition and elegant implementation in R, see: Pfaff, “Analysis of Integrated and Cointegrated Time Series in R”.]

So in order to test for cointegration you need a time series of the investable asset on both sides.  In the case of CL & NG, with monthly expirations, you need to create the time series of what a long or short futures contract return would look like including the monthly roll.

For simplicity I assumed roll on the penultimate date at the closing price.  This is easily achieved via the extremely liquid TAS market which is usually clears within a single tick of the closing price.

What is interesting is that over a reasonably long time frame, the two price series fail the test of cointegration.  A plot of the spread relationship can be seen here:
The huge run up and subsequent collapse in CL is even more apparent when compared with NG on a roll adjusted basis.

Even on a shorter YTD time frame the results are still not passing the ADF test for cointegration:
Why does the test fail so conclusively?  A closer examination of the return and price data yields the following interesting result.  Starting with yesterday’s closing price if we back-cast prices based on returns, including the roll yield we get the following chart:
What this shows is that to end up at yesterday’s gas price if $4.059 for example, gas would have been over $30 in mid 2008 once the roll return is incorporated.  Oil is a similar picture, to end up at yesterday’s settle of $89.92, oil would have to have been over $230 once the roll is accounted for.  [Investors in oil and gas ETFs like USO & UNG will be familiar with this picture.]

From a cointegration standpoint what is apparent is that once the roll yield is incorporated the two time series have continued to diverge on a roll adjusted basis.  This explains why no oil vs. gas long / short strategy has worked for some time.

This month looks like the first time that the winter prompt contract roll on NG is going to settle at less than a 10c discount… maybe this is the turning point for NG on a roll adjusted basis.

Good luck for 2011.