rebalance_portfolio
Rebalance a multi-currency portfolio: given holdings, per-holding (or per-asset-class) target weights, cash and FX rates, return the exact BUY/SELL trades to reach the targets, the per-currency cash movements (flagging foreign-cash overdrafts), and a summary. It is the same plan the RetireCrunch Portfolio Rebalancer page makes: class goals drive holdings (locked holdings stay put, target_mode "custom" holdings keep their target_pct, the rest share the class goal pro-rata to value), with an optional buy-only mode, tolerance band and new money. The verdict says why there are trades or none (onTarget, locked, belowMinimum, …). Planning math only — no transaction costs or taxes.
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": {
"holdings": "<holdings>"
},
"name": "rebalance_portfolio"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "rebalance" (default): buy and sell to reach the targets. "buyOnly": never sell; spend only the cash above the cash target, spread evenly over the under-weight holdings. | rebalance |
| fx_rates | No | Value of 1 unit of each currency in the base currency (base currency itself is 1). | |
| holdings | Yes | The portfolio holdings to rebalance. | |
| new_money | No | New money to invest, in base_currency (default 0). Added to base-currency cash before the plan is made. | |
| base_currency | No | Base currency the portfolio is valued in. | USD |
| class_targets | No | Optional per-asset-class goal % of the whole portfolio (incl. "Cash"). Inside a class with a goal, locked holdings stay put, target_mode "custom" holdings keep their target_pct, and the rest share what is left pro-rata to current value. Classes without a goal trade to their holdings' own target_pct. | |
| tolerance_pts | No | Tolerance band in percentage points (default 0). A class within this many points of its goal is not traded. Needs class_targets. | |
| available_cash | No | Cash held per currency, keyed by ISO code. |