Selecting Cointegration Test Samples Under Changing Regimes
Summary
The discussion explains why cointegration test p-values can change sharply when the start and end dates change. If the underlying data-generating process is stable, using the longest available sample can improve a test’s statistical power. If the process changes over time, however, combining different regimes may obscure the relationship relevant to a particular period; the test should then use a subsample representing the period of interest.
Changing results across samples may indicate that the relationship is not stable, so inference from one interval should not be assumed to hold in another. For a strategy seeking pairs that remain cointegrated in coming months, the answer stresses that financial relationships cannot be guaranteed to persist. The suggested support for expecting persistence is a theoretical argument, such as two listings of the same company having prices that should not diverge substantially. The discussion gives no procedure for detecting regime shifts or forecasting future cointegration, and sample choice remains tied to the intended trading horizon.
Key ideas
- A stable data-generating process favors using the longest available sample to gain test power.
- When the process changes, test the subsample that matches the period of interest.
- Variation in results across samples can signal an unstable relationship.
- Historical cointegration does not guarantee that a pair will remain cointegrated.
- Economic reasoning may support an expected relationship but cannot ensure its persistence.
Tags
Full text
# How do you decide what time frame you're going to use when testing for cointegration? # How do you decide what time frame you're going to use when testing for cointegration? I've been fiddling around with different time frames when doing tests for cointegration between two timeseries, and I've realized that the dates that you use for your start/stop of the test will dramatically change the resulting p-value. My question is from which time frame should I trust the results of my cointegration test? Do I want to look at the past year to determine coint? Do I want to look back as far as possible? Is there some magic number? Given the wildly different results my cointegration tests are giving, I would assume that some of these p-values are more "right" than others. Any thoughts? ## Answer by Richard Hardy (score 1) https://quant.stackexchange.com/a/30574 If the data generating process was fixed over time, you would choose the longest available data sample for cointegration testing -- because a larger sample yields higher power for the test. If the data generating process is changing over time, then you would identify the time period of interest and use only the corresponding subsample to test for cointegration -- because the test results would differ across periods/subsamples. If the test results change depending on the period/subsample (your case), it is likely that the data generating process is changing over time (across subsamples). Then you have to choose the subsample of interest and test and make inference for that particular subsample, being aware that inference might not hold for other periods/subsamples. Edit addressing the comment > I'm looking for cointegration because I want to be able to trade a pair of stocks that is both (1) cointegrated in my backtest and (2) will likely be cointegrated in the coming months. This is a very challenging task, and you can never be guaranteed that the data generating process will remain the same over time, especially when it comes to financial time series. There is essentially no way to tell whether cointegration will or will not be present in the future. But you can try theoretical argumentation such as if shares of a company are traded on two exchanges, the prices in the two exchanges should not deviate far away from each other.
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.