lag_analysis
Cross-correlation at multiple lags. Answers "does A lead or lag B?". Peak |r| at positive lag means A precedes B by that many periods. Common use: "is consumer confidence a leading indicator of retail sales?". Runs on any verified autario indicator (World Bank, FRED, Eurostat, OECD, IMF, WHO, ECB, US Census, SEC).
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": {
"a": "<a>",
"b": "<b>",
"entity": "<entity>"
},
"name": "lag_analysis"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | First indicator id (candidate leading series) | |
| b | Yes | Second indicator id (candidate lagging series) | |
| time | No | Optional time window. "2010-2023" keeps 2010 through 2023, "2019-01-2024-06" works by month, and a single "2015" keeps 2015 onward. Omitted or unparseable = the whole series. | |
| entity | Yes | Entity code (e.g. USA) | |
| max_lag | No | Max lag in periods (1-20, default 5) |