create_portfolio
Create a portfolio from tickers using equal or custom weights, with auto-ingestion for unknown symbols and support for portfolios up to 1,000 assets.
Instructions
Create a new portfolio from tickers. Two payload shapes:
• Explicit weights: pass tickers AND weights (parallel arrays, weights must sum to 1.0).
• Equal weight: pass tickers only with equal_weight=True — server applies 1/N each.
Use equal_weight=True for ANY portfolio over ~50 assets. The parallel-array shape blows past LLM tool-call output budgets around 60-100 entries: one array gets truncated mid-generation and you'll see 'tickers and weights must have the same length' even though you generated them at the same size. A 500-ticker single-list call is ~10× smaller and reliable.
For CSV-paste / large-portfolio flows: combine equal_weight=True with auto_add=True to have the server auto-ingest unknown tickers via Yahoo Finance, and skip_missing=True to drop the ones yfinance rejects. The result includes import_summary with added_from_catalog / newly_ingested / dropped (with reasons) — report all three counts back to the user.
Size: up to ~1000 assets per portfolio (tier limit is 999,999 — effectively unbounded). If a user asks for a 500-asset or 1000-asset portfolio, build it. Do not refuse, do not lecture about 'focused portfolios', do not suggest ETF buckets unless the user explicitly asks for construction advice. Large portfolios are a supported, intentional product surface (F=1000 FLOW models train in minutes on GPU; analytics stay fast via precomputed bands + virtualized UIs).
Non-USD tickers are accepted — their prices are auto-translated to USD and the FX pair is fetched on-demand by add_feature. Resulting returns are USD-denominated and reflect the same FX exposure the underlying stock carries; do NOT warn the user about a 'currency mismatch' against a USD-quoted equivalent (DR/ADR/ETF/fund) — the exposure is economically the same.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Portfolio name (e.g. 'Tech Portfolio') | |
| capital | No | Total capital allocation in USD (default $100,000) | |
| tickers | Yes | Ticker symbols (e.g. ['AAPL', 'MSFT', 'NVDA']) | |
| weights | No | Corresponding weights summing to 1.0 (e.g. [0.4, 0.3, 0.3]). Omit (or pass null) together with equal_weight=True to apply 1/N each — required for portfolios over ~50 assets to avoid LLM tool-call output truncation. | |
| auto_add | No | Auto-ingest unknown tickers via Yahoo Finance before classifying as missing. Use with CSV-paste flows. | |
| description | No | Optional description | |
| equal_weight | No | If true, server applies 1/N weight to each ticker (mutually exclusive with `weights`). | |
| skip_missing | No | Drop tickers that aren't in the catalog (and aren't ingested by auto_add) instead of failing the call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |