stats_cointegration
Test two time series for cointegration using the Engle-Granger method. Returns test statistic, p-value, hedge ratio, and spread for mean-reverting pair trading.
Instructions
Engle-Granger cointegration test with hedge ratio and half-life.
Use when testing if two time series are cointegrated (mean-reverting pair). Provide two price series. Returns: Engle-Granger test statistic, p-value, critical values, hedge ratio, and spread series.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| series_x | Yes | First time series | |
| series_y | Yes | Second time series | |
| significance | No | Significance level for the test | 0.05 |