graph_neighbors
The stocks that move most with a given ticker, ranked by strength, each with its cluster (a stable id and a label naming its biggest members) — peers, co-movers and offsetting names. Residual correlation is how much two stocks move together after the market and sector effects are removed from each, so it shows peers and true co-movement rather than shared market beta. type=lead_lag instead lists directed lagged relationships (one stock's move followed by another's a few sessions later; direction is from the symbol's point of view), which are weak and largely noise out of sample. Share classes are one company (GOOG is answered as GOOGL). Everything returned is descriptive statistics of past returns, not a recommendation. Free within your daily allowance (anonymous 5/day by IP, signed-in users 10/day, power users 50/day); beyond that $0.01 per call via x402 (USDC).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| k | No | Neighbours to return, 1-50 (default 20). | |
| type | No | resid_corr (default): same-day residual correlation. lead_lag: directed lagged correlation. | |
| regime | No | all (default) | highvol | lowvol: volatility regime the correlation was measured in (VIX above / below its trailing median). | |
| symbol | Yes | Ticker symbol, e.g. RGTI or BRK-B. | |
| window | No | Sessions behind resid_corr: 250 (default) or 60. Leave unset for lead_lag. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| regime | Yes | ||
| symbol | Yes | ||
| window | Yes | Sessions behind resid_corr (60 or 250); for lead_lag the sample size | |
| cluster | Yes | The symbol's cluster (stable id + label) or null | |
| run_date | Yes | Date of the nightly run the edges come from, YYYY-MM-DD | |
| neighbors | Yes | ||
| peers_kind | No | 'neighbors' when the symbol is in no cluster (cluster_context then returns its closest peers) |