Calculator
0.3573Sharpe ratio
Expected return 6.75%, volatility 10.4941%. Each unit of volatility comes with 0.3573 units of expected return above the risk-free rate of 3.00%.
Beta 0.77: CAPM requires 6.465%, so the expected return lies 0.285 percentage points above the security market line. Treynor ratio 0.0487.
If every correlation were +1, the volatility would be 12.70%; correlations below +1 take 2.2059 percentage points off.
| Asset | Weight | Expected return | Volatility | Beta | CAPM return | Alpha | Sharpe ratio |
|---|---|---|---|---|---|---|---|
| A | 50.00% | 8.00% | 16.00% | 1.10 | 7.95% | 0.05% | 0.3125 |
| B | 30.00% | 4.50% | 7.00% | 0.20 | 3.90% | 0.60% | 0.2143 |
| C | 20.00% | 7.00% | 13.00% | 0.80 | 6.60% | 0.40% | 0.3077 |
| Portfolio | 100% | 6.75% | 10.4941% | 0.77 | 6.465% | 0.285% | 0.3573 |
| Asset | A | B | C |
|---|---|---|---|
| A | 1.00 | 0.20 | 0.60 |
| B | 0.20 | 1.00 | 0.30 |
| C | 0.60 | 0.30 | 1.00 |
Eigenvalues: 0.3901, 0.8455, 1.7643. None is negative, so the matrix is positive semidefinite: these correlations can hold together.
How it is calculated
- Expected return0.5 × 8.00% + 0.3 × 4.50% + 0.2 × 7.00% = 6.75%
- Weight × volatility for A, B, C0.5 × 0.16, 0.3 × 0.07, 0.2 × 0.13 = 0.08, 0.021, 0.026
- Variance0.082 + 0.0212 + 0.0262 + 2 × 0.2 × 0.08 × 0.021 + 2 × 0.6 × 0.08 × 0.026 + 2 × 0.3 × 0.021 × 0.026 = 0.0110126
- Volatility√0.0110126 = 10.4941%
- Sharpe ratio(6.75% − 3.00%) ÷ 10.4941% = 0.3573
- Beta0.5 × 1.1 + 0.3 × 0.2 + 0.2 × 0.8 = 0.77
- CAPM required return3.00% + 0.77 × (7.50% − 3.00%) = 6.465%
- Alpha (expected minus required)6.75% − 6.465% = 0.285%
- Treynor ratio(6.75% − 3.00%) ÷ 0.77 = 0.0487
Limits: every figure is an estimate for one period. The ratios and CAPM describe returns only by their mean, volatility, correlation and beta, and figures from the past do not establish future performance.
Key facts
- Expected return is the weighted average of the assets’ expected returns; volatility is not: σp² = Σ Σ wᵢ wⱼ ρᵢⱼ σᵢ σⱼ.
- With long positions and correlations below +1, a portfolio is less volatile than the weighted average of its assets’ volatilities: 10.49% against 12.70% in the default example.
- Sharpe ratio = (expected return − risk-free rate) ÷ volatility; the Treynor ratio divides the same excess return by beta.
- CAPM required return = risk-free rate + beta × (market return − risk-free rate), with portfolio beta the weighted average of the betas: 0.77 and 6.465% in the default example.
- Pair correlations must form a positive semidefinite matrix: for three assets, 0.9, 0.9 and −0.5 do not, and the calculator names the pair to change.
How is the result calculated?
Return and risk. With weights that add up to 1, the expected return is the weighted average of the assets’ expected returns. The variance adds, for every pair of assets, a term with their covariance (Naranjo, portfolio risk (secondary source)) (NYU Stern, covariance and correlation (secondary source)):
Sharpe and Treynor ratios. Both divide the expected return above the risk-free rate by a measure of risk: the volatility for the Sharpe ratio, beta for the Treynor ratio (Sharpe, The Sharpe Ratio (1994)) (Naranjo, CAPM (secondary source)).
Beta and CAPM. Portfolio beta is the weighted average of the assets’ betas against the same market, because covariance is linear in each argument (Naranjo, efficient portfolios (secondary source)). The capital asset pricing model (CAPM) adds the beta-scaled market risk premium to the risk-free rate (Sharpe, equilibrium and the SML (secondary source)). Alpha here is your expected return minus that required return: positive means above the security market line.
Do the correlations fit together? A correlation matrix – ones on the diagonal, the pair correlations off it – must be positive semidefinite (Higham, nearest correlation matrix (2002)): no mix of the assets may have a negative variance. With three or more assets, correlations typed in pair by pair can fail that test even when each lies between −1 and 1. The calculator works out the eigenvalues of the matrix with the Jacobi method (repeated rotations that clear the off-diagonal entries) and accepts the correlations only if none is negative. For three assets it also shows each pair’s possible range given the other two, which follows from the determinant of the matrix not being negative:
Worked example
1. Two assets and the effect of correlation
Put 65% in asset A (expected return 7%, volatility 14%) and 35% in asset B (11.5%, 23%), with a correlation of 0.25 – the example of the CAPM and portfolio risk guide:
The weighted average of the two volatilities is 17.15%, which is what the portfolio would have at a correlation of +1. At 0 it would be 12.1496%, at −1 only 1.05%. With a risk-free rate of 3.2%, the Sharpe ratio is (8.575% − 3.2%) ÷ 13.5735% = 0.396. Assume betas of 0.8 and 1.3 and a market return of 8.8%: the portfolio beta is 0.975 and CAPM requires 3.2% + 0.975 × 5.6% = 8.66%, so the alpha is −0.085 percentage points.
2. Three assets: the calculator’s default portfolio
Weights of 50%, 30% and 20%, expected returns of 8%, 4.5% and 7%, volatilities of 16%, 7% and 13%, correlations of 0.2 (A and B), 0.6 (A and C) and 0.3 (B and C). The weighted volatilities are 0.08, 0.021 and 0.026, so
The portfolio expects 6.75% with a volatility of 10.4941%, below the 12.70% weighted average of the volatilities. At a 3% risk-free rate the Sharpe ratio is 0.3573. With betas of 1.1, 0.2 and 0.8 the portfolio beta is 0.77; at a market return of 7.5%, CAPM requires
so the expected return lies 0.285 percentage points above the security market line. The Treynor ratio is 3.75% ÷ 0.77 = 0.0487.
3. Correlations that cannot hold together
Change the correlations to 0.9 for A and B, 0.9 for A and C and −0.5 for B and C. Each lies between −1 and 1, but if A moves closely with both B and C, B and C cannot move strongly against each other. The eigenvalues of the matrix are −0.5471, 1.5000, 2.0471; one is negative. Give the three assets a volatility of 20% each and hold −100% of A and 100% each of B and C:
A negative variance is impossible, so the calculator stops and says why. Given the other two, the correlation of A and B would have to lie between −0.83 and −0.07; the calculator shows this range for each pair.
What do the results mean for you?
The Sharpe ratio tells you how much expected return above the risk-free rate each unit of volatility brings; it is useful for comparing portfolios measured over the same period and with the same risk-free rate. The Treynor ratio uses beta instead, so it counts only market risk, and the two can rank portfolios differently. The CAPM and portfolio risk guide works through a case where they disagree.
A positive alpha means your expected return is above what CAPM requires for the portfolio’s beta. It is only as good as the expected returns you enter: the CAPM figure is a model’s required return, not a promised outcome (Naranjo, CAPM (secondary source)). Ratios computed from past returns do not establish future performance.
For exam practice, work a question by hand first, then check the figure and each step here. The steps under the result show the variance term by term.
Which portfolio risk mistakes are common?
- Averaging the volatilities. The weighted average is the portfolio volatility only at a correlation of +1. In the two-asset example it gives 17.15% instead of 13.5735%.
- Dropping the 2 in the covariance terms. Each pair appears twice in the double sum, once as A–B and once as B–A.
- Mixing periods. Use annual returns with annual volatilities. A Sharpe ratio depends on the period it is measured over: if returns over T periods are simply added up and are uncorrelated from one period to the next, the ratio over T periods is √T times the one-period ratio; compounding makes the link more complicated (Sharpe, The Sharpe Ratio (1994)).
- Dividing by the market volatility for beta. Beta is the covariance with the market divided by the market’s variance, not its volatility (Naranjo, CAPM (secondary source)).
- Weights that do not add up to 100%. A short position is a negative weight; the other weights then add up to more than 100%. With short positions the weighted average of the volatilities is no upper limit on the portfolio’s volatility, so the calculator does not show it.
- Correlations from different sources. Correlations taken from different periods or data, or changed by hand one at a time, can stop fitting together; the third example shows how.
What does the calculator leave out?
- Estimating the inputs. Expected returns, volatilities, correlations and betas come from you; the calculator does not estimate them from prices.
- Optimisation. It evaluates the portfolio you enter and does not search for the minimum-variance or the highest-Sharpe portfolio; the CAPM and portfolio risk guide explains the efficient frontier (Naranjo, efficient portfolios (secondary source)).
- The model’s assumptions. CAPM assumes mean–variance investors with common expectations and frictionless access to assets and to risk-free borrowing and lending (Naranjo, CAPM (secondary source)). Fees, taxes, currency effects and rebalancing are not included.
Can you use these numbers in the exam?
This calculator supports study for the CFA® Program Level I, run by CFA Institute (CFA Institute, Level I exam), and the FRM® Exam Part I, run by the Global Association of Risk Professionals (GARP) (GARP, FRM Exam information). Our tools complement the exam bodies’ own material; they do not replace it. Which calculators you may use in the exam is set by CFA Institute for the CFA® Program and by GARP for the FRM® Exam; our page on which calculators are allowed in the exams sets out the models with their sources.
What this tool covers
- Last updated
- Based on
- Mean–variance portfolio formulas, CAPM and the Sharpe and Treynor ratios (see the sources)
- Your own weights, expected returns, volatilities, correlations, betas and rates; the default values are illustrative
- Includes
- Two to five assets, with short positions as negative weights
- Expected return, variance, volatility, Sharpe ratio, beta, CAPM required return, alpha and Treynor ratio, for the portfolio and each asset
- A check that the correlations fit together (eigenvalues of the correlation matrix), with each pair’s possible range for three assets
- Worked steps and a link that keeps your numbers
- Not included
- Estimating returns, volatilities, correlations or betas from price data
- Optimisation: the efficient frontier, the minimum-variance and the highest-Sharpe portfolio
- Fees, taxes, currency effects and rebalancing
Frequently asked questions
How do you calculate the Sharpe ratio of a portfolio?
Subtract the risk-free rate from the portfolio’s expected return and divide by its volatility. With an expected return of 6.75%, a 3% risk-free rate and 10.49% volatility, the Sharpe ratio is 0.357.
How does correlation change portfolio volatility?
It changes only the covariance terms. With 65% in an asset with 14% volatility and 35% in one with 23%, the portfolio volatility is 17.15% at a correlation of +1, 13.57% at 0.25, 12.15% at 0 and 1.05% at −1.
How do you calculate the CAPM required return?
Add beta times the market risk premium to the risk-free rate. For the default portfolio, with a beta of 0.77: 3% + 0.77 × (7.5% − 3%) = 6.465%.
What does alpha mean in this calculator?
It is your expected return minus the CAPM required return for the same beta: +0.285 percentage points for the default portfolio (6.75% against 6.465%). It is only as reliable as the expected returns you enter.
Why can the Sharpe and Treynor ratios rank portfolios differently?
The Sharpe ratio divides excess return by total volatility, the Treynor ratio by beta. A portfolio with much risk that is unrelated to the market can rank lower on the Sharpe ratio but higher on the Treynor ratio.
Why does the calculator reject my correlations?
With three or more assets the pair correlations must fit together: the correlation matrix must be positive semidefinite, with no negative eigenvalue. For three assets, 0.9, 0.9 and −0.5 fail; given the other two, the first would have to lie between −0.83 and −0.07.
Can weights be negative?
Yes. A negative weight is a short position, and all the weights together must add up to 100%. With short positions the weighted average of the volatilities is no upper limit, so the calculator does not show it.
Does the calculator save my numbers?
No. The calculation runs in your browser. Your numbers appear only in the page address after the # sign, so you can share a result; they are not sent to us.
Related tools and pages
Sources
- Lorenzo Naranjo, Washington University in St. Louis (lecture notes, secondary source): Portfolios of Risky Assets — expected return, covariance, portfolio variance and the minimum-variance frontier. Accessed 29 October 2026.
- Aswath Damodaran, NYU Stern School of Business (secondary source): A Primer on Statistics — covariance and correlation. Accessed 29 October 2026.
- William F. Sharpe, The Journal of Portfolio Management (author's Stanford reprint): The Sharpe Ratio — The Ratio, Time Dependence, Correlations and Related Measures (1994). Accessed 29 October 2026.
- Lorenzo Naranjo, Washington University in St. Louis (lecture notes, secondary source): The Capital Asset Pricing Model — assumptions, beta, systematic risk and model limitations. Accessed 29 October 2026.
- William F. Sharpe, Stanford University (academic notes, secondary source): Macro-Investment Analysis: Equilibrium (preliminary) — Expected Return and Beta Values; The Market Portfolio and the Security Market Line. Accessed 29 October 2026.
- Lorenzo Naranjo, Washington University in St. Louis (lecture notes, secondary source): Beta Pricing — capital allocation lines, the tangency portfolio and mean-variance efficiency. Accessed 29 October 2026.
- Nicholas J. Higham, IMA Journal of Numerical Analysis 22(3), 329–343 (MIMS EPrint, University of Manchester): Computing the Nearest Correlation Matrix – A Problem from Finance — abstract: a correlation matrix is symmetric positive semidefinite with unit diagonal (2002). Accessed 30 October 2026.
- CFA Institute: CFA Program Level I exam: format and topic weights. Accessed 26 October 2026.
- Global Association of Risk Professionals (GARP): FRM Exam information: format and exam topics. Accessed 26 October 2026.
Study aid only – not legal, financial or careers advice. The tool runs in your browser and stores nothing.
High Performer Certs is an independent study platform. It is not affiliated with, endorsed by, or sponsored by CFA Institute or the Global Association of Risk Professionals (GARP). We are not a CFA Institute Prep Provider and not a GARP Exam Preparation Provider. CFA Institute does not endorse, promote, review or warrant the accuracy or quality of our products and services. GARP does not endorse, promote, review or warrant the accuracy of our products or services. All questions and explanations are our own original material and contain no CFA Institute or GARP exam, curriculum or practice questions. CFA®, Chartered Financial Analyst®, CIPM® and GIPS® are registered trademarks owned by CFA Institute. FRM® and GARP® are trademarks owned by the Global Association of Risk Professionals.