Direct Answer

A constrained weight optimizer computes the portfolio weights that maximize the Sharpe ratio or minimize variance across up to six assets while respecting the minimum and maximum weight bounds you set for each position. It uses the expected returns, volatilities, and correlations you enter to solve for the optimal allocation subject to those constraints, then displays the resulting weights and portfolio statistics. This tool runs entirely in your browser for illustrative planning, not investment advice.

By Swoopr Editorial Team

Published · Updated

AI-assisted content · Swoopr Investment is responsible for the final published article.

Constrained Weight Optimizer

Enter expected returns, volatilities, and correlations for up to 6 assets, then set minimum and maximum weight bounds for each. Choose to maximize the Sharpe ratio or minimize portfolio variance. The optimizer computes and displays the constrained optimal weights, portfolio statistics, and a breakdown by asset.

Tool Inputs

Assets & Constraints

For each asset, enter expected return (%), volatility (%), and optional min/max weight bounds. Leave min blank for 0%, max blank for 100%.

Pairwise Correlations

Optimal Portfolio

Click "Compute Optimal Weights" to see results.

Comparison: Constrained vs. Unconstrained

Results will appear here after computing.

How Constraints Work

References

Educational Disclaimer

This tool is for educational and illustrative purposes only. Optimization outputs are highly sensitive to expected return assumptions, which are inherently uncertain. The optimizer uses projected gradient descent on the box-constrained simplex, a numerical method that stops after a fixed number of steps, so results are approximations rather than exact solutions. This tool does not constitute investment advice.

Swoopr Editorial Team produces independent investment education and research content.

Corrections: corrections policy. Standards: editorial standards.