Plan a rebalance
plan_rebalanceCompare holdings to target allocation and generate sells, buys, and full exits to close the gap, reporting sells first and flagging when buys exceed available cash.
Instructions
Compare current holdings against a target allocation and produce the buys, sells and full exits that close the gap. Compares market value, not share count, so a name that has re-rated shows as overweight. Sells are reported before buys because the proceeds fund them, and the plan says explicitly when the buys are not fundable from cash plus proceeds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targets | Yes | ||
| holdings | Yes | ||
| availableCash | No | Uninvested cash, folded into the portfolio value. | |
| minTradeValue | No | Suppress orders whose notional is below this. | |
| driftTolerance | No | Ignore drift below this fraction of target. Exits are never suppressed by it. | |
| allowFractionalShares | No |