Skills

Portfolio Diagnosis

Health check of the user's own portfolio against their investing profile...

Install

npx skills add ginlix-ai/LangAlpha --skill portfolio-diagnosis -g -a claude-code -y
Repository
ginlix-ai/LangAlpha2.2k
Category
Engineering
Updated
3d ago
License
Apache-2.0
Context cost
Lightabout 1,482 tokens
Runs scripts
No, instructions only

What it does

Health check of the user's own portfolio against their investing profile: concentration, exposure by sector, region and asset class, cash, currency mix, and risk fit (volatility, beta, drawdown), ending in a few next steps. Triggers on diagnose my portfolio, portfolio review, portfolio health check, am I too concentrated, how risky is my portfolio.

Portfolio Diagnosis

A one-minute read of what the user holds, measured against what they told you they want. Every finding carries a number and what that number is compared with. No lecture and no trade calls.

1. Inputs

  • .agents/user/profile/portfolio.json: the holdings. When this turn already read it, use that copy.
  • The ## Investment Profile block in your system prompt: its Risk level, Investor type, Experience, Markets, Wants to trade, Analysis approaches, Investing styles, Holding horizon and Sectors lines. A line may hold an older profile's free text: read what is there. When the block has no line for what you need, an older profile may keep it in a free-text key of .agents/user/profile/preference.json, such as risk_tolerance or holding_period. With no risk level at all, report the risk numbers without a fit verdict.
  • A brokerage in <mcp-servers>: take positions and cash balances from it, unless this turn already fetched them. Its quantities and market values win over the file. If they differ from portfolio.json, say so in one line and offer to re-import. Don't write the file here.
  • No holdings: say the diagnosis needs them and ask for a few positions as ticker and quantity.

2. Compute, in one execute_code call

from tools.yf_price import get_multiple_stocks_history   # 1y daily bars, many symbols
from tools.yf_fundamentals import get_company_info       # sector, country, quoteType, category, currency
from tools.price_data import get_stock_data, get_asset_data  # fallback bars; crypto and forex
Read the whole SKILL.md on GitHub

More in Engineering