optimize_portfolio_default
Build a risk-optimized portfolio from a list of tickers — fast, synchronous, no LLM.
THE DEFAULT optimizer route. Returns the result directly and almost instantly
(no task id, no polling). Reach for `optimize_portfolio` instead only when you
explicitly want the slower LLM-curated variant layered on top of the optimizers.
Symbols are validated against the covered universe; unsupported tickers come back
in `missing`, and in-universe tickers with too little price history come back in
`dropped`.
No auth required (public endpoint).
Synchronous. Returns:
{"status": "OK", # or "SKIPPED"/"EMPTY" when too few usable symbols remain
"holdings": [{"symbol", "source_strategies", "summary", "conviction_level"}, ...],
"optimizer_results": {"mvo": {...weights+diagnostics}, "hrp": {...}, "mcvar": {...}},
"risk_profiles": {"profiles": [...], "recommended": "..."}, # present only when status == "OK"
"dropped": [...], # in-universe but insufficient price history
"missing": [...]} # not in the covered universe
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbols | Yes | Tickers to optimize, e.g. ["AAPL", "MSFT", "JNJ"] (see list_options("tickers")). | |
| risk_tolerance | No | Which risk profile is marked as recommended; omit for the optimizer default. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why the run was SKIPPED. | |
| status | Yes | OK, or SKIPPED / EMPTY when too few usable symbols remain. | |
| dropped | No | In-universe tickers with insufficient price history. | |
| missing | No | Tickers not in the covered universe. | |
| holdings | No | The usable holdings that were optimized. | |
| max_weight | No | Per-name weight cap the optimizers applied. | |
| risk_profiles | No | {profiles: [{risk_profile, method, description, diagnostics, allocation}], recommended}; present only when status is OK. | |
| optimizer_results | No | Per optimizer (mvo, hrp, mcvar): weights plus diagnostics. Empty unless OK. | |
| lookback_trading_days | No |