get_portfolio_analytics
Retrieve historical portfolio analytics: Sharpe ratio, volatility, expected return, max drawdown, and market beta vs SPY. Supports 1W to 5Y timeframes and optional factor return attribution.
Instructions
Get historical portfolio analytics: Sharpe ratio, volatility, expected return, max drawdown, and market beta (benchmarked vs SPY). Supports timeframes: 1W, 1M, 1Y, 2Y, 5Y. This is backward-looking — for forward-looking risk, use compute_returns or test_flow_risk. NEW: Pass model_group_id to also get factor return attribution — shows which factors (VIX, rates, oil, etc.) drove your portfolio returns over the period. Requires compute_betas to have been run first via analyze_quantitative.
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": {
"portfolio_id": "<portfolio_id>"
},
"name": "get_portfolio_analytics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rollup | No | Attribution period: 'daily', 'weekly', 'monthly' (default 'daily') | daily |
| timeframe | No | Timeframe: 1W, 1M, 1Y, 2Y, or 5Y (default 1Y) | 1Y |
| portfolio_id | Yes | The portfolio UUID | |
| model_group_id | No | Model group ID for factor return attribution. From analyze_quantitative or list_model_groups. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |