# Finding the weights in pairs trading

Could you tell me if the approach below for calculating the weights in a pairs trading strategy is correct?

Let's say that my capital is 100.

Regression $$\ln(y)=b \ln(x) + e$$.

I find $$b=1.2$$.

$$w_{x}+w_{y}=1$$

$$w_{x}=1.2w_{y}$$

Solving the above system, I find $$w_{y}=0.454545$$ and $$w_{x}=0.545454$$. So when

$$e>$$ threshold, I go short £45.45 on $$y$$ and go long £54.54 on $$x$$.

When $$e<$$threshold, I go long 45.45£ on y and go short £54.54 on $$y$$.

• Hi: The methodology depends on whether one is using prices or returns. It looks like you are using prices so check out Paul Teetor's "better ratios for spread trading" at this link. quantdevel.com. Assuming that you want to stick with OLS ( and not get into total least squares which Paul discusses ) , then the appendix is where the implementation is described. – mark leeds May 1 at 23:05