Get portfolio analytics
get_portfolio_analyticsAnalyze portfolio risk, diversification, concentration, exposures, correlations, and stress scenarios, or test a candidate stock/ETF as a diversifier using a portfolio ID from list_portfolios.
Instructions
Analyze the signed-in user's portfolio risk, diversification, concentration or a candidate stock/ETF. Returns correlation/covariance, risk contributions, country/sector/currency exposures, proxy factors and stress scenarios. Use portfolioId from list_portfolios; use get_portfolio_context instead for holdings/value and matched/unmatched coverage. Set candidateTicker for correlation and pro-forma volatility; add includeLookThrough=true for direct/ETF underlying overlap in lookThroughFit with separate coverage/warnings. Look-through uses priced positions, independently of the risk-history subset; partial ETF snapshots give a lower bound. Risk math excludes holdings without sufficient price history and renormalizes over those analyzed: report the leading coverage banner and never imply whole-portfolio coverage when holdings were excluded. Requires OAuth read:portfolios and reads only the caller's data. privacyMode=weights_only hides absolute USD amounts; full is the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Calendar-day lookback for daily USD return analytics. Default 370. | |
| portfolioId | Yes | The portfolio id, as returned by list_portfolios. | |
| privacyMode | No | "full" (default) includes absolute USD amounts; "weights_only" returns only relative figures. | |
| candidateTicker | No | Optional exact Bullrun stock or ETF listing ticker to test as a candidate diversifier, e.g. AAPL, BMW, ABBN, NESN or SPY. Use the stored listing ticker; do not infer exchange suffixes. | |
| candidateWeightPct | No | Optional hypothetical candidate allocation for pro-forma volatility. Default 5 (%). | |
| includeLookThrough | No | Also compare an exact stock or ETF candidate against direct holdings and stored ETF constituents. Requires candidateTicker. Default false: no underlying holdings requests. Look-through has separate priced-position coverage from price-history risk analytics. |