Efficient Frontier Portfolio Optimizer
Paste monthly returns or prices, or type your own estimates, and see which mixes of the assets give the lowest risk for each level of expected return.
Berjalan dalam pelayar anda. Fail anda tidak pernah meninggalkan peranti. Lihat cara menyemaknya
…
Cara melakukannya
- 1Choose the input
Returns or prices from history, or your own estimates.
- 2Load the data
Paste from a spreadsheet, import a CSV or open a sample.
- 3Set the options
Periods per year, risk-free rate, number of frontier points and short selling.
- 4Read the key portfolios
Minimum variance and maximum Sharpe return, volatility and weights.
- 5Explore the frontier
Move the slider or tap a point to see its weights on the chart.
- 6Export
Download the frontier CSV or the chart, or print the report with the steps.
Tentang alat ini
Harry Markowitz showed in 1952 that the risk of a portfolio depends not only on the risk of each holding but on how the holdings move together. Two assets that do not rise and fall at the same time can be combined into a portfolio that is less volatile than either one. Mean-variance optimisation turns that idea into numbers: for every target expected return there is one mix of the assets with the lowest possible volatility, and the curve those mixes trace on a risk and return chart is the efficient frontier. Its left tip is the global minimum-variance portfolio. If you add a risk-free asset, the best risky portfolio to hold is the one where a line from the risk-free rate just touches the frontier, which is the portfolio with the highest Sharpe ratio. This optimizer does the whole calculation in your browser. You can paste a table of returns or prices from a spreadsheet, import a CSV, or skip history and type expected returns, volatilities and correlations directly. It annualises the inputs, shows the covariance and correlation matrices, solves the frontier exactly with or without short selling, and draws the frontier with the individual assets, a cloud of random portfolios and the capital allocation line, so you can see the trade-off rather than just read the answer.
How the frontier is solved
Portfolio return is the weighted average of the expected returns, and portfolio variance is w′Σw, the weights times the covariance matrix times the weights. For each target return the tool minimises variance subject to the weights adding to 100% and hitting the target, using Lagrange multipliers. When short selling is not allowed, it solves that problem on every subset of the assets and keeps the lowest-risk answer with no negative weight, which is exact for up to ten assets. The maximum-Sharpe weights are proportional to Σ⁻¹(μ − rf), scaled to sum to one.
Inputs from history or from estimates
From history, the mean of each column is multiplied by the number of periods in a year and the sample covariance, divided by n − 1, is scaled the same way. Prices are first turned into simple returns. From estimates, each covariance is the correlation times both volatilities. The tool warns when the matrix is not positive definite, which happens with impossible correlations or when one asset copies another.
Worked example
The built-in sample holds 36 months of illustrative returns for US stocks, international stocks, bonds, gold and REITs. Bonds average 3.78% a year with 5.80% volatility. Long-only, the minimum-variance portfolio is 12.0% US stocks, 75.9% bonds and 12.1% gold, with an expected return of 8.30% and volatility of 5.10%. With a 4% risk-free rate the maximum-Sharpe portfolio is 40.1% international stocks and 59.9% gold, returning 26.38% with 10.69% volatility, a Sharpe ratio of 2.092. These extreme weights come from three unusually strong years in the sample and show why historical means make poor forecasts.
Limits
Mean-variance weights are very sensitive to the expected returns, which are the hardest input to estimate; small changes can swing the answer. Volatility treats gains and losses alike and assumes stable correlations, which tend to rise in crashes. The tool has no per-asset caps, transaction costs or taxes. Its output is an analysis, not financial advice.
Contoh berselesaian
Long-only, the 36-month sample gives a minimum-variance mix of 75.9% bonds, 12.0% US stocks and 12.1% gold with 5.10% volatility.
Ringkasnya
- Kategori: Wang & cukai
- Berjalan dalam pelayar, tanpa pendaftaran, tanpa muat naik.
- Maklumat yang anda masukkan kekal pada peranti anda.
- Tersedia dalam bahasa Inggeris.
- Kandungan disemak kali terakhir:
- Sumber rasmi: H. Markowitz, Portfolio Selection, Journal of Finance (1952)
Soalan lazim
What is the efficient frontier?
The set of portfolios with the lowest volatility for each level of expected return. Any portfolio below the curve could get the same return with less risk.
What is the maximum-Sharpe portfolio?
The mix with the highest excess return per unit of volatility. With borrowing and lending at the risk-free rate, every efficient portfolio is a blend of it and cash.
Should I allow short selling?
Only if you can actually short the assets. Allowing it lowers the minimum risk but often gives large negative weights that are costly or impossible to hold.
What data should I use?
At least three to five years of monthly returns of the funds or indices you could buy. Set periods per year to 12 for monthly, 52 for weekly or 252 for daily data.
Why are the weights so extreme?
The optimiser trusts the expected returns completely. Assets with a strong past average win the most weight. Using your own long-run estimates gives steadier results.
Can I import prices instead of returns?
Yes. Choose "Prices" and the tool converts each column into period returns before calculating.
