Correlation and cointegration answer different questions
Correlation measures linear co-movement in the series you supply. TradingView's built-in Correlation Coefficient uses closing prices; correlation of returns is a different calculation and must be labeled accordingly. Cointegration asks whether nonstationary series have a stationary linear combination. Two assets can move together while the distance between their prices keeps growing.
- A simple counterexample is A(t) = 100 + 2t and B(t) = 50 + t. Their price-level correlation is 1, but A - B = 50 + t trends upward. This algebraic example refutes the inference that high correlation makes an unweighted difference revert; it is not a cointegration test.
- For an Engle-Granger test, the statsmodels documentation specifies a null hypothesis of no cointegration and assumes the input series are I(1). Check integration assumptions, regression specification and lag choices before interpreting a p-value.
- Rejecting that null on one sample is evidence about that fitted relationship under the test assumptions. It does not establish an enduring relationship, executable profits or future convergence. Screening many pairs also creates selection bias.