create_portfolioCreate a portfolio that runs multiple whole strategies together under one allocation policy.
Area
Portfolios
Group
Portfolios
Access
Write
Risk
May change server state
▸Details
Full description
Details
Create a new portfolio composed of member strategies.
USE WHEN a research project has 2+ validated strategies you want to run together as one allocated book: a portfolio holds whole strategies and applies a cross-strategy allocation / rotation policy. (To combine conditions WITHIN a single strategy, use inline condition_ref composition instead — that is a different level.)
Members contain strategy_id and optional revision_id. Author manual weights only through allocation.construction.weights keyed by strategy_id. An omitted allocation defaults to an equal split for two or more members.
Every member must have one instrument; split baskets into single-instrument members or use the basket allocation instead. All member strategies must belong to 'project_id' — cross-project portfolios are rejected. Without project_id the portfolio joins the members' shared project.
Pass 'allocation' to set a portfolio allocation policy directly. Supports 'trailing_return' member rotation (rank members by their own trailing realized return, hold the top_n, re-rank on a calendar cadence) and 'member_signal_rotation' (rank logic-bearing members by a declared shared_signals value, trimming benched members to zero and topping up held members toward 1/top_n of group NAV, while member logic keeps running its own entries and exits).
Returns the created portfolio_id and full portfolio details.
Capabilities
Bounded options and operating modes surfaced above the full JSON schema.
Required Inputs
membersarray<Member>Member strategy referencesnamestringHuman-readable portfolio nameOptional Inputs
allocationanyOf (2 variants)Optional portfolio allocation policy (cross-member weighting + rebalance + capital model). Manual weights belong in construction.weights; totals below one retain cash. Equal/manual with a calendar rebalance (a when, e.g. {'at': 'open', 'on': {'trading_day': 1, 'of': 'month'}}) or drift requires every member to have no entry, exit, gate, standing-order or position rules, checked again at every run start. Hold-only portfolios use the same rebalancing and pooled funding as baskets. 'trailing_return' member rotation ranks members by their OWN trailing realized return and holds the top_n, re-ranking on a calendar cadence. Shape: {'construction': {'kind': 'trailing_return', 'top_n': 2, 'lookback_bars': 30}, 'rebalance': {'kind': 'calendar', 'when': {'at': 'open', 'on': {'trading_day': 1, 'of': 'week'}}}, 'capital_model': 'partitioned'}. 'member_signal_rotation' ranks logic-bearing members by a declared shared_signals value, trimming benched members toward zero, keeping each held member's own entry/exit logic running, e.g. {'kind': 'member_signal_rotation', 'score_signal': 'momentum', 'top_n': 1} — requires a calendar rebalance and a declared 'shared_signals' entry named 'momentum'. Either rotation deploys like a basket: held members are equal-weighted at 1/top_n of group NAV at each ranking and the book runs ~fully invested — the member still decides when to enter and exit, and its own sizing affects only its first fill; 'min_cash_fraction' is rejected on member rotation. Both member rotations are long-only: enabled short entries are refused on create/update and run submission; remove the short entry or use a static construction. 'construction.kind' may also be 'equal_weight' or 'manual' ({'kind': 'manual', 'weights': {strategy_id: fraction}}), or 'rank_based' with a 'score_signal' (construction-managed rotation — rejects logic-bearing members, unlike 'member_signal_rotation'). 'rank_based' with a raw 'score_ref' / 'signal_proportional' are universe-only and rejected — use 'trailing_return' or 'member_signal_rotation' to rotate members. Optional 'constraints' and 'collection_risk' dicts are accepted; fields the engine does not enforce are rejected fail-closed.project_idanyOf (2 variants)Research project this portfolio belongs to. Every member strategy must already belong to this same project — a portfolio cannot span multiple research projects. Omit it to use the project the members share.shared_signalsarray<SharedSignal>Portfolio-level cross-member shared signals. Each entry is {'name': str, 'source': <market ValueRef>}, e.g. {'name':'mom20','source':{'kind':'indicator','indicator':'ema','period':20}}. Declared once, then referenced inside member entry/exit conditions via {'kind':'shared_signal','name':'mom20'} so a member can gate on its rank / relationship vs sibling members. Source must be a market-derived per-symbol metric (indicator / price / volume); cross-sectional / state / event refs are rejected. Only valid on a 2+ member portfolio. On update_portfolio, omit to preserve the existing shared_signals; pass a list (including []) to replace them.