Analyze portfolio allocation and concentration
analyze_allocationCalculate portfolio allocation weights, concentration (HHI, effective holdings), and sector grouping from NSE classifications. Optionally compare to a target to reveal drift.
Instructions
Compute allocation weights and concentration (HHI, effective holdings count) over a list of positions. Deterministic — computed in code, not estimated. Grouping by sector uses NSE's published macro-economic classification looked up by ISIN or symbol, not a sector you supply; instruments outside that index are reported as Unclassified and counted rather than guessed at. Optionally compare against a target allocation to show drift.
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": {
"positions": "<positions>"
},
"name": "analyze_allocation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Optional target weights, e.g. {"Financials": 30, "IT": 20} | |
| groupBy | No | symbol | |
| positions | Yes |