Cointegration Test Tool

Test paired series for stable equilibrium using residuals. Tune lags, confidence, and decimal precision easily. Review statistics, interpretations, and exports in one clean workspace.

Input Data and Test Options
Tip: Cointegration testing is most meaningful for non-stationary series of similar integration order, commonly I(1). This tool applies an Engle-Granger style residual test approximation.
Example Data Table
Exports use this table
t Series X Series Y Fitted Y Residual
1 100.0000 200.0000 199.6859 0.3141
2 102.0000 203.0000 203.3451 -0.3451
3 103.0000 205.0000 205.1747 -0.1747
4 105.0000 209.0000 208.8340 0.1660
5 107.0000 213.0000 212.4932 0.5068
6 108.0000 214.0000 214.3228 -0.3228
7 110.0000 218.0000 217.9821 0.0179
8 111.0000 220.0000 219.8117 0.1883
9 113.0000 223.0000 223.4710 -0.4710
10 114.0000 225.0000 225.3006 -0.3006
11 116.0000 229.0000 228.9598 0.0402
12 118.0000 233.0000 232.6191 0.3809
Formula Used

Step 1: Cointegrating regression

Estimate a long-run relationship using ordinary least squares:

Yt = β₀ + β₁Xt + et

Residuals et represent deviations from the long-run equilibrium.

Step 2: Residual stationarity (ADF-style)

Δet = α + γet-1 + ΣφiΔet-i + νt

If γ is sufficiently negative (t-statistic below the critical threshold), residuals are treated as stationary and cointegration is likely.

This implementation provides a practical approximation for educational and screening use.

How to Use This Calculator
  1. Enter equal-length Series X and Series Y values separated by commas, spaces, or new lines.
  2. Choose the ADF residual lag count. Start with 1 or 2 for small samples.
  3. Select the significance level (10%, 5%, or 1%).
  4. Set decimal precision for displayed metrics.
  5. Press Submit Cointegration Test.
  6. Review the result panel above the form for the decision summary and key statistics.
  7. Use CSV Download for the displayed table or PDF Download to print the page.
Selecting Data and Sample Windows

Cointegration testing works best when both series are aligned, complete, and sampled at one frequency. Analysts often use paired prices, yields, or macro indicators with matching dates. Before testing, remove entry errors, confirm ordering, and avoid mixing weekly values with monthly values. Clean alignment matters because timing mismatches can distort residual patterns and produce weak decisions. Consistent scaling is also helpful, especially when users compare multiple test windows during routine validation cycles.

Interpreting Cointegrating Regression Outputs

The first stage estimates a long run equation linking Series X and Series Y. The slope shows the average equilibrium response of Y to X, while the intercept captures baseline offset. R-squared and correlation are useful context metrics, but they do not prove cointegration. Residuals from this stage are the key output because they measure deviations from the estimated equilibrium path. Document the chosen sample window and data source so repeated tests can be audited and reproduced later.

Residual Stationarity and Decision Rules

The second stage applies an ADF style regression to residuals. The gamma coefficient reflects whether deviations shrink over time. A negative gamma with a sufficiently low t statistic supports residual stationarity, which suggests cointegration. This tool provides an approximate interpretation using selected significance levels, making it useful for screening, education, and exploratory research before deeper econometric validation. Because critical values depend on specification details, treat borderline cases carefully and retest under alternative settings.

Lag Selection and Sensitivity Checks

Lag selection controls how much short run dependence is absorbed in the residual test. Too few lags may leave autocorrelation in errors, while too many reduce degrees of freedom and weaken power. A practical workflow is testing nearby lag counts and checking whether the conclusion stays stable. If results change easily, review outliers, sample length, and possible structural breaks. Many analysts start with one lag, then increase gradually until residual autocorrelation risk appears reduced.

Using Results in Monitoring Workflows

Cointegration screening is used in spread research, macro tracking, and monitoring workflows. A positive result does not guarantee a tradable signal, but it can justify deeper analysis. Teams usually combine this test with rolling windows, break detection, and risk limits to monitor stability. This calculator supports transparent review with table exports and printable reports, helping analysts compare runs and document assumptions consistently. Internally.

FAQs

1) What data should I enter for a cointegration test?

Enter two equal-length numeric series collected at the same frequency. Use aligned observations only. Daily, weekly, or monthly values are all fine if timestamps match.

2) Does high correlation mean the series are cointegrated?

No. Correlation shows co-movement, but cointegration requires residual stationarity around a long-run equilibrium. Two series can be highly correlated and still fail cointegration.

3) How many observations are recommended?

At least 10 are required here, but practical analysis usually benefits from 60 or more points. More observations improve stability unless structural breaks dominate the sample.

4) What does the gamma coefficient indicate?

Gamma measures error-correction speed in the residual test. A negative and statistically strong gamma suggests residuals revert toward equilibrium after short-term deviations.

5) Why should I test multiple lag counts?

Lag choice affects residual autocorrelation control and degrees of freedom. Testing nearby lag values helps you check whether conclusions remain stable and dependable.

6) Is this tool suitable for final econometric reporting?

It is best for screening, learning, and rapid analysis. For formal reporting, validate results with specialized econometric software and exact critical values.

Related Calculators

Moving Average CalculatorSeasonal Decomposition ToolTime Series Forecast ToolPartial Autocorrelation ToolStationarity Test ToolADF Test CalculatorKPSS Test CalculatorHolt Winters ToolSeasonal Index CalculatorDifferencing Calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.