Nisha Trades
  • Home
  • Blog
  • About
  • Resources
    • Links
  • Contact
  • Disclaimer

Let's trade

Correlations II

10/7/2018

4 Comments

 
Welcome, back! In this post, I'd like to further expand on an earlier discussion on correlations, this time analyzing how it can be used in pairs trading! 

Using some basic Google Finance functions, I created a spreadsheet to get prices for a few of my favorite ETFs in real-time (well, 20 min delayed). One of the core functions I used from Google Finance was "=GOOGLEFINANCE("SPY","CLOSE",TODAY()-500,TODAY())". This allows me to get the  historical closing prices for SPY for past 500 sessions.

Using the historical prices downloaded in Google sheets, I was able to use the "CORREL" function to find the correlations between two data sets i.e., historical prices of two different ETFs.

Since I was using multiple ETFs, I decided to construct a table to in order to obtain a birds-eye view over the entire collection of the ETFs. Here was the end result:
Picture
What does it mean?
  • The top-most row has the most recent closing price, for example, SPY closing price was $292.03 (data in this post is as of 10/1/18)
  • The second row displays the YTD gain (or loss) for the ETF. Here, SPY has rallied 8.62% this year
  • The top right triangle lists the correlations between the different pairs of ETFs
  • The bottom left triangle lists the sizing equivalence if we were to do a pairs trade
Let's use this table to look for opportunity and see if we can place an example pairs trade.

A closer look at the table highlights an opportunity in SPY (S&P 500)  versus XLK (Tech sector).  The table below shows the relevant stats:
Picture
 Here, I've highlighted only the portions relevant to the trade so we can focus on task at hand. Let's look them:
  1. As discussed before, SPY is at $292.03 and has rallied 8.62% this year
  2. Comparatively, XLK has rallied a whopping 15.86% and is currently trading at $75.81
  3. The most important statistic here is that the two ETFs have a high positive correlation at 98.34%. This means both go up together or down together and the likelihood of this happening is pretty high. Usually I'd look at this number over different time frames in order to see where this correlation is currently, with respect to past, but we'll keep it simple here and accept the 98.34% correlation as a good indicator of high positive correlation. 
  4. Given the discussion above, we can conclude that XLK has rallied relatively faster than SPY.  Therefore, we can look to fade (short) XLK against a long position in SPY. Since the prices of the two aren't the same, we'll have to size the trade appropriately. Here we gather from the table above that we could do a trade of one SPY ($292.03) against four of XLK (4 x $75.81 = $303.24). Not exact, but it's good enough for our trade!
(We can be little more precise by multiplying the IV (implied volatility) to the price and figuring out the ratio for sizing purposes, but we will use this in a future post.)

Thank you for reading! I hope this has been helpful in understanding pair trading through using correlations! If you're interested, you can find my Google Sheets here! 
4 Comments

    Nisha

    Ninteen year-old trader,  future connoisseur of options.

    Disclaimer Statement
    Follow me on Twitter!
    ​@nishatrades

    Archives

    November 2020
    October 2018
    July 2018
    December 2017
    November 2017
    October 2017
    September 2017
    July 2017
    June 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    May 2015

    Categories

    All
    Beta Weighting
    Correlations
    Cost Basis Reduction
    Earnings
    Expected Move
    Long
    Portfolio
    Short
    Straddle
    Volatility

    RSS Feed

Proudly powered by Weebly
  • Home
  • Blog
  • About
  • Resources
    • Links
  • Contact
  • Disclaimer