Pairs Trading in Practice

Discussion in 'Trading' started by BigDog, Feb 17, 2019.

  1. BigDog

    BigDog

    1. Actually, no. It would be highly unusual to find a pair for which beta is constant. Instead, the model assumes that beta(t) changes over time dynamically. One then uses a moving (or expanding) window of observations to reestimate beta over time (regression/residual model), or using a Kalman Filter.

    2. You are anticipating Part 2 in which I will look at the role played by correlation, cointegration etc. But the short answer is that correlation is by itself a poor means of selecting pairs. Firstly because correlations tend to be highly unstable and subject to regime shifts; and secondly because it is easy to find spurious correlations that evaporate out of sample.
     
    #21     Feb 18, 2019
  2. ironchef

    ironchef

    You didn't read about correlation estimate, I asked.

    I asked in a different post about the pair of CELG and BMY. Since BMY bought CELG for $50 + BMY stocks + $9 CVR, they are linked. If you plot CELG:BMY, they don't go 1 to 1, so the "data" are noisy. Where does KF fit in, or does it fit in at all?
     
    #22     Feb 18, 2019
  3. ironchef

    ironchef

    What you said make sense. The reasons I asked is that my understanding of KF is only at the wiki overview level:

    You model the state as a function + noise, then measurements update your model and you can use the update to predict the value for the next time period, compare with the new measurement for the next time period and make correction.... I am thinking about the following.

    1. Since underlying and options are linked, can one use KF to find the best estimate of the relationship?

    2. If some underlying are correlated, can one model the correlation using KF?

    Really appreciate you taking the time to answer my questions.
     
    #23     Feb 18, 2019
  4. gkishot

    gkishot

    I am sorry, I am not sure I understand then the principal behind the pair trading. What kind of guess ( estimate ) is made then about the future behavior of 2 arbitrary stocks?
     
    #24     Feb 18, 2019
  5. BigDog

    BigDog

    Yes you have described the idea behind the Kalman Filter very well.

    1. In theory I suppose you could use a KF to model the link between a stock and its derivatives (including options). In which case you are using KF to estimate the option delta ( a more complex model might also account for second order effects like Gamma). You could also do the same with machine learning algorithms, for that matter.

    But in the case of options there is an explicit and widely-accepted model that explains the relationship between the option and the underlying (i.e. Black-Scholes, etc). So you would be using KF in the hope that it could help you identify temporary divergences from the B-S fair value. That strikes me as implausible. In equity pairs trading there is no equivalent to Black-Scholes that "explains" the relationship between the two stocks. So temporary divergences are more likely to arise, since non-one knows for sure what fair value is in stock A relative to Stock B.

    2. Yes, but not directly (although that is an interesting idea, one I don't recall seeing before). Instead you model a linear relationship between two stocks that gives rise to a certain correlation (i.e. there is a correlation between the stocks implicit in the model).
     
    #25     Feb 18, 2019
    ironchef likes this.
  6. BigDog

    BigDog

    The problem with correlation is that it can easily arise from two completely unrelated random processes (including stock prices) just by random chance. So things look related when in fact they are not. There are lots of stupid examples of this, like tea consumption in Japan vs steel demand in Germany, etc.
    So, you put your finger on a key question: if correlation is not a terribly reliable guide to establishing what the relationship between two arbitrary stocks might be , what should you use? One answer is the concept of cointegration: the idea that one can demonstrate statistically that there is a "common driver" pushing both stocks in the same direction. That factor may often have economic meaning: for instance, the cost of carry relationship between the spot and futures price series.
    Another potential answer lies in machine learning methods. Correlation is a measure of a linear relationship. But stocks may be related in a nonlinear way, that techniques like ML are better equipped to model.
     
    #26     Feb 18, 2019
  7. BigDog

    BigDog

    The divergences from fair value would have to be big enough to be profitable to trade. There are lots of examples of pairs that are very tightly connected as in your example - so much so, in fact, that tiny divergences are very statistically significant (Series A and B in the same stock might be another example). But if you try to trade them you will lose money since the average profit per share on a typical trade is less than the bid-ask spread.
     
    #27     Feb 18, 2019
  8. gkishot

    gkishot

    So what model can be used to predict future prices of 2 random stocks? :)
     
    #28     Feb 18, 2019
  9. The chimp-poop method.
     
    #29     Feb 18, 2019
  10. ironchef

    ironchef

    Right now the gap is big: BMY is ~$50, CELG ~$90, fair value ~$100 and change. From what I read, the gap is due to the uncertainty of the merger, many analysts think BMY itself is a buyout candidate and therefore the deal won't go through.
     
    #30     Feb 18, 2019