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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"series_x": "<series_x>",
"series_y": "<series_y>"
},
"name": "stats_cointegration"
}
}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 |