Portfolio Optimizer Tool is a web-based application designed to help investors rebalance their portfolios. Unlike traditional calculators that give you one answer, this tool generates multiple rebalancing scenarios using different strategies, allowing you to choose the approach that best fits your situation.
The optimizer analyzes your current portfolio positions and provides optimized scenarios that respect your constraints while achieving your target asset allocation. It handles everything from simple rebalancing to complex situations involving cash deployment, position restrictions, and lot size requirements.
Rather than giving you just one "correct" answer, the optimizer generates multiple rebalancing scenarios using different strategies. This lets you review various approaches and choose the one that best fits your situation. The process follows three steps:
First, the optimizer analyzes your current state and determines where you need to be:
The optimizer generates scenarios using five distinct strategies, each with different priorities and trade-offs:
Fills all gaps proportionally to get as close as possible to perfect allocation. Best when you have sufficient cash to deploy.
Prioritizes fixing the biggest imbalances in dollar terms first. Best for quickly addressing major portfolio imbalances.
Prioritizes positions with the worst percentage deviations from target, regardless of dollar size. Best for ensuring smaller positions get attention.
Makes partial moves across multiple rounds for conservative rebalancing. Best when you want to move gradually toward targets.
Uses controlled randomness to explore alternative solutions. Best for finding creative approaches that deterministic strategies might miss.
Each scenario is evaluated using a combined score that balances two objectives:
Portfolio Deviation — How far the final portfolio is from perfect allocation, measured as the sum of percentage differences from your target allocations. A perfect allocation scores 0.0.
Cash Deviation — How close you get to your target cash level, normalized to be comparable with portfolio deviation. Ensures you hit your cash goals whether deploying or raising funds.
The scenarios are ranked by their combined score (lower is better), with duplicates removed. The best options are presented first, but you maintain full control over which scenario to implement.
All scenarios respect your constraints to ensure realistic, executable trades:
Understanding the capabilities and limitations of the optimizer helps you use it effectively:
The optimizer is purely allocation-focused, providing you with optimal trade recommendations that you can execute through your broker.
Start by entering your current portfolio positions. For each holding, provide the ticker symbol (e.g., AAPL, MSFT, BTC), the number of shares or units you currently own, the current market price, and your target allocation percentage. Make sure your target allocations sum to exactly 100%.
Specify your current cash available for trading and your target cash level after rebalancing. The difference tells the optimizer whether you're deploying cash (current > target), raising cash (target > current), or rebalancing without net cash flow (equal amounts).
Set default constraints that apply to all positions: minimum order size (lot size), minimum order value, and whether buying or selling is allowed. You can also expand individual positions to set custom constraints for specific assets—useful for restricted stock, tax considerations, or strategic holds.
Click the Optimize button and complete the bot verification (first time only). The optimizer will generate multiple scenarios using different strategies. Review the recommended trades for each scenario, check the quality scores, and choose the approach that best fits your needs.
Use the Save button to download your portfolio configuration as a JSON file. You can load it later using the Load button for quick access to your settings without re-entering everything.
After optimization, you'll see multiple scenarios ranked by their combined score. Each scenario includes detailed metrics to help you evaluate and compare options:
Combined Score — The overall quality metric (lower is better). This balances allocation accuracy with cash target achievement. The minimum possible score is 0.0, representing a perfect result.
Input Deviation vs. Final Deviation — Shows how far you started from target allocation and how close you'll get after implementing the trades. Both range from 0.0 (perfect) upward. A large improvement indicates an effective rebalancing.
Cash Yield — The net cash change from all trades. Positive means you gained cash from selling, negative means you spent cash buying. This helps you understand the cash impact of the scenario.
Cash Deviation — How far the final cash level is from your target. Lower is better. This ensures you're meeting your cash goals, whether deploying funds or raising cash for expenses.
Position Changes — For each asset, you'll see the number of shares to buy (positive) or sell (negative), along with initial and final weights. This gives you the exact trades to execute.
The top-ranked scenario isn't always the only good choice. Here's what to consider:
No Investment Advice — This tool does not provide investment, financial, or legal advice. It is purely a computational tool that performs mathematical calculations based on your inputs.
No Accuracy Guarantee — Results are based entirely on the inputs you provide. The author makes no guarantees about the accuracy, completeness, or reliability of the optimization results. Always verify outputs before executing any trades.
Market Considerations — The tool uses static prices and doesn't account for market volatility, slippage, trading hours, liquidity constraints, bid-ask spreads, or other real-world market conditions that can significantly impact trade execution.
No Liability — The author and publisher assume no liability for any financial losses, damages, or adverse outcomes resulting from the use of this tool. All investment decisions are your responsibility.
User Responsibility — You are solely responsible for verifying all outputs, understanding the implications of any trades, ensuring compliance with applicable laws and regulations, and consulting with qualified professionals before making investment decisions.
Tax and Regulatory Compliance — This tool does not consider tax implications (capital gains, wash sales, etc.), regulatory requirements, account-specific restrictions, or individual financial circumstances. Always consult appropriate tax and financial professionals.
Your privacy is important. This tool is designed with privacy in mind:
For more details, see our Privacy Policy.