analyze_portfolio
Analyzes portfolio transactions or holdings: invested capital, value, absolute/TWR returns, eligible single-deposit CAGR, sub-portfolio allocation, and FX conversion. CAGR is null with a reason after multiple contributions or withdrawals. Use to analyze actual portfolio ledgers or current holdings and valuation data. Require real transactions/holdings and a current valuation for each holding; require FX rates where currencies differ. TWR needs a valuation immediately before each later external cash flow and at the end date; report null with its reason when absent. Equal and opposite same-day movements between sleeves in the base currency net to an internal transfer for combined TWR; confirm both legs before using that treatment. Missing acquisition cost may use the disclosed performance-from-today behavior. Never create transactions or holdings records.
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": {
"baseCurrency": "<baseCurrency>",
"subPortfolios": "<subPortfolios>"
},
"name": "analyze_portfolio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asOfDate | No | Optional ISO date (YYYY-MM-DD) used as the CAGR end date. Defaults to today. | |
| baseCurrency | Yes | Reporting currency (e.g. EUR). Transactions in another currency require fxRate. | |
| portfolioName | No | Optional label for the portfolio. | |
| subPortfolios | Yes | One entry per account, broker or strategy sleeve. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cagr | No | ||
| series | No | ||
| totalGain | No | ||
| assumptions | No | ||
| baseCurrency | No | ||
| currentValue | No | ||
| portfolioName | No | ||
| subPortfolios | No | ||
| totalInvested | No | ||
| absoluteReturn | No | ||
| firstDepositDate | No | ||
| timeWeightedReturn | No | ||
| totalInitialInvested | No | ||
| twrUnavailableReason | No | ||
| cagrUnavailableReason | No |