Cointegration is an analytic technique for testing for common trends in multivariate time series and modeling long-run and short-run dynamics. Two or more predictive variables in a time-series model are cointegrated when they share a common stochastic drift. Variables are considered cointegrated if a linear combination of them produces a stationary time series.
You can perform cointegration analysis with MATLAB and Econometrics Toolbox, which provides Engle-Granger and Johansen methods for cointegration testing and modeling. The Engel-Granger method tests for individual cointegrating relationships and estimates their parameters. Johansen methods test for multiple cointegrating relationships, and estimate parameters in corresponding vector error-correction (VEC) models. In addition, Johansen methods test linear restrictions on both error-correction speeds and the space of cointegrating vectors, and estimate restricted model parameters.