find_similar
Find historical (ticker, date) setups most similar to a query ticker today. Four similarity methods are available: cosine (default, all tiers) ranks by cosine similarity of 32-D regime-aware embeddings; label_aware (PRO+) restricts the backbook to dates in the same SPY volatility regime; supervised (QUANT) projects embeddings through a PLS regression fit on forward-return labels so neighbors are ones whose factor profile most-strongly-predicted realized returns; dtw (HOBBY+) cosine-shortlists then reranks by dynamic-time-warping distance over the rolling return window. Each returned neighbor row carries the analogue's factor row and forward-return labels at that historical (ticker, date) — pre-joined for honest backtests, no extra fetches needed. Use min_lookback_days=30 to filter out same-day correlated tickers. Pass conditioner=vx_term_structure (QUANT only) to additionally filter analogues to dates with a VIX-curve regime similar to today.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| method | No | Similarity method. Tier-gated: FREE=cosine; HOBBY=cosine+dtw; PRO=cosine+dtw+label_aware; QUANT=all four. | cosine |
| ticker | Yes | ||
| tolerance | No | Max |conditioner_query − conditioner_neighbor|. Only used when conditioner is set. | |
| conditioner | No | QUANT only. Filter analogues to dates with a similar regime conditioner value. Currently only vx_term_structure is supported. Limits: analogues older than 252 trading days are passed through unverified. | |
| min_lookback_days | No | Require neighbor_date to be at least this many days before query_date. Default 30 strips co-traded same-day ETFs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | ||
| neighbors | Yes | ||
| tolerance | No | Echo of conditioner tolerance. | |
| query_date | No | ||
| conditioner | No | Present only when conditioner is requested (QUANT). | |
| query_ticker | Yes | ||
| conditioner_note | No | Notes about the conditioner filter — matched count, unverified count. | |
| min_lookback_days | No |