rebalance_plan
Calculate what to buy or sell to return a portfolio to its target allocation, including whole-lot amounts and reasons; no orders are placed.
Instructions
Compute a rebalance list against the target allocation in strategy.md: what to BUY / SELL, how much, in whole lots, and why. Only produces the list, places no order — the human executes. No LLM call.
Use when the user asks "do I need to rebalance", "how far am I from my
target allocation" or "what should I buy/sell to get back on target".
Per-asset targets come from target_assets[].target_pct in strategy.md;
assets without one split target_allocation_stock equally
(target_source: "equal_split"). Lot sizes: A-shares 100, convertible
bonds 10, off-exchange funds by amount, HK/others 1 (HK lot size is
unknown — see lot_note).
Args: mode: "cash_only" | "sell_to_rebalance" | "hybrid" (default). band_pct: Drift band in percentage points, default 5.
Returns:
rows (per target asset: current_pct / target_pct / drift_pct /
action BUY|SELL|NONE / amount in base currency / units / reason),
totals (cash_after, turnover, n_trades), unmanaged holdings,
warnings; or {"status": "error", "error": ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | cash_only: buy underweights with cash above the target cash ratio, never sell. hybrid (default): use that cash first, sell overweights only to cover the shortfall. sell_to_rebalance: sell every overweight back to target and buy underweights with the proceeds plus spare cash. | hybrid |
| band_pct | No | Drift band in percentage points (default 5): holdings within ±band of target are left alone. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |