analyze_portfolio
Analyses an investment portfolio from its transaction history: net invested capital, current value, absolute return, chain-linked time-weighted return (TWR), CAGR on initial invested capital, per-sub-portfolio breakdown and allocation shares, with multi-currency support via per-transaction FX rates. 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.
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 |