I have a set of 7 assets, and I have run an ADF test on all possible pair-spreads to find possible pair strategies. I am creating the spreads using a rolling window in which I run linear regression to find the hedge ratio.

It seems that when the rolling window is large/long, few spreads are stationary. But as I decrease the size of the rolling window, more and more spreads becomes stationary. I feel like I'm somehow "cheating" or making a mistake, but I can't figure out what it is.

What is wrong about what I'm doing? Couldn't I take any pair of assets and make a "stationary" spread if I make the rolling window small enough?

EDIT: To be clear, the rolling window I'm referring to is the window of time in which I determine the hedge ratio.

  • $\begingroup$ Hi: Yes, if you make the time-frame short enough, then you might reject the null of stationarity less often ( I'll assume that's true but it's not even intuitive to me ) but you need to check whether there's going to be enough "action" in that timeframe. By action, I mean will there be enough time for the spread to get large ( small ) and then revert back. If not, then you won't have enough trades. $\endgroup$
    – mark leeds
    Mar 12, 2022 at 11:34
  • $\begingroup$ @markleeds Hi! I do think it's intuitive, because you're constantly re-adjusting your hedge ratio in order to make the fit happen, so you're looking for stationarity across increasingly tiny time frames (it's almost like zooming in on the edge of a ball until it looks flat, no?). I understand your concern about the amount of action - that is, whether the spread actually moves away from the mean enough. But here's my big concern - how do you handle the fact that your hedge ratio is constantly changing? Doesn't that mean you have to constantly buy/sell your hedge without completing a trade? $\endgroup$ Mar 12, 2022 at 16:55
  • $\begingroup$ Hi: yes, I see what you mean about zooming in. But the two series need to be cointegrated over that small period so couldn't one also argue that the smaller the time frame, the less time there is for the two series to show cointegrated-ness ? Anyway, let's assume your intuition is correct ( it could be. I'm not a intutition expert ). Then, I think you're big concern is what I'm getting at. The open and the close of the trade you get into HAS TO OCCUR IN THE TIMEFRAME you are using. Otherwise, the whole concept of what you're trying to do doesn't make sense. $\endgroup$
    – mark leeds
    Mar 13, 2022 at 17:48
  • $\begingroup$ ..... continued: you can't change your hedge ratio in the middle of a trade. This is what I meant when I said that there may not be enough action. Then open and close of the trade has to occur in the timeframe that you defined when you characterized as being cointegrated. Maybe you could use the end of that as a stop loss: get out when the time frame is over. Side question: What are you using for a time frame ? $\endgroup$
    – mark leeds
    Mar 13, 2022 at 17:55
  • $\begingroup$ @markleeds You're absolutely right. So then, here's the question - how do I separate "this is stationary because of cointegration" vs. "this is stationary because I keep changing the hedge ratio"? As a time frame, I am trying everything between 25 and 500 hours. About 100 hours seems to be a "sweet spot", though I haven't gotten success on my test set yet (only good results in "train" set). $\endgroup$ Mar 13, 2022 at 18:30


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.