Pairs Trading

Discussion in 'Strategy Building' started by dy070, Jan 23, 2006.

  1. I wanted to check the DNA-MRK correlation so used the recent 2 months (Dec 14 - Feb 14) or 40 data points. I think using a whole year or two has meaning for some but I use faster time frames like 30 to 60 days. I want to see how it has fluctuated. I get different results than what is posted abpve and have attached a screenshot.
     
    #21     Feb 15, 2006
  2. malaka56

    malaka56

    Hey, I have the same data above -.73 on the 2 month DNA/MRK correlation I'm no pairs trader, or expert in stats, but I don't really understand what your graph is. Is it a kind of graph of the difference in prices?
     
    #22     Feb 15, 2006
  3. It is a correlation graph. The last date (point) on the graph (.09) is the correlation between the logs of the stock price changes between February 14 and December 14 '05. The prior point on the graph is the correlation between February 13 and December 13 '05. . . . and so it goes. This is a rolling 40 day Pearson Correlation. How did you arrive at a figure so far off?
    Never trust a site with black box calculations unless 1) they tell you how they do them over what time frame and 2) You check them a dozen times by doing the calculations yourself.
     
    #23     Feb 15, 2006
  4. malaka56

    malaka56

    i dont know about the other guy, but i simply used good ol' excel and stuck 2 months of EOD data for each security in an array. =correl(x1:x40,z1:z40)
    pretty simple. I don't pairs trade, but as far as I know this should be adequate to determine a correlation.. please tell me if i am comletely off base. do you use your correlation graph as a setup for your pairs trades?
     
    #24     Feb 15, 2006
  5. At what time frame are you guys trading these pairs?
     
    #25     Feb 15, 2006
  6. malaka,
    Why are you using an array formula, or are you just talking loosely about a series of prices?
    Correl does not use an array formula in a cell. It uses a range of price change logs.
    Did you try to duplicate my results? You don't seem to be using logs as I did?

    Stephen,
    I'm just posting here to show how correlation can be miscalculated and how it fluctuates over a time period. This particular pair is not to my liking since there is no fundamental reason for its use. My particular interest at this time is in portfolio balancing using betas, which as you may know incorporate correlation in its formula. The time period I am interested in is 1 to 3 weeks.
     
    #26     Feb 15, 2006
  7. malaka56

    malaka56

    mysticman,
    i don't pairs trade at all, and correl() is about the limit of my understanding of how to correlate prices. i only use it as a rough step-up from eyeballing a chart to see if there is any correlation. I am gaining an interest in pairs trading however, if you would care to share exactly how you calculate your correlation, i would be very interested. thanks.
     
    #27     Feb 16, 2006
  8. Example using rolling 30 day correlation.
    Pairtrader.com has been informed of the gross errors in their correlation calcs.
     
    #28     Feb 16, 2006
  9. I just came across this thread (noticed pairs of course)...and was concerned that there was something said that may be misunderstood about how well PairCo does their massive amounts of correlations. This is an email response from one of the programmers. I have attached a file to show how the numbers are calculated.

    These guys do a tremendous job, make loads of money, and provide a great service. Of course, there can be mistakes when there is this massive amount of work being done, but evidently that is not the case here.

    Hi, Guys.

    Here's a spreadsheet which shows how the correlation calculation for Dna Mrk is done on the website. It seems in pretty close agreement with what you were getting, so I don't think there is a problem.
    I don't know what day you ran your website calculation, Neale, but it can't have been more recent than after last night's updates, so I went with yesterday's date to 65 days back from that.

    Regards,
     
    #29     Feb 16, 2006
  10. Just testing, we're getting an error message from ET.

    Don
     
    #30     Feb 16, 2006