get_correlation
Compute cross-market correlation graphs to analyze portfolio diversification across prediction markets. Specify market IDs, platform, and time period to identify relationships for risk management.
Instructions
Compute cross-market correlation graph for portfolio diversification analysis.
Args: market_ids: List of market IDs to correlate (minimum 2). platform: Platform: "kalshi" or "polymarket". period: Lookback period: "48h", "7d", or "30d".
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| market_ids | Yes | ||
| platform | No | kalshi | |
| period | No | 7d |
Implementation Reference
- src/rekko_mcp/server.py:346-361 (handler)The `get_correlation` tool is defined here using the `@mcp.tool()` decorator, which handles its registration, and calls an internal `_request` helper to fetch correlation data.
@mcp.tool() async def get_correlation( market_ids: list[str], platform: str = "kalshi", period: str = "7d" ) -> str: """Compute cross-market correlation graph for portfolio diversification analysis. Args: market_ids: List of market IDs to correlate (minimum 2). platform: Platform: "kalshi" or "polymarket". period: Lookback period: "48h", "7d", or "30d". """ return await _request( "POST", "/v1/correlation", json={"market_ids": market_ids, "platform": platform, "period": period}, )