Studies - Posted on Monday, August 16, 2010, 4:32 PM GMT +1

10 Comments


Aug Monday 16

Pairs Trading Part II – SPY vs. RTH

One of the most interesting findings dealt with in a previous posting (Pairs Trading (ETFs) was the RTHs (Retail HOLDR.) salient feature of being a favorable candidate for a potential mean-reversion strategy in conjunction with a major market or sector ETF. With respect to the primarily method used for cointegration (the augmented Dickey-Fuller test), the RTH showed a probability better than 90% of being cointegrated with the IWM (Russel 2000) and the SMH (Semiconductor HOLDR.), and missed being cointegrated with SPY and QQQQ by a hairbreadth only (two price series are called cointegrated if the pair has a consistent mean and standard deviation, both prices series never indefinitely wandering off in opposite directions and never drifting farther and farther away from its mean without eventually returning to the initial ratio or mean).

But the RTH doesn’t seem to be a favorable candidate for a longer-term (the half-life – the expected time to revert half of its deviation from the mean – is regualary measured in weeks or month) pairs trading strategy only, but may provide favorable short-term mean-reversion opportunities as well (market timing).

Table I below shows the performance metrics (since 06/01/2001 due to the RTH‘s inception in May 2001) for different pairs in conjunction with the RTH and – for demonstration puposes – different pairs of major market ETFs (SPY, QQQQ and IWM) and sector ETFs (XLY – Consumer Discretionary – and XLP – Consumer Staples -) based on an exemplary mean-reversion strategy, assumed one would’ve bought the pair (is equivalent to buying the first and selling short the second ETF in equal money amounts (number of shares in each ETF = 100% net asset value / share price)) on close of a session when the 4-day EMA (Exponential Moving Average) of the pair (the ratio of the closing prices) is less than the 4-day EMA of the ratio of closing prices for yesterday, and vice versa (selling short the first and buying the second ETF in equal money amounts in the event of a rising 4-day EMA of the ratio of closing prices).

Here is the link to the stats in a more ‘readable’, original size: Statistics 1

While – with respect to the specific setup defined – the SPY vs. QQQQ, the SPY vs. IWM, the XLY vs. XLP and the SPY itself (buy and hold) as a benchmark virtually went nowhere (or even closed in the red) over the course of the last 9 years – especially after accounting for fees and transaction costs -, the RTH as a pairs trading component in conjunction with the SPY, the QQQQ, the  IWM and the SMH not only easily out-performed a (S&P 500) buy-and-hold approach by a wide margin (and almost year by year as well, see ‘Periodic Returns‘ in the stats above), but comes up with a smoother equity curve as well, meaning there are much less dramatic departures from a gradually/geometrically increasing trendline (R-squared, maximum drawdown, maximum sessions in drawdown) in comparison to a SPY‘s buy and hold approach.

Interestingly the SPY vs. RTH and SMH vs. RTH pairs trading strategies and a S&P 500 buy-and-hold approach do NOT differ with respect to the probability of a winning trade (the probability is almost always slightly above 50% only). The reason for the deviation in total returns is the fact that – in contrast to the SPY‘s buy and hold approach – the median winning trade (+0.51%) now equals or slightly exceeds the median losing trade (-0.50% ), significantly improving the respective expectancy (probability of winning * average gain – probability of losing * average loss).

But a SPY vs. RTH‘s pairs trading strategy has another advantage as well: Chosing a slightly different setup in order to especially exploit those reversal opportunities where the pair is (from a historical and statistical perspective) exceptionally stretched to one or the other side would be sufficient to not only surpass previous compounded returns, but to cut in half the time in market and the maximium drawdown as well. Table II below shows the performance metrics (since 06/01/2001 due to the RTH‘s inception in May 2001) for the same pairs, assumed one would’ve bought the pair (buying the first and selling short the second ETF in equal money amounts) on close of a session when the pair (the ratio of the closing prices) closed at least -0.50% below its 4-day EMA, and vice versa (selling short the first and buying the second ETF in equal money amounts in the event of a close at least +0.50% above the 4-day EMA of the ratio of closing prices).

Here is the link to the stats in a more ‘readable’, original size: Statistics 2

With respect to SPY vs. RTH (Strat. #1), time in market and maximum drawdown have been exactly cut in half (giving you the chance to earn an additional return on cash) while the geometric growth rate per trade doubled. Although the probability of a winning trade (again) only slightly improved (from 54.63% to 57.44%), it is (again) the effectiviness (doing things right instead of doing the right thing only, meaning increasing your gains when you’re right and cutting your losses when you’re wrong) of the strategy which makes for the improvement in key performance metrics.

But what about the robustness of a SPY vs. RTH pairs trading strategy ? It it works with a -0.50%/+0.50% level below/above a 4-day EMA, it should work with a -/+0.30% up to a -/+0.70% level and a 3-day and 5-day EMA as well showing some gradual – no radical –  changes with respect to the key performance metrics only.

Table III below shows the performance metrics for the SPY vs. RTH pairs trading strategy, assumed one would’ve bought the pair (buying the first and selling short the second ETF in equal money amounts) on close of a session when the pair (the ratio of the closing prices) closed at least

  • Strat. #1: -0.30% below (long) and +0.30% above (short) its 4-day EMA,
  • Strat. #2:-0.40% below (long) and +0.40% above (short) its 4-day EMA,
  • Strat. #3:-0.50% below (long) and +0.50% above (short) its 4-day EMA,
  • Strat. #4:-0.60% below (long) and +0.60% above (short) its 4-day EMA,
  • Strat. #5:-0.70% below (long) and +0.70% above (short) its 4-day EMA.

SPY vs. RTH (Strat. #6) represents a buy-and-hold approach (assumed one would always be long the SPY and short the RTH).

Here is the link to the stats in a more ‘readable’, original size: Statistics 3

And last but not least, table IV below shows the performance metrics for the SPY vs. RTH pairs trading strategy, assumed one would’ve bought the pair (buying the first and selling short the second ETF in equal money amounts) on close of a session when the pair (the ratio of the closing prices) closed at least

  • Strat. #1:-0.50% below (long) and +0.50% above (short) its 3-day EMA,
  • Strat. #2:-0.50% below (long) and +0.50% above (short) its 4-day EMA,
  • Strat. #3:-0.50% below (long) and +0.50% above (short) its 5-day EMA.

SPY vs. RTH (Strat. #4) represents a buy-and-hold approach (assumed one would always be long the SPY and short the RTH).

Neither a slight variation in the percentage level below/above the 4-day EMA nor a variation in the duration of the EMA itself affects any of the strategy’s key performance indicators in a significant way, except – but expectedly – the so called opportunity factor (total number of sessions and time in market).

Summary: A SPY vs. RTH‘s pairs trading strategy, assumed one would’ve bought the pair (buying the SPY and selling short the RTH in equal money amounts) on close of a session when the pair (the ratio of the closing prices) closed at least -0.50% below its 4-day EMA, and vice versa (selling short the SPY and buying the RTH in equal money amounts in the event of a close at least +0.50% above the 4-day EMA of the ratio of closing prices), historically provided a (consistently) profitable market timing strategy (a median annual return of +15.65%), (consistently, in 8 out of the last 9 years) out-performing a S&P 500 buy-and-hold approach, with a smooth equity curve (R-squared, maximum drawdowns on a week/month/year end basis, maximum time in a drawdown), meeting at least basic requirements for robustness and reliability. Unfortunately a shortcoming is the deviation in yearly returns (one standard deviation = 32.72%).

A favorable basis for some further investigations and refinements (accounting for return on cash, position sizing, and making the strategy adaptiv to changing market conditions – if necessary).

to be continued …

Successful trading,
Frank

Remarks: Due to their conceptual scope – and if not explicitely stated otherwise , all models/setups/strategies do not account for slippage, fees and transaction costs, do not account for return on cash, do not use position sizing (e.g. Kelly, optimal f) – they’re always ‘all in, do not use leverage (e.g. leveraged ETFs) but a marginable account is mandatory , do not utilize any kind of abnormal market filter (e.g. during market phases with extremely elevated volatility) , do not use intraday buy/sell stops (end-of-day prices only), and models/setups/strategies are not ‘adaptive‘ (do not adjust to the ongoing changes in market conditions like bull and bear markets).

________________________________

If you might want to be instantly notified about what’s happening in the markets and at TRADING THE ODDS, I encourage you to subscribe to my RSS Feed or Email Feed, and (or) follow me on Twitter.

xx

Disclaimer: Long SMH and short XRT at time of writing.

The information on this site is provided for statistical and informational purposes only. Nothing herein should be interpreted or regarded as personalized investment advice or to state or imply that past results are an indication of future performance. The author of this website is not a licensed financial advisor and will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on the content of this website(s). Under no circumstances does this information represent an advice or recommendation to buy, sell or hold any security.

Add to Technorati Favorites


Comments (10)

 

  1. evo34 says:

    Nice job. I would like to see the profit over certain time periods, such as the last 12 months. I have found that many pair strategies that show nice results over a long history have not done well over the past year or so.

  2. […] This post was mentioned on Twitter by tapesense, NewsLine. NewsLine said: Pairs Trading Part II – SPY vs. RTH | TRADING THE ODDS: Table I below shows the performance me… http://bit.ly/cHt4NA http://bit.ly/auIein […]

  3. Great info – thanks. We actually have been testing a model based on trading the LQD using the SPY using a 60 Min Chart. Backtested past 18 months and interesting results so far. If have any thoughts on this pair would appreciate your feedback. Thanks again for info.

  4. forex robot says:

    found your site on del.icio.us today and really liked it.. i bookmarked it and will be back to check it out some more later

  5. John says:

    Hello Frank, When trying to follow, my code results not exactly like yours. I assume having a deviation in the buy criterion. May I ask you to explain it?

    I’ve build a series of values representing the relation of the two #close values
    1) compare today’s relation with today’s EMA(4)of this series
    or
    2) compare today’s EMA(4)with yesterday’s EMA(4) of the series
    … to get a buy signal ?
    thanks in advance
    John

    • TradingTheOdds says:

      John,

      a ‘buy’ is triggered when the ratio of the ETF’s (SPY vs. RTH) closing prices closes -0.50% below the pair’s EMA4 (the ratio of the closing prices), or BUY = Close(today) < (1 – 0.005) * EMA4(today).

      Please take into account dividend and cash payments on the ex-dividend days.

      I hope that helps.

      Best,
      Frank

      • John says:

        Thx a lot, Frank – now getting at least qualitative matching results, maybe my data is not the same as yours or it’s the dividend issue respectively.
        You present really interesting approaches – I’ll continue to follow as far as my programming knowledge allows ;) – and maybe trying alternatives…

        best, John

Leave a Reply

Your email address will not be published. Required fields are marked *