analyze_portfolio
Compute total invested, current value, P&L, XIRR, sector concentration, risk flags, and diversification score for a portfolio of holdings.
Instructions
Portfolio X-ray: deep risk + return analysis for your holdings.
Input format — list of holdings: [ {"symbol": "RELIANCE", "qty": 10, "avg_price": 2400, "buy_date": "2024-01-15"}, {"symbol": "TCS", "qty": 5, "avg_price": 3800} ]
Returns:
total invested, current value, P&L, P&L %
XIRR (if buy_date provided)
per-holding breakdown with sector
sector concentration % (flags if > 40% in one sector)
risk flags: pledged promoters, single stock > 30%, FII reducing
diversification score (0–100)
Args: holdings: list of {symbol, qty, avg_price, buy_date (optional)}
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"holdings": "<holdings>"
},
"name": "analyze_portfolio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| holdings | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |