Build a multi-asset allocation
build_allocation_strategyBuild a multi-asset allocation, or rewrite one, and return its weights. Writes.
``strategy_id`` edits that strategy (only one this client owns). An edit replaces
the definition: ``items`` becomes the whole portfolio and omitted caps revert to
unconstrained; ``name`` may be omitted to keep it. Editing one with a track
record rebuilds that history in the background.
``items`` is the portfolio. Each is an instrument (``asset_id``), a strategy
(``strategy_id``, from ``find_portfolios``; its holdings are published first), or
an ``instrument`` of 'broad_equity', 'long_bond' or 'short_bond', resolved to the
client's currency default (see ``get_default_instruments``), so one call works in
any currency and needs no ``asset_class``.
``weight`` pins an item; unpinned items share the rest by risk parity, so a calmer
line weighs more. ``min_weight`` / ``max_weight`` bound an item without
pinning it. With a risk target, a long bond is added if no bond line is listed.
``short_rate_asset_id`` (id from ``find_assets``; default: the currency's) is a
reserve, not a line: held only when the target is below what the lines reach,
and only as much as needed. A short-duration fund listed in ``items`` is a line
instead, and risk parity gives it a large weight because it barely moves.
``risk_level`` targets the 0-10 ladder (anchors 0/1/2/5/8/10, the rest
interpolated); None is static: exactly its pins. ``loss_tolerance`` is a worst month (0.10 = 10%);
with both, the tighter wins.
Caps (None: unconstrained) look through strategy items:
``max_equity_weight`` / ``max_alternative_weight`` total by asset class;
``max_tactical_weight`` totals items tagged ``diversification='narrow'`` (a cap
with no tagged item is rejected); ``max_asset_weight`` / ``max_sector_weight`` /
``max_country_weight`` apply to the underlying equities. These are construction
parameters; no client profile is read.
``history_years`` starts no earlier than the first quarter end after the
youngest strategy item began.
``glide_target_date`` (needs ``risk_level``) glides toward the date the client
names: each rebalance holds the lower of ``risk_level`` and the published horizon
ceiling for the time left (``get_risk_ceiling_for_horizon``), reaching level 2
about a year before the date. ``glide`` is the yearly schedule. A backtest runs
today's level over the whole history.
``signal`` tilts or filters unpinned items at each rebalance on data up to its
observation date; an unscored item counts as average. It carries a client's own
momentum or factor rule; without it, items are sized by risk alone.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"items": "<items>"
},
"name": "build_allocation_strategy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| items | Yes | ||
| signal | No | ||
| backtest | No | ||
| risk_level | No | ||
| strategy_id | No | ||
| history_years | No | ||
| loss_tolerance | No | ||
| max_asset_weight | No | ||
| glide_target_date | No | ||
| max_equity_weight | No | ||
| max_sector_weight | No | ||
| max_country_weight | No | ||
| max_tactical_weight | No | ||
| rebalance_frequency | No | quarterly | |
| short_rate_asset_id | No | ||
| max_alternative_weight | No |