{
  "tool_id": "cointegration-half-life-solver",
  "slug": "cointegration-half-life-solver",
  "path": "/cointegration-half-life-solver/",
  "mode": "client_side",
  "usage": "Client-side calculator. Open https://aifinhub.io/cointegration-half-life-solver/ and fill in the inputs; results render in-browser.",
  "methodology": "https://aifinhub.io/methodology/cointegration-half-life-solver/",
  "sample_input": {
    "tool": "cointegration-half-life-solver",
    "lookback": 252,
    "a": [
      0.01,
      0.02,
      -0.005,
      0.015,
      -0.01
    ],
    "b": [
      0.01,
      0.02,
      -0.005,
      0.015,
      -0.01
    ]
  },
  "input_schema": {
    "type": "object",
    "properties": {
      "tool": {
        "type": "string"
      },
      "lookback": {
        "type": "number"
      },
      "a": {
        "type": "array",
        "items": {
          "type": "number"
        }
      },
      "b": {
        "type": "array",
        "items": {
          "type": "number"
        }
      }
    },
    "required": [
      "tool",
      "lookback",
      "a",
      "b"
    ]
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "beta": {
        "type": "number"
      },
      "intercept": {
        "type": "number"
      },
      "half_life_days": {
        "type": "number"
      },
      "adf_p_value": {
        "type": "number"
      },
      "r_squared": {
        "type": "number"
      }
    }
  }
}
