← SkillSafe / Portfolio Optimizer
Free · runs in your browser

Portfolio optimizer

Load prices or returns, or type your own assumptions. Get the efficient frontier and six ways to weight the portfolio under your limits, then see which holdings carry the risk.

See an example:

Limits
Limits for single assets

Leave blank to use the limits above.

AssetMin %Max %

Not investment advice. Results are only as good as the inputs: past returns are a noisy guide to future ones.

Nothing to optimize yet

Pick an example above, drop in a CSV, or switch to Enter assumptions.

How it works
  • Inputs. From data, returns are simple period returns (prices are converted), annualised by the frequency: mean × periods a year, covariance × periods a year. Shrinkage uses Ledoit and Wolf (2004) toward a scaled identity, which helps when you have few periods for many assets. From assumptions, the covariance is volatility × correlation × volatility; an inconsistent correlation matrix is replaced by the nearest valid one, and you are told.
  • Frontier, min variance, max Sharpe. Each frontier point is the exact minimum-variance portfolio for its target return under your limits, solved by an active-set quadratic program. Max Sharpe searches the frontier for the highest (return − risk-free) / volatility.
  • Risk parity gives every holding the same share of portfolio volatility. HRP (López de Prado, 2016) clusters assets by correlation and splits weight down the tree by inverse variance. Inverse volatility and equal weight are the plain baselines. These four are long-only by design; your limits are then applied by capping and handing the excess to the other holdings.
  • Risk contribution is weight × marginal risk; the contributions add up to the portfolio volatility. Normal CVaR is the average one-year loss in the worst (1 − confidence) of outcomes if returns were normal. Historical CVaR (data only) is the average of your worst periods, per period.
  • The optimizer was checked against a separate implementation that enumerates every active set, to 1e-8.