You're viewing a demo portfolio

Join the waitlist
PRSM

portfolio-rebalance

Active

Tool of The Stall

declared in 4.82.0

Pure-math portfolio rebalancing calculator. Given current holdings (asset names and their current USD values) and target allocations (percentages summing to 100), returns the exact buy/sell dollar amounts needed to reach target weights. Handles partial rebalancing with a drift threshold. No external API — deterministic and instant. Useful for DeFi agents, robo-advisory flows, and automated rebalancing triggers.

Parameters schema

{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "targets": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Target allocation percentages. Must sum to 100."
    },
    "holdings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Current portfolio positions."
    },
    "cash_injection": {
      "type": "number",
      "description": "Optional additional cash (USD) to deploy during rebalancing (positive = buying, negative = withdrawing)."
    },
    "drift_threshold_pct": {
      "type": "number",
      "description": "Minimum drift percentage before an asset is flagged as needing rebalance (default 1.0). Positions within threshold are marked 'in_range'."
    }
  },
  "additionalProperties": false
}

What this tool wraps· 1 endpoint

min confidence0.700.50

Parent server

The Stall

1/7 registries
View full server →
portfolio-rebalance — The Stall — PRSM MCP