Sharpe Ratio Optimizer
Find the portfolio weights that maximise risk-adjusted return
PORTFOLIO OPTIMISATION
What is the Sharpe Ratio?
It answers one question: how much return are you getting for the risk you're taking? A Sharpe of 1.0 means you're earning 1% of excess return for every 1% of volatility. Above 1.0 is good. Above 2.0 is exceptional. Below 0 means you'd be better off in a risk-free savings account.
Sharpe = (Portfolio Return − Risk-Free Rate) / Portfolio Volatility
Optimisation goal: find weights w₁…wₙ that maximise this ratio
Subject to: Σwᵢ = 1, wᵢ ≥ 0 (no short selling)
What does the optimizer actually do?
It runs thousands of random weight combinations and finds the one that produces the highest Sharpe Ratio. The result is the Maximum Sharpe Portfolio — also called the Tangency Portfolio, because it sits at the point where a line from the risk-free rate is tangent to the efficient frontier. Every other portfolio on the frontier is either taking more risk than necessary or earning less return than possible.
Assets — enter expected annual return and annual volatility
Risk-Free Rate
4.3%
Simulations
5,000
Max Sharpe Ratio
risk-adjusted return
Expected Return
optimal portfolio
Portfolio Volatility
annualised σ
Equal Weight Sharpe
naive benchmark
Improvement
vs equal weight
Sharpe Ratio
< 0
Poor — worse than cash
0 – 1
Acceptable — below average
1 – 2
Good — solid risk-adjusted
> 2
Exceptional — rare in practice
How to read it: The needle sweeps from −1 (left) to 3+ (right). Most real-world diversified portfolios land between 0.5 and 1.5. Hedge funds target above 1.0. Above 2.0 is considered exceptional — and often unsustainable.
Efficient Frontier — simulated portfolios
Each dot is one simulated portfolio. Colour = Sharpe Ratio (purple = high, dim = low). The star ★ is the Maximum Sharpe Portfolio — the best risk-adjusted point on the frontier.
Optimal Weights — Maximum Sharpe Portfolio
These are the weights the optimizer found. Compare with equal weight (dashed line) to see what the optimizer overweights and underweights.
Asset breakdown — optimal vs equal weight
Asset Exp. Return Volatility Sharpe (solo) Equal Weight Optimal Weight Allocation vs Equal Weight Return Contribution