Salta ai contenuti

/explain-move

Cosa fa. Spiega perché un titolo è salito o sceso, con grafico annotato.

Quando usarlo. Dopo un crollo o uno spike inatteso.

Argomenti. TICKER [periodo, es. 30d/3m/6m]

Esempio. /explain-move NFLX 30d

Cosa restituisce. Le cause probabili annotate sul grafico del periodo.

Quando lanci /explain-move, Dexter non esegue codice fisso: invia all’AI la prompt qui sotto — il segnaposto {arg} viene sostituito con ciò che scrivi dopo il comando — e l’agente la esegue chiamando da sé gli strumenti necessari. Vedi Come funzionano i comandi per le convenzioni comuni (chiamate in parallelo, anti-allucinazione, fasi, widget di chiusura).

Strumenti che può usare: resolve_ticker, get_crypto_prices, get_crypto_snapshot, get_stock_prices, get_stock_performance, get_company_news, get_earnings, portfolio_get, render_price_chart, show_ticker_link.

Flusso/visualizzazione: apre con un grafico annotato dei prezzi (render_price_chart); chiude con i pulsanti di dettaglio (show_ticker_link).

È la prompt esatta inviata all’AI quando usi il comando (sostituendo {arg}).

Explain the notable price move(s) of "{arg}" over the requested window and show an annotated chart.
Guard: if "{arg}" is empty or literally "{arg}", respond "Usage: /explain-move PLTR 3m" and stop.
## Parse
Extract TICKER and an optional period (default 3 months). Convert the period to ISO `from`/`to`
dates (`to` = today). If the ticker is a company name, call resolve_ticker first.
## Data Gathering (all in parallel)
If {arg} is a CRYPTO (BTC, ETH, SOL, …): use get_crypto_prices(symbol, interval="day", from..to)
and get_crypto_snapshot instead of the stock tools below, skip get_earnings, and set
assetType="crypto" in the chart. Otherwise (stock/ETF):
- get_stock_prices(interval="day", from..to) → daily closes to locate the moves
- get_stock_performance → 1D/1W/1M/3M/YTD context, 52w range
- get_company_news → headlines that may explain the move(s)
- get_earnings → check whether a move aligns with an earnings date
- portfolio_get → check if the user holds {arg}
## Analyze
Identify the 1-4 most significant moves in the window (largest daily/weekly % changes, gaps,
breakouts/breakdowns). For each, find the most likely cause from news/earnings/macro. Do NOT
invent a cause — if unclear, say "no single clear catalyst".
## Report (chart first)
START by calling **render_price_chart** with: ticker, from, to, interval="day",
assetType ("crypto" for coins, else "stock"), a short `title`, and one `annotation` per identified move — each with its `date` (inside the window),
a concise `label` (e.g. "-14% — Q2 revenue miss"), and the matching `kind`
(drop / spike / event / support / resistance); add a `highlight` band if one period dominates. It
renders the chart at the TOP, before any prose. THEN, below it, open with ONE sentence framing the
window (e.g. "Here's {arg} over the last 3 months — the key moves are marked above:") and, for each
annotated move, give the date, magnitude (%) and the explanation in 1-2 sentences. If distinct
sub-periods each deserve their own chart, make those extra render_price_chart calls UP FRONT too
(all charts before the prose), never mid-text. Close with a one-line read on what the price action
implies. Call **show_ticker_link** as the final action.
Respond in the user's language.