# Pairs trading using dynamic hedge ratio - how to tell if stationarity of spread is due to genuine cointegration or shifting of hedge ratio?

I'm very new to pairs trading, and am trying it out on a few dozen pairs.

It seems very natural to me to use a dynamic hedge ratio, as it seems likely that the ratio will move over time.

To accomplish this, I am using rolling linear regression (so I choose a lookback period of, say, 100 hours and I keep shifting this 100-hour window forward, run linear regression on that window to determine the "current" hedge ratio).

I have noticed, though, that by doing this, it seems like I can make a "stationary" spread out of just about any pair. I realize this is likely because part of the "stationarity" is due to the self-correcting nature of a rolling window regression, which over time will make the spread return to 0 by changing the hedge ratio, not because the spread actually reverted to the mean.

How can I address this? How can I tell if my spread is stationary due to real mean reversion, or just the shifting hedge ratio? Is there a better way of finding a hedge ratio?

I realize there's a lot loaded in this question, and I'll be happy to give a bounty to anyone who takes the time to respond deeply. Thank you!

Related question and discussion here: Pairs Trading - isn't any spread stationary if your rolling lin-reg window is small enough?

For your context here the definition: Two instruments $$x$$ and $$y$$ are co-integrated if $$\omega$$ exists such that $$x+\omega y$$ is stationary. Where $$\omega$$ is the mentioned hedge ratio.
• Vladimir: Just to re-iterate, if you don't estimate the hedge ratio but rather, use a constant, such as 1.0, and then test for stationarity of residuals, this might improve the lack of stability issue. Also, check out Paul Teetor's PLS approach to pairs. He introduces the idea of PLS in order to deal with the issue that which stock is $y$ and which is $x$ ( in the E&G cointegration framework ) is an arbitrary choice. It's on the net somewhere. If you can't find it, let me know. It might help with stability because there is no choice made as to which stock is y and which is x. Commented Mar 22, 2022 at 3:54