What If Rebalance API

The What If Rebalance API allows you to preview and analyze portfolio rebalancing scenarios before actually executing them. Get comprehensive risk metrics, expected returns, volatility analysis, and correlation data for proposed allocations.

Endpoint

POST /user/portfolios/{portfolioId}/rebalance/whatIf

Authentication

All requests require the IdToken obtained from the authentication flow:

Authorization: Bearer <ID_TOKEN>

Path Parameters

ParameterTypeRequiredDescription
portfolioIdstringYesPortfolio identifier

Request Format

FieldTypeRequiredDescription
allocationsobjectYesObject with ticker symbols as keys and allocation percentages as values

Allocation Details:

  • Key: Ticker symbol (e.g., "AAPL", "MSFT")
  • Value: Target allocation percentage (0-100)
  • Total: Must be ≤ 100 (cash fills remaining)
  • Support: Only supports fractionable tickers

Response Format

FieldTypeDescription
messagestringConfirmation message
summaryobjectPortfolio-level risk metrics and performance summary
tickersarrayPer-ticker analysis with individual metrics
correlationobjectPairwise correlation matrix between all holdings

Summary Metrics:

  • expectedAnnualReturn - Expected annual return in percentage
  • annualVolatility - Standard deviation of returns in percentage
  • sharpeRatio - Risk-adjusted return ratio (higher is better)
  • sortinoRatio - Downside risk-adjusted return (only penalizes negative volatility)
  • maxDrawdown - Maximum peak-to-trough decline in percentage
  • beta - Market correlation relative to SPY benchmark
  • treynorRatio - Return per unit of systematic risk
  • var95Daily - Value at Risk at 95% confidence
  • cvar95Daily - Expected loss if it exceeds VaR threshold
  • tailRatio - Ratio of upside to downside volatility
  • diversificationRatio - Diversification benefit measure
  • effectiveHoldings - Effective number of independent holdings
  • hhi - Herfindahl-Hirschman Index (concentration measure)
  • cashAllocation - Percentage of portfolio in cash
  • dataPoints - Number of trading days used in analysis
  • riskC - Risk score on 0-10 scale

Request

Response

Error Responses

More in PiTrade Client APIs

Was this page helpful?

PiTrade

PiTrade gives investors in over 190 countries access to the U.S. stock market through real, transparent portfolios you can build yourself or invest in Strategizer Portfolios. As an SEC-registered investment adviser, powered by Interactive Brokers, PiTrade makes investing more transparent and accessible.

This content is provided for informational purposes only and is not intended as and may not be relied on in any manner as investment advice, a recommendation of any interest in any security offered herein. All investments involve risk, including the possible loss of principal. Past performance does not guarantee future results, and investors should consider their own investment goals, risk tolerance, and financial situation before investing. The information contained herein is subject to change.

The platform "PiTrade" is operated by Pioneer Advisory LLC, a subsidiary of Pioneer Investing Inc. which holds ownership rights related hereto.

Advisory services are provided by Pioneer Advisory LLC, an SEC-registered investment adviser.

Brokerage and clearing services are provided by Interactive Brokers LLC, a SEC-registered broker-dealer, member FINRA/SIPC, to retail customers for US-listed, registered securities and ETFs on a self-directed basis.

The registrations and memberships above in no way imply that the SEC, FINRA, or SIPC has endorsed the entities, products or services discussed herein.

Interactive Brokers LLC is a registered Broker-Dealer, Futures Commission Merchant and Forex Dealer Member, regulated by the U.S. Securities and Exchange Commission (SEC), the Commodity Futures Trading Commission (CFTC) and the National Futures Association (NFA), and is a member of the Financial Industry Regulatory Authority (FINRA) and several other self-regulatory organizations. Interactive Brokers does not endorse or recommend any introducing brokers, third-party financial advisors or hedge funds, including Pioneer Advisory LLC. Interactive Brokers provides execution and clearing services to customers. None of the information contained herein constitutes a recommendation, offer, or solicitation of an offer by Interactive Brokers to buy, sell or hold any security, financial product or instrument or to engage in any specific investment strategy. Interactive Brokers makes no representation, and assumes no liability to the accuracy or completeness of the information provided on this website.

For more information regarding Interactive Brokers, please visit www.interactivebrokers.com

© 2026 Pioneer Investing Inc. All Rights Reserved.