Salta ai contenuti

/portfolio-review

Cosa fa. Esegue una revisione completa del portafoglio con indicazioni vendi/tieni/ribilancia.

Quando usarlo. Periodicamente, per fare ordine nelle posizioni.

Argomenti. Nessuno.

Esempio. /portfolio-review

Cosa restituisce. Un giudizio per ogni posizione e le azioni prioritarie.

Quando lanci /portfolio-review, 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: memory_search, portfolio_get, get_market_sentiment, get_treasury_yields, get_sector_performance, get_stock_performance, get_future_profile, get_fund_profile, get_key_ratios, get_company_news, get_company_info, get_stock_price, get_technical_indicators, dispatch_agent, memory_update.

Flusso/visualizzazione: salva un appunto in memoria (memory_update); può lanciare sub-agenti di ricerca in parallelo (dispatch_agent).

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

Full portfolio review. Follow this sequence:
## Phase 1 — Context & Memory
1. `memory_search` query: "portfolio goals risk tolerance recent trades rebalancing"
2. `portfolio_get` → load positions, strategy, risk limits, rules.
If empty, inform user and stop.
## Phase 2 — Market Snapshot
3. `get_market_sentiment` (VIX) + `get_treasury_yields` (yield curve)
4. `get_sector_performance` (leading/lagging sectors)
## Phase 3 — Position Analysis
First, identify each position's asset type:
- FUTURE: ticker ends with "=F" (e.g. GC=F, CL=F, ES=F)
- FOREX: ticker ends with "=X" (e.g. EURUSD=X, GBPUSD=X)
- FUND: recognized mutual fund ticker (VFIAX, FXAIX, VTSAX, VBTLX, FZROX, PRGFX, VTIAX)
- INDEX: ticker starts with "^" (e.g. ^GSPC, ^IXIC) — note: indices are not portfolio assets; skip if found
- CRYPTO: obvious crypto symbol (BTC, ETH, SOL, etc.)
- STOCK / ETF: everything else
For FUTURE / FOREX / FUND positions (tools available differ from stocks):
- Call ONLY: `get_stock_performance` (price, % changes — works for all types via shared cache)
- FUTURE: also call `get_future_profile` (category, expiry, underlying) for context
- FUND: also call `get_fund_profile` (AUM, expense_ratio, NAV, returns)
- FOREX: `get_stock_performance` is sufficient (price, daily/weekly changes)
- SKIP: `get_key_ratios` (returns empty for non-stocks), `get_company_news` (no news feed), `get_company_info` (no sector data)
- Classification: use performance data only (no Altman Z, Piotroski, analyst targets — mark as N/A)
- For sector grouping in Phase 4: assign pseudo-sector "Futures", "Forex", or "Funds" respectively
For STOCK / ETF / CRYPTO positions, call in parallel batches:
- `get_stock_price` (current price → unrealized P&L vs avg_price)
- `get_key_ratios` (P/E, margins, ROE, Piotroski, Altman Z, target, 52w range)
- `get_stock_performance` (1D/1W/1M/3M/YTD/1Y, RSI)
- `get_technical_indicators` (RSI 14/7, MACD, SMA 20/50, EMA 12/26)
- `get_company_news` (recent headlines)
Optional fan-out (large portfolios only): when there are many positions, you MAY emit one dispatch_agent (subagent_type="general") per STOCK/ETF/CRYPTO position IN THE SAME TURN — each runs that position's tool batch and returns its classification (SELL/REDUCE/HOLD/ADD) plus the row figures (P&L, RSI, P/E vs target, key signal), keeping per-position raw data out of your context. You still do Phases 4-6 (portfolio-level assessment, rebalancing, memory) yourself from the returned rows. Each sub-agent prompt must be self-contained (ticker, avg cost, the classification rules above). For just a few positions, the parallel direct calls above are better — skip delegation.
Classify each position:
- **SELL** — 2+ red flags: deteriorating fundamentals (Altman Z < 1.8, declining ROE/margins), price >15% above analyst targets, RSI > 70 bearish or price below SMA(50) with high volume, negative news, or risk limit violations (max_position_pct, max_sector_pct).
- **REDUCE** — 1 red flag or overweight position. Suggest trim to stay within limits.
- **HOLD** — stable fundamentals, fair valuation vs target (±10%), RSI 30-70, no strong catalysts.
- **ADD** — Piotroski > 7, ROE > sector, discount vs target >15%, RSI 40-60 recovering, MACD bullish crossover, above SMA(50), positive news.
## Phase 4 — Portfolio Assessment
- **Allocation**: % of each position on total (positions + cash).
- **Sectors**: group by sector, flag > max_sector_pct.
- **Concentration**: flag single positions > max_position_pct.
- **Cash**: flag <5% (no dry powder) or >30% (excessive cash drag).
- **Correlation**: check if too many positions share the same theme.
- **Limits**: check every rule from portfolio_get.
## Phase 5 — Rebalancing Plan
Priority actions:
1. **Urgent**: limit violations, SELL with deteriorating fundamentals
2. **Rebalance**: suggest "Reduce X by Y shares, add Z" or "Trim X from A% to B%". Skip changes under 1% of portfolio (transaction costs > benefit) unless violations.
3. **Watchlist**: HOLD trending toward SELL — set specific trigger prices
4. **Opportunity**: ADD candidates with fundamentals + technicals aligned
## Phase 6 — Memory Persistence
Call `memory_update` TWICE:
- `daily` (append): structured summary with date, classification of each position (SELL/REDUCE/HOLD/ADD) + 1-line reason, and top 3 actions.
Format: "Portfolio Review [YYYY-MM-DD]: AAPL→HOLD (fair value) | TSLA→REDUCE (22% vs 15% limit) | NVDA→SELL (Altman Z 1.2, RSI 78) | Top: 1) Sell NVDA 2) Trim TSLA 3) Watch MSFT"
- `long_term` (append): ONLY new durable facts discovered. Don't repeat existing content.
## Output
### Portfolio Overview
[Total value | Cash % | # positions | Strategy]
### Market Context
[VIX + interpretation | Yield curve | Leading sectors]
### Position Analysis
| Ticker | Classify | P&L | RSI | P/E vs Target | Key Signal |
[one row per position]
### Risk & Allocation
[Sectors | Limits | Cash | Violations]
### Action Plan
1. [Urgent] ...
2. [Rebalance] ...
3. [Watch] ...
4. [Opportunity] ...
### Memory Updated
[Confirm what was saved]