For the above time-series, the test yields a p-value of almost zero. to connect this with the measure theoretic origin of the pure point and continuous. In Python, you can find the MacKinnon test in the statsmodels library. 3.3 Direct Integral Representation of Projection Valued Measures. Other popular cointegration tests have been developed by Engle and Granger and Søren Johansen. Luckily, the work of James MacKinnon provides extensive insights into tests for cointegration. If you are interested in learning about the generating process itself, this approach is likely mo r e expedient. Obviously, cointegration is nothing new to econometricians and statisticians.
Statistical tests - the classical statistics way. On the other hand, the above result also suggests that adding the original time-series as a feature might be a good idea in general. The primary implication from cointegration is then to apply differencing with some care. As long as the resulting model is performant and reliable, nearly anything goes.Īs usually, the ‘best’ model can be selected based on cross-validation and out-of-sample performance tests. If our goal is primarily to build the most accurate forecast, we don’t necessarily need to detect cointegration at all. Therefore, two different approaches come to mind:Ĭross-validation and backtesting - the pragmatic, ‘data sciency’ approach. Typically, time-series analysis is concerned either with forecasting or inference. The above result begs the question of what we should do to handle cointegration.