analyze_portfolio
Analyze an asset-allocation ('lazy') portfolio and get long-run performance computed from real monthly price history (proxy-extended for decades of data), not estimated: CAGR, max drawdown, volatility, Sharpe, Sortino, Ulcer index, $10,000 growth, the number of independent bets (holdings whose returns average a correlation of 0.5 or more count as one group, then the effective count of groups by risk share), the top risk driver, trailing Sharpe, and a validity block (provenance, caveats, a reproduce-me hash) plus a cite block with the marketheist.io pages that show the same numbers. Use it for 'how did 60/40 / All Weather / Golden Butterfly perform' or for a custom mix. Provide exactly one of: a template id (19 model portfolios, listed in list_portfolios), a strategy id (7 rule-based canonical strategies, e.g. dual-momentum-gem) or a custom assets allocation (plain tickers and nested portfolios, rotations, strategies as holdings via sleeve). Template and strategy ids are answered from precomputed data through the stated month (instant, not rate-limited); custom assets and an overlay are computed live from market data. For seasonality and calendar years use portfolio_returns; for drawdown episodes and diversification use portfolio_risk; to compare portfolios use compare_portfolios. Read-only; surface the caveats when reporting.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | No | Optional display name for a custom `assets` portfolio. Default "Custom portfolio". | |
| assets | No | Custom allocation (omit if using `template` or `strategy`). Weights are percentages summing to ~100. A holding is a plain ticker OR a strategy node via `sleeve`. | |
| overlay | No | Optional portfolio-level trend-filter overlay applied to the WHOLE book: hold the entire portfolio only while its own level is above its N-month moving average, otherwise cash. Composition is monthly (a 10-month filter ≈ the classic 200-day one). | |
| strategy | No | Canonical rule-based strategy to analyze. One of: dual-momentum-gem, tsmom-sp500, faber-trend-timing, sector-momentum-rotation, risk-parity-inverse-vol, gtaa-aggressive, adaptive-asset-allocation. Answered from precomputed data. Omit when using `template` or `assets`. | |
| template | No | Built-in model portfolio to analyze. One of: golden-butterfly, all-weather, permanent, dragon, faber-ivy, faber-gaa, bogleheads-3fund, wealthfront-classic, betterment-core, classic-60-40, classic-40-60, swensen, ferri-core-four, couch-potato, coffeehouse, no-brainer, larry, buffett-90-10, total-sp500. Omit to analyze a custom `assets` allocation instead. | |
| rebalance | No | Rebalancing cadence for custom portfolios (templates use their own). | yearly |