The Markowitz Frontier is a two-asset portfolio optimiser built on Harry Markowitz's Nobel Prize-winning Modern Portfolio Theory (1952). It answers one of the most fundamental questions in finance: given two investments, how much of each should I hold to get the best possible return for the risk I am willing to take?
The tool fetches three years of real price history from Yahoo Finance, computes each asset's historical return and volatility, calculates how correlated they are, and then maps every mathematically possible combination of the two into a single visual chart — the Efficient Frontier. The optimal portfolio is identified automatically.
This tool optimises a two-asset portfolio only. Real-world portfolios typically hold many assets. The two-asset model is the purest demonstration of the diversification principle and the efficient frontier concept, and its output is directly applicable to any sleeve, pair trade, or benchmark vs. active allocation decision.
You can run a complete optimisation in under thirty seconds.
Type the Yahoo Finance ticker for Asset A and Asset B — for example,
RELIANCE.NS and HDFCBANK.NS for Indian stocks,
or AAPL and MSFT for US stocks. International tickers
use a suffix: .NS for NSE, .BO for BSE, .L
for London, .HK for Hong Kong.
The tool fetches three years of monthly price data from Yahoo Finance, calculates each asset's annualised return and volatility, computes the correlation between them, and builds the efficient frontier. All automatically — no spreadsheets required.
The coloured dot cloud shows all possible portfolios. The ★ star marks the optimal (maximum Sharpe) portfolio. The ◆ diamond marks the minimum-risk portfolio. The dashed line shows the Capital Market Line. The stats strip below the chart button shows the exact weights and metrics.
Click Export PDF to download a formatted report showing all parameters, the frontier chart, and the optimal portfolio weights. Use Save Model to store the inputs for future sessions.
All financial parameters — return, volatility, and correlation — are filled in automatically when you click Plot Frontier. You only need to enter the two ticker symbols. The fields are described below so you understand what each number means.
The chart plots Volatility (Risk) on the x-axis and Expected Return on the y-axis. Every point on the chart represents a specific portfolio — a specific split between Asset A and Asset B. Moving left on the x-axis means lower risk; moving up on the y-axis means higher return. The goal is to be as far up and left as possible.
Each dot is one simulated portfolio with a specific weight split between the two assets (e.g. 40% in A, 60% in B). The colour of each dot encodes its Sharpe Ratio: blue = low Sharpe (poor risk-adjusted return), green = medium, red/orange = high Sharpe (excellent risk-adjusted return). The full cloud shows every reachable risk-return combination. Portfolios inside the cloud are always dominated — for the same risk, there is a better-returning option on the boundary.
This curve is the outer boundary of the opportunity set. Every portfolio ON this curve is efficient: for its level of risk, it delivers the highest possible return. No portfolio can exist above or to the left of this curve. Portfolios below or to the right of the curve are inefficient — a rational investor should never hold them. The curve bows leftward because of the diversification effect: when two imperfectly correlated assets are combined, the portfolio risk is less than the weighted average of the individual risks.
The Capital Market Line is a straight line that starts at the risk-free rate on the y-axis (zero volatility) and runs through the Maximum Sharpe portfolio (★), then continues beyond it. It represents the best risk-return combinations available when an investor can also hold cash (or borrow). Any point on the CML is achievable by:
The CML is always above or tangent to the efficient frontier. Its slope is the Sharpe Ratio of the Max Sharpe portfolio — the highest achievable risk-adjusted return.
This single point is the most important result of the entire optimisation. It is simultaneously called:
The stats strip below the chart button shows the exact weights: e.g., "Weight A: 62.3% · Weight B: 37.7%" and the Sharpe Ratio.
The leftmost point on the efficient frontier. This portfolio has the lowest achievable risk of any combination of the two assets. It minimises volatility regardless of return. It is the ideal starting point for extremely risk-averse investors — even if its return is lower than the Max Sharpe portfolio. The exact weights are shown in the stats strip and the info banner below the chart.
The vertical colour gradient on the right side of the chart acts as a legend for the dot colours. The number at the top is the maximum Sharpe Ratio in the cloud; the number at the bottom is the minimum. Use this to judge whether the overall risk-adjusted return profile of the two-asset universe is attractive.
The following concepts underpin everything the tool calculates. Understanding them turns the chart from a picture into an actionable decision framework.
Combining two assets with a correlation below +1 reduces portfolio risk below the simple weighted average of the individual risks. The lower the correlation, the greater the diversification benefit. When ρ = 0 or negative, the frontier bows far to the left, meaning you can achieve substantially lower risk by holding both assets. This is the "free lunch" of finance.
Higher expected return almost always requires accepting higher risk. The efficient frontier shows this trade-off visually. Portfolios above the Minimum Variance point on the frontier offer progressively higher return in exchange for progressively higher risk. Portfolios below the MVP on the frontier are inefficient — more risk for less return — and should never be chosen.
The mathematical process of finding portfolios that maximise expected return for a given level of variance (or minimise variance for a given return). Developed by Harry Markowitz in 1952 and the foundation of all modern quantitative portfolio management. The tool solves this problem numerically using a fine grid and Monte Carlo simulation to map the entire feasible set.
Measures how much excess return (above the risk-free rate) you receive per unit of volatility. A Sharpe Ratio of 1.0 means you earn 1% of return above the risk-free rate for every 1% of risk taken. Above 1.0 is considered good; above 2.0 is exceptional in equity markets. The tangency portfolio maximises this ratio.
Sharpe = (Return − Rf) / Volatility
All rational investors should hold the same optimal risky portfolio (the Max Sharpe portfolio) and vary their allocation to the risk-free asset based on personal risk tolerance. A conservative investor holds 40% Max Sharpe + 60% cash. An aggressive investor holds 100%+ Max Sharpe using leverage. This is why the CML — not the frontier — represents the true investment opportunity.
Rather than evaluating every possible weight analytically, the tool generates hundreds or thousands of random portfolio weights, computes the return and risk of each, and plots them. This Monte Carlo approach paints the full "cloud" of reachable portfolios and makes the efficient frontier intuitively visible. More simulations produce a denser, more accurate picture.
The two-asset efficient frontier is directly applicable to a wide range of real-world investment and management decisions:
Start with the shape of the frontier. If the curve bows significantly to the left, the two assets have a low (or negative) correlation and combining them produces a large diversification benefit. If the frontier is nearly straight, the assets are highly correlated and there is little benefit from mixing them beyond picking the better performer.
The stats strip below the chart button shows the Max Sharpe weights. For example, "Weight A: 68% · Weight B: 32%" means you should invest 68 cents of every rupee/dollar in Asset A and 32 cents in Asset B to achieve the best risk-adjusted return. If you are more conservative, look at the Min Variance weights instead.
If both assets have similar returns and high correlation, the frontier will be a short, nearly flat curve. In this case, the Max Sharpe and Min Variance portfolios will be close to each other, and the choice of weight matters less. This is a signal that the two assets are not good diversifiers of each other — consider replacing one with a less correlated alternative.
The Capital Market Line and the Sharpe Ratio both depend critically on the risk-free rate. If you set a low risk-free rate (say 2%) when the prevailing rate is 7%, the Sharpe ratios will look artificially high and the Max Sharpe portfolio will shift. Always use the current rate for the currency and market of your assets.
Two productivity features — Save Model and Export PDF — are available to Trial and Premium users. Free users can still run the full optimisation and read every result on-screen; saving and exporting require an account.
| Feature | Free | Trial | Premium |
|---|---|---|---|
| Plot Frontier | ✓ Unlimited | ✓ Unlimited | ✓ Unlimited |
| Export PDF | ✗ Not available | ✓ Unlimited | ✓ Unlimited |
| Save Model | ✗ Not available | Up to 3 models | ✓ Unlimited |
| Load Saved Model | ✗ Not available | ✓ All saved models | ✓ All saved models |
Click the ⬇ Export PDF button (below the stats strip) after the frontier has been plotted. The tool generates a formatted A4 landscape PDF entirely in your browser — no data is sent to a server for PDF generation — and downloads it immediately.
A model is a named snapshot of all your current inputs: both ticker symbols, their fetched return and volatility figures, the correlation, the number of random portfolios, the risk-free rate, and all project info fields. Saving a model lets you return to a previous analysis in any future session with a single click.
The Save Model button appears below the Export PDF button once you are logged in with a Trial or Premium account. Click it after running the optimisation you want to keep.
Choose a short, memorable name — for example RELHDFCB,
NIFGOLD, or AAPL-MSFT. The name is used to
identify the model in the dropdown. Names are unique per account; saving
with an existing name prompts you to confirm overwrite.
Select any saved model from the Load saved model dropdown. All inputs are restored instantly and the frontier is re-plotted automatically, so you can continue from exactly where you left off.
During a Trial, you can save up to three distinct models. Overwriting an existing model (saving under the same name) does not consume an additional slot — it updates the existing record. When the three-model limit is reached, you must overwrite an existing model or upgrade to Premium to save more.
Premium users can save as many models as needed with no cap. This is especially useful for tracking multiple portfolio pairs over time — for example, saving a monthly snapshot of the same two assets to see how the optimal weights shift as market conditions evolve.
A quick-reference table of every technical term used in the tool and this guide.
| Term | Definition | In this tool |
|---|---|---|
| Annual Return | The average yearly percentage gain or loss of an asset. Calculated here as average monthly return × 12 (arithmetic annualisation). | Auto-filled from Yahoo Finance. Shown in Ann. Return % field. |
| Annual Volatility | The annualised standard deviation of returns. Measures how widely returns fluctuate around their average. Higher = more uncertain / riskier. | Auto-filled. Shown in Ann. Volatility % field. X-axis of the chart. |
| Correlation (ρ) | A number between −1 and +1 that measures how two assets move together. +1 = perfectly in sync; −1 = perfectly opposite; 0 = independent. The lower the correlation, the greater the diversification benefit. | Auto-computed from aligned monthly returns. Shown on the slider. |
| Sharpe Ratio | (Expected Return − Risk-Free Rate) ÷ Volatility. Measures excess return earned per unit of risk. Popularised by William Sharpe (Nobel Prize 1990). Higher is better. Above 1.0 is generally good. | Encoded as dot colour in the chart (blue = low, red = high). Shown in the stats strip for the Max Sharpe portfolio. |
| Efficient Frontier | The curved boundary of all optimal portfolios. For every level of risk, the frontier portfolio offers the maximum achievable return. No portfolio can exist above or to the left of this curve. | The solid black curve on the chart. |
| Opportunity Set | The full set of all possible portfolios — every weight combination from 0%/100% to 100%/0% — shown as the dot cloud. Portfolios inside the cloud are dominated (inefficient). | The coloured dot scatter on the chart. |
| Capital Market Line (CML) | A straight line from the risk-free rate through the Tangency Portfolio. Represents the best possible risk-return combinations when investors can also hold cash or borrow. The slope of the CML equals the maximum Sharpe Ratio. | The teal dashed straight line on the chart. |
| Tangency Portfolio | The portfolio at the point where the CML is tangent to the Efficient Frontier. It has the highest Sharpe Ratio of all portfolios on the frontier. Also called the Max Sharpe portfolio or Market Portfolio. | The ★ star marker on the chart. |
| Market Portfolio | In CAPM theory, the portfolio of all risky assets held in proportion to their market value. In practice, approximated by a broad index. In this two-asset context, it equals the Tangency Portfolio. | Same as the ★ star marker. |
| Minimum Variance Portfolio (MVP) | The portfolio with the lowest possible volatility. It is the leftmost point on the Efficient Frontier. Maximises risk reduction without any regard for return level. | The ◆ gold diamond on the chart. |
| Risk-Free Rate (Rf) | The return available from a zero-risk investment, typically a short-term government bond. In India, the 91-day T-Bill (~6.5–7%). In the US, the 3-month Treasury Bill (~5%). Acts as the y-intercept of the CML. | The Risk-free rate % input field. Default 4.5%. |
| Mean–Variance Optimisation | The Markowitz framework for finding efficient portfolios using only expected returns, variances, and covariances. Assumes investors are rational and care only about mean (return) and variance (risk). | The mathematical engine behind the entire tool. |
| Monte Carlo Simulation | Generating a large number of random outcomes to approximate a distribution. Here, random portfolio weights are generated to paint the full opportunity set visually. | The dot cloud. Controlled by the Random Portfolios input. |
| Portfolio Weight | The fraction of total capital invested in each asset. Weights sum to 100%. A weight of 70% in Asset A means 30% is in Asset B. | X-axis of the hover tooltip shows Weight A / Weight B for each dot. |
| Two-Fund Separation | Theorem stating that every investor's optimal portfolio is a combination of the same risky portfolio (Tangency Portfolio) and the risk-free asset — differing only in the proportions based on risk appetite. | Embodied by the Capital Market Line. |
| Diversification Benefit | The reduction in portfolio risk achieved by combining imperfectly correlated assets. The portfolio's volatility is less than the weighted average of the individual volatilities whenever ρ < 1. | Visible as the leftward bow of the Efficient Frontier curve. |
| Standard Deviation (σ) | A statistical measure of how spread out values are around an average. In finance, the standard deviation of returns is the standard measure of risk (volatility). | X-axis (Ann. Volatility) and the Vol values in tooltips and the info banner. |
| Annualisation | Converting a monthly (or other period) figure to a yearly equivalent. Returns are annualised by multiplying by 12. Standard deviations are annualised by multiplying by √12, because variance scales linearly with time but standard deviation scales with the square root of time. | Applied automatically to all Yahoo Finance data before populating input fields. |