Spread (pair) trading question

Discussion in 'Strategy Building' started by IIAce, Mar 13, 2006.

  1. nitro

    nitro

    #41     Mar 16, 2006
  2. When you get into timeframes of days and weeks you probably only want to use cointegration based pairs as correlation is only useful for short timescales.

     
    #42     Mar 16, 2006
  3. #43     Mar 16, 2006
  4. that's what I thought... i.e., macro moves and sector rotations would come into play (small cap vs large cap) making that spread trade more a macro view than correlation.

    Can you give me an example of cointegration based pair?
     
    #44     Mar 16, 2006
  5. Well, really obvious things like the QQQQ and the nasdaq100 futures are cointegrated by design, but you really cant make any money there cause the market is so effecient.. just gotta find em, you can do simply regressions and tests in excel, the yats.com linked posted above is good.

     
    #45     Mar 16, 2006
  6. #46     May 22, 2008
  7. c0in

    c0in

    The thing is that cointegration is a way to define a longer term relationship between stocks.

    In THEORY selecting a cointegrated pair of stocks is the right way to do it, because as someone posted early on this topic a stock is an integrated time series... therefore non-stationary, and a way to transform 2 integrated time series into a non-integrated one is combining by taking the ratio... hence you've got yourself a mean-reverting pair which is market neutral...

    The way i see it cointegration is better for longer term pairs and i prefer to use correlation between stock for day-trading (as even tough in theory it's not the "right" way to do)

    I prefer using the johansen method even tough it's a bit more complicated and there is an easy way to code it into excel, i've done it and didn't have to program vba (for those interested try downloading this add-in http://digilander.libero.it/foxes/SoftwareDownload.htm)

    What i am trying to say is that cointegration is a much more robust way to trading pairs especially for the long term trader, however depending on your style and time-frame using correlation isn't a bad approach (it's much easier and faster as well :))

    And please don't buy the mark whistler's book, it's just awful...

     
    #47     May 28, 2008
  8. yobo

    yobo

    So, let me get this straight please. All you do is open up an excel sheet, put the past historic prices of two stocks in there (How far back do you go?). Check the correlation (How many days/months do you check it for?), and then I guess you have a benchmark for the correlation (ie. >.9). Then you just take the ratio of the two prices, plot it with its mean and standard deviation. If the ratio is more than 2 standard deviations or something, you take a position and you just keep this data sheet running until the ratio returns back to it's current mean then close the position.

    --------------------------------------------------------------------------------

    From a lesson hard learned...Remember that with pairs they either trade in tandem around their mean, or deviate away from it. The best long term pairs are those that continue to deviate. More profit potential. If you make a trade for reversion your profit is limited.

    I traded xom/cvx. Correlation was high around 94%. Statistically, they got to 2 stddev so I went long xom and shorted cvx. From a statitical perspective only this was the right thing to do. However fundamentally CVX was the cheaper of the two and paid a higher dividend and offered better value.

    Needless to say, mean reversion has not happened and currently they trade at a spread that is way out of whack from historical data.

    The lesson I learned for trading pairs was this. Find two stocks in the same industry that are highly correlated statistically. Second, do the fundamental analysis and see which one is the better value(cheaper). Short the more expensive one and enter the trade at the mean to catch the mean "diversion."

    And third use a broker that pays you interest on holding a short position
     
    #48     May 28, 2008

  9. why should ANYONE tell you? u sound like one of those twats back in school who never did their hw and just wanted someone elses copy. people spend years learning on topics u think u can pick it up with 'getting it straight'? clicking this doing that will get you no where either, you need to know exactly why u're doing wot u're doing.

    anyways,

    my view

    cointegration is only really applicable over longer periods of time, and probably more suited to certain asset classes such as FX.

    models such as coint, grangers causality, error correcting etc. are most suitable for big players such as asset managers who are happy with 5% return. no one will ever get crazy returns from this..

    mean reversion, martingales, all sounds exciting. don't know a single trader who makes money from it.

    trouble with most stat/econometrics strategies is they do produce returns - be it bit by bit over time. but when they blow, they blow big.
     
    #49     May 29, 2008
  10. c0in,how to caculate the Equilibrium value Cointegration coefficient Sigma?
     
    #50     Oct 20, 2008