Skip to content
All library documents

Testing Trending Stock Spreads as Long-Term Pair Investments

Article Quant Q&A · Author: TryingHardToBecomeAGoodPrSlvr

Summary

The document explores holding a stock-pair spread when it appears to follow a rising linear trend, rather than requiring the spread to be stationary as in conventional mean-reversion pairs trading. The author estimates hedge ratios by ordinary least squares using an initial portion of price history, normalizes each resulting spread, and compares it with a linear ramp. The standard deviation of the difference serves as a measure of how closely the spread follows that ramp. Among the tested stock pairs, the author reports a low error for one example and proposes holding the corresponding long-short position.

This is an exploratory screening idea, not evidence of a reliable investment strategy. The ramp fit uses the full series, so selecting pairs on that basis can introduce lookahead bias in a historical evaluation. A trending spread can reverse, and a market-neutral hedge ratio does not make the position risk-free. The document reports no out-of-sample performance, transaction costs, dividends, or risk-adjusted results; its apparent linearity alone does not establish future profitability.

Key ideas

  • The proposed method ranks stock-pair spreads by how closely they track a linear ramp.
  • The author estimates the hedge ratio with ordinary least squares on an initial data segment.
  • The spread-to-ramp error is measured using the standard deviation of their difference.
  • Using the full series to select pairs can introduce lookahead bias into historical evaluation.
  • A market-neutral position can still lose money, and a past trend does not establish future returns.

Tags

Full text
# Finding stock pairs whose spread is used for a risk neutral long-term investment


# Finding stock pairs whose spread is used for a risk neutral long-term investment












I am currently working on researching about ways to improve returns in pairs trading. I had previously posted a reference request here, where I had described a toy pair that seemed to be co-integrated.

While researching more about pairs trading, it got me thinking ... why not just buy the spread and hold it, if it has had a significant linear trend over the past whatever number of years? So here's what I did.

- I found the spread using OLS, between pairs chosen from about seventy stocks from various sectors. Note that in order to avoid lookahead bias, only the first ninety days of data was chosen to find the OLS parameter. For pairs trading, we usually check if this spread is stationary. However, in this case, I tried to figure out if this spread is a "close to linear" trend. The following steps describe how I tried to do that.

- I defined a ramp function and called it 'ramp', such that area under it is one, while it has the same length as the time series of the stock pairs chosen.

- The spread that I found between the stock pairs in #1, is then normalized so that it's area is again unity. It is plotted below.

- I then form the spread, between the 'noramalized spread', obtained in #3, and the ramp function, shown in #2, in order to find the "energy content" in the error between these two time series. Unlike in #1, where only the first ninety days of data was used, I used the data from the entire series here because the idea is to find out how close the spread is, to the ramp. The standard deviation of the time series, obtained by taking the difference between the spread and the ramp, gives us the measure of this energy content. Ideally, I want it to be zero. The difference looks as shown in the following graph.

In this case, this energy content was $7.59e-5$ and it was the lowest amongst all the stock pairs in the list of seventy five stocks that I had.

So in conclusion, if I shorted, for every $6.46$ CSCO stocks that was bought, one USO stock (this parameter was obtained from OLS), then I get a spread that is reasonably close to a linear ramp. Just holding this over time should be profitable.

There were quite a few pairs from the list of seventy five stocks that I chose, which gave similar results. The nice thing about this approach is that it seems, from the outset, that it is risk neutral.

I would love to hear from you if I have made any error in any of my assumptions, in the steps I took to arrive at these results, and also, if you think that there could be factors which can potentially kill the profit.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.