Skip to main content

cointegration

Show co-integration between two timeseries using the two step Engle-Granger test.

The two-step Engle-Granger test is a method designed to detect co-integration between two time series. Co-integration is a statistical property indicating that two or more time series move together over the long term, even if they are individually non-stationary. This concept is crucial in economics and finance, where identifying pairs or groups of assets that share a common stochastic trend can inform long-term investment strategies and risk management practices. The Engle-Granger test first checks for a stable, long-term relationship by regressing one time series on the other and then tests the residuals for stationarity. If the residuals are found to be stationary, it suggests that despite any short-term deviations, the series are bound by an equilibrium relationship over time.

Parameters

data: ForwardRef('Data') | ForwardRef('DataFrame') | ForwardRef('Series') | ForwardRef('ndarray') | dict | list
columns: list[str]


Returns

results: Data

Serializable results.

provider: str

Provider name.

warnings: Optional[list[Warning_]]

list of warnings.

chart: Optional[Chart]

Chart object.

extra: dict[str, Any]

Extra info.


Data