| --- |
| title: "Premium Stock Analysis" |
| description: "On-demand equity analysis per ticker β buy/hold/sell signal, price targets, analyst consensus, upgrades, insider transactions, and sparklines." |
| --- |
|
|
| The **Premium Stock Analysis** panel (internal id `stock-analysis`) is the dashboard's per-ticker deep-dive: one analysis at a time, with a structured synthesis of signal (buy / hold / sell), price targets, analyst consensus, recent upgrades/downgrades, insider transactions, and a price sparkline. Backed by the Market service's analyst / price-target / insider RPCs. |
|
|
| ## What the panel shows |
|
|
| An analysis card per selected symbol. Each card renders: |
|
|
| - **Symbol + price** β current price with currency formatting (`formatPrice()`), percent change today (`formatChange()`). |
| - **Signal badge** β `Buy` / `Hold` / `Watch` / `Sell` classified via `stockSignalClass()` into bullish / neutral / bearish visual buckets. |
| - **Thesis bullets** β rendered with `list()` into sanitised `<ul>`. |
| - **Analyst consensus** β the `AnalystConsensus` shape from the generated Market service client. |
| - **Price targets** β low / avg / high from `PriceTarget[]`. |
| - **Recent upgrades / downgrades** β `UpgradeDowngrade[]` list. |
| - **Insider transactions** β filings from `InsiderTransactionsResult`, attached separately via `setInsiderData(symbol, data)`. |
| - **Sparkline** β price history rendered via `@/utils/sparkline`. |
| - **History** β previous analyses for the same symbol are kept in `StockAnalysisHistory`. |
|
|
| Panel id is `stock-analysis`; canonical component is `src/components/StockAnalysisPanel.ts`. Title "Premium Stock Analysis" per the panel's own `super({...})` call. |
|
|
| ## How you reach it |
|
|
| - **Cmd+K**: type *stock* or the ticker symbol. |
| - **Availability by variant**: registered and enabled by default in the **full/geopolitical** and **finance** variants β locked in both. Not present in the tech, commodity, or happy variants. Source: `'stock-analysis'` entries in `FULL_PANELS` and `FINANCE_PANELS` at `src/config/panels.ts:49` and `:422`. |
|
|
| ## Data sources |
|
|
| All fields come from generated `MarketServiceClient` routes. The panel is locked, and the premium stock-analysis calls use `premiumFetch`; the insider-enrichment route is rendered only inside this locked surface. |
|
|
| | Method + route | Feeds | |
| |---|---| |
| | `GET /api/market/v1/analyze-stock` | Per-symbol analysis card: current price, sparkline, technical signal, thesis, targets, ratings, headlines, and AI synthesis. | |
| | `GET /api/market/v1/get-stock-analysis-history` | Cached/shared previous analyses so the panel can render stored snapshots before recomputing stale symbols. | |
| | `GET /api/market/v1/get-insider-transactions` | Insider Activity section attached after the analysis card renders. | |
|
|
| ## Refresh cadence |
|
|
| Analyses are on-demand; no polling. The panel caches previous analyses in `StockAnalysisHistory` so re-opening a symbol shows the last analysis immediately while a fresh one fetches. |
|
|
| ## Tier & gating |
|
|
| **PRO (hard-locked).** `premium: 'locked'` on both variant registrations. `isPanelEntitled` unlocks it when **either** a valid `WORLDMONITOR_API_KEY` is present **or** `isPro` is true (`stock-analysis` is in the `apiKeyPanels` allowlist at `src/config/panels.ts:973`). |
|
|
| ## API reference |
|
|
| - [Markets service](/api/MarketService.openapi.yaml) β schemas and parameters for `analyze-stock`, `get-stock-analysis-history`, and `get-insider-transactions`. |
| - Related: [Premium Backtesting](/panels/stock-backtest) β the backtest side of the same dataset. |
|
|