In the last post, we had reviewed some theory related to pairs trade. In this post, we will go through a textbook case of arbitrage to show how various test-statistics should look like. We also introduce the half-life of mean-reversion and the Hurst Exponent as performance indicators. We then look into a possible implementation for mean-reversion strategy before discussing the real-world issue in pairs trade.

### Almost-ideal example

The example is between the price and underlying value of iShare US High Yield Bond ETF (HYG).

Sometimes the ETF is trading in premium (defined as price – underlying value> 0) and sometimes in discount. When ETF is trading in premium, an arbitrager can buy a portfolio of underlying bonds, deliver the bonds to create new ETF units, sell those new units and lock in the arbitrage profit. When ETF is trading in discount, the arbitrage can be done in reverse. While the operation involves much logistics, requires high capital and incurs transaction cost when trading the cash bonds, the profit is highly certain. Thus arbitragers tend to rush in when the ETF premium or discount is significant and above the cost of the respective arbitragers. This explains the highly mean-reverting behaviour of the ETF premium time series.

Here shows the co-integration test of ln(HYG Price) (variable x) vs ln(HY underlying value) (variable y). I use Real Statistics Excel Add-In for the co-integration related calculations. As expected, both x and y are I(1) and their first difference series (return time series) is I(O). The hedge ratio between x and y is closed to 0.998 (y=βx+ε). A p-value of less than 0.01 suggests that the two variables are highly likely to be cointegrated.

The residual ε can be evaluated to indicate how well this pair may perform as a mean-reversion strategy. We examine the half-life for mean-reversion and Hurst exponent. If we model pairs trading as an Ornstein-Uhlenbeck process, dε =η (μ – ε) dt + σ dz. If we assume σdz is a white noise term, η can be found as the regression coefficient when running OLS between –ε vs first difference in ε. Half-life = ln(2)/ η. All else being equal, a short half-life is good. Not only the opportunity can potentially be explored for more times, but also be known quicker in case of failure.

Hurst exponent is a measure between 0-1 with 0.5 being an uncorrelated random noise. Hurst exponent of 0-0.5 indicates higher values are more likely to be followed by lower values than pure uncorrelated noise (ie more desirable as a mean-reversion strategy) and vice versa in the case of 0.5-1.0. Hurst exponent is an interesting topic that I will elaborate more in another article.

For the HYG, the half-life of mean-reversion = 4.3 days and Hurst exponent = 0.31. Both seem pretty good.

### A Possible Implementation

So far, the analysis is theoretical and we have not discussed when to entry or exit a trade. [Chen2013, p71-72] suggest the use of Bollinger band as the trading system. A Bollinger band is formed with three lines. The middle line is a moving average of a time series, which would be replaced with the price spread obtained by subtracting price of y with price of x times hedge ratio of the cointegration pair. The lookback period of the moving average should be in the same scale as the half-life we calculated earlier. The top and bottom lines represent the trading range of certain standard deviation above and below the middle line. A trade is entered when price spread hits either the top or bottom Bollinger range and exited when cutting cross the middle of the range.

### Not-so-ideal real-world

The idea of pairs trade is in the wild since the 1990s. As money piles in any good idea, profit will soon disappear with the signal being replaced by noise. For other trading pairs, the underlying economic relationship may not be stationary to start with. The HYG price vs underlying example above should be considered as an exception rather than the norm.

Many closely related stock or ETF pairs (e.g. gold ETF vs gold miner etc, gold miner ETF vs silver miner ETF, many companies vs peers in the same sector) do not pass the cointegration test and with very long half-life of mean-reversion even if they show some resemblance of mean-reverting when looking into the residual plot.