# How can I apply error correction model in pairs trading?

I have read Vidyamurthy and others, but did not find clear example of error correction model (ECM) application in pairs trading.

How should I use the ECM model in the pairs trading?

How to use ECM coefficients "speed with which the time series corrects itself to maintain equilibrium", a_x and a_y?

• yes, please elaborate a little more, otherwise I will vote to close your question – lehalle Oct 13 '16 at 9:41

If (x, y) are both integrated to the same order (commonly I(1)), we can estimate an ECM model of the form: $A(L)\Delta y_{t}=\gamma +B(L)\Delta x_{t}+\alpha (y_{t}-\beta _{0}-\beta _{1}x_{t})+\nu _{t}$
Estimate the model using Ordinary least squares: $y_{t}=\beta _{0}+\beta _{1}x_{t}+\epsilon _{t}$
Then the predicted residuals ${\hat {\epsilon _{t}}}=y_{t}-\beta _{0}-\beta _{1}x_{t}$ from this regression are saved and used in a regression of differenced variables plus a lagged error term:
$A(L)\Delta y_{t}=\gamma +B(L)\Delta x_{t}+\alpha {\hat {\epsilon _{t-1}}}+\nu _{t}}$.