Portfolio

Portfolio rebalancing (drift, trades, tax-aware contributions-first)

Given holdings and target weights, computes the trades that restore the targets, the per-holding drift, and whether each holding is outside a tolerance band. Contributions and withdrawals scale the investable base first. When tax_aware is set, it estimates the realized gain of a full rebalance and — if there's new cash and no withdrawal — a contributions-first plan that directs the cash to underweight holdings without selling (the tax-efficient way to rebalance a taxable account). Target weights must sum to 1. Deterministic; not investment advice.

post/v1/portfolio/rebalance

Request

  • Base URL: https://api.numeratica.com
  • URL: https://api.numeratica.com/v1/portfolio/rebalance
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Request body

new_contributionnumber

Cash added before rebalancing.

withdrawalnumber

Cash raised before rebalancing.

bandnumber

Per-holding drift tolerance; 0 flags any nonzero trade.

tax_awareboolean

Adds the realized-gain estimate and the contributions-first plan.

Response

The rebalancing plan

result_idstring
engine_versionstring
disclaimerstring

Example response

{
  "result_id": "rebalance_1a2b3c4d5e6f7a8b",
  "engine_version": "rebalance-1.0.0"
}

Changes

No recorded changes to this operation across all 1 revision of this API.