Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceStochastic ModelsGuide
Guide
Derivatives pricing
01Forwards, calls and puts02Combining positions03Arbitrage and the forward price04Put–call parity05The one-step binomial model06Risk-neutral probabilities07Multi-step trees and backward induction08American options and early exercise09Delta and hedging10Geometric Brownian motion11The Black–Scholes formula12The Greeks: gamma, vega, theta and rho13Implied volatility and the volatility smile14Stochastic volatility and the Heston model15Static replication: Breeden–Litzenberger and Carr–Madan16Exotic options: barriers, Asians and digitals
Portfolio & risk
01Returns and volatility02Diversification and correlation03The efficient frontier and the capital market line04Risk aversion and the optimal complete portfolio05CAPM, beta and the security market line06Performance measures: Sharpe, Treynor, Jensen and information ratio07Factor models and systematic risk08Value at Risk and expected shortfall
Fixed income
01Bond prices and yields02Duration and convexity03Immunization and duration matching04Spot rates, forward rates and the yield curve05Bond futures and the cheapest-to-deliver06Interest rate swaps07Callable bonds and negative convexity08Credit risk: default probabilities and credit spreads
Corporate finance
01Interest, compounding and discounting02Annuities, perpetuities and loan amortization03Net present value and internal rate of return04The weighted average cost of capital05Capital structure and the Modigliani–Miller theorems06Discounted cash flow valuation07Relative valuation with multiples08Real options: the value of flexibility
Stochastic models
01Random walks and Brownian motion02Probability spaces, σ-algebras and random variables03Filtrations, adapted processes and stopping times04Conditional expectation and martingales05Properties of Brownian motion06The reflection principle and first passage times07The Brownian bridge08The Itô integral09Itô's lemma10Kolmogorov equations and the Feynman–Kac formula11Change of measure and Girsanov's theorem12Monte Carlo option pricing13Simulating SDEs: the Euler–Maruyama scheme14Mean reversion: Ornstein–Uhlenbeck and Vasicek15Jumps and the Merton jump-diffusion model
Knowledge graph

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Guide/Portfolio & risk

Risk aversion and the optimal complete portfolio

Lesson 4 of 8 · 1 min read

The lesson "The efficient frontier and the capital market line" ended with a single line of portfolios: every investor should hold the same risky portfolio P and mix it with the risk-free asset. It did not say how much of P to hold. That depends on the investor, not on the market. This lesson describes an investor's attitude to risk with one number, the risk-aversion coefficient, and uses it to find the best point on the line.

The choice left open

Put a fraction yyy of the capital in P and 1−y1 - y1−y in the risk-free asset with return rfr_frf​. As in the previous lesson, the resulting complete portfolio has

μ=rf+y (μP−rf),σ=y σP.\mu = r_f + y\,(\mu_P - r_f), \qquad \sigma = y\,\sigma_P.μ=rf​+y(μP​−rf​),σ=yσP​.

Every value of yyy is a point on the capital allocation line. A cautious investor picks a small yyy, a bold one a large yyy, and y>1y > 1y>1 means borrowing at rfr_frf​ to invest more than the own capital in P. To compare the points we need a rule that weighs expected return against risk.

Mean–variance utility

The standard rule assigns each portfolio a score, its utility,

U=μ−12A σ2,U = \mu - \tfrac{1}{2} A\,\sigma^2,U=μ−21​Aσ2,

with rates written as decimals. The risk-aversion coefficient AAA says how heavily the investor penalises variance. With A>0A > 0A>0 the investor is risk-averse: of two portfolios with the same μ\muμ, the one with the lower σ\sigmaσ scores higher. With A=0A = 0A=0 only the expected return matters (risk neutrality). Values between about 2 and 6 are typical for the way people actually invest.

Example: the risky portfolio has μP=11%\mu_P = 11\%μP​=11% and σP=20%\sigma_P = 20\%σP​=20%. For an investor with A=4A = 4A=4,

UP=0.11−12×4×0.202=0.11−0.08=0.03.U_P = 0.11 - \tfrac{1}{2}\times 4 \times 0.20^2 = 0.11 - 0.08 = 0.03.UP​=0.11−21​×4×0.202=0.11−0.08=0.03.

Certainty equivalent

A risk-free investment has σ=0\sigma = 0σ=0, so its utility is just its return. The utility of any portfolio can therefore be read as a rate: the certainty equivalent, the sure return that the investor finds exactly as attractive as the risky portfolio. In the example the investor values P like a sure 3%. If the risk-free rate is rf=3%r_f = 3\%rf​=3%, holding only P and holding only bills are equally good for this investor.

Indifference curves

All portfolios with the same utility UUU satisfy

μ=U+12A σ2.\mu = U + \tfrac{1}{2} A\,\sigma^2.μ=U+21​Aσ2.

In the (σ,μ)(\sigma, \mu)(σ,μ) plane this is an upward-curving parabola, an indifference curve: the investor does not care which point on it they hold. Each extra unit of risk must be paid for with more expected return, and the price rises with σ\sigmaσ. Curves further up mean higher utility. A larger AAA makes the curves steeper, because a more risk-averse investor demands more compensation for the same risk.

The optimal complete portfolio

Substituting the complete portfolio into the utility gives a function of yyy alone:

U(y)=rf+y (μP−rf)−12A σP2 y2.U(y) = r_f + y\,(\mu_P - r_f) - \tfrac{1}{2} A\,\sigma_P^2\, y^2.U(y)=rf​+y(μP​−rf​)−21​AσP2​y2.

It is a downward-opening parabola in yyy. Setting the derivative (μP−rf)−AσP2 y(\mu_P - r_f) - A\sigma_P^2\, y(μP​−rf​)−AσP2​y to zero gives

y∗=μP−rfA σP2,U∗=rf+SRP22A,y^{*} = \frac{\mu_P - r_f}{A\,\sigma_P^2}, \qquad U^{*} = r_f + \frac{\text{SR}_P^2}{2A},y∗=AσP2​μP​−rf​​,U∗=rf​+2ASRP2​​,

where SRP=(μP−rf)/σP\text{SR}_P = (\mu_P - r_f)/\sigma_PSRP​=(μP​−rf​)/σP​ is the Sharpe ratio. Geometrically, y∗y^*y∗ is where an indifference curve just touches the capital allocation line: higher curves miss the line, lower ones cut it in two points that are both worse.

The optimal weight in the risky portfolio is y∗=(μP−rf)/(AσP2)y^{*} = (\mu_P - r_f)/(A\sigma_P^2)y∗=(μP​−rf​)/(AσP2​): proportional to its excess return, inversely proportional to its variance and to the investor's risk aversion.

Worked example

Take μP=11%\mu_P = 11\%μP​=11%, σP=20%\sigma_P = 20\%σP​=20%, rf=3%r_f = 3\%rf​=3% and A=4A = 4A=4. Then

y∗=0.084×0.04=0.5,μ=3%+0.5×8%=7%,σ=0.5×20%=10%,y^{*} = \frac{0.08}{4 \times 0.04} = 0.5, \qquad \mu = 3\% + 0.5 \times 8\% = 7\%, \qquad \sigma = 0.5 \times 20\% = 10\%,y∗=4×0.040.08​=0.5,μ=3%+0.5×8%=7%,σ=0.5×20%=10%,

and U∗=0.07−12×4×0.01=5%U^{*} = 0.07 - \tfrac{1}{2}\times 4 \times 0.01 = 5\%U∗=0.07−21​×4×0.01=5%. Holding only bills or only P each gives a certainty equivalent of 3%, so the half-and-half mix is clearly better than either end. A more risk-averse investor with A=8A = 8A=8 holds y∗=0.25y^* = 0.25y∗=0.25 (expected return 5%, volatility 5%); one with A=2A = 2A=2 holds exactly P (y∗=1y^* = 1y∗=1).

A second investor faces a different market, μP=10%\mu_P = 10\%μP​=10%, σP=25%\sigma_P = 25\%σP​=25% and rf=2%r_f = 2\%rf​=2%, and has A=3A = 3A=3.

Worked example

Optimal complete portfolio for a second investor

  1. Optimal weight in the risky portfolio.

    y∗=μP−rfA σP2\displaystyle y^{*} = \frac{\mu_P - r_f}{A\,\sigma_P^2}y∗=AσP2​μP​−rf​​=0.4267
  2. Expected return of the complete portfolio.

    μ=rf+y∗(μP−rf)\displaystyle \mu = r_f + y^{*}(\mu_P - r_f)μ=rf​+y∗(μP​−rf​)=5.413%
  3. Its volatility.

    σ=y∗σP\displaystyle \sigma = y^{*}\sigma_Pσ=y∗σP​=10.67%
  4. Its utility, through the Sharpe ratio SRP=0.32\text{SR}_P = 0.32SRP​=0.32.

    U∗=rf+SRP22A\displaystyle U^{*} = r_f + \frac{\text{SR}_P^2}{2A}U∗=rf​+2ASRP2​​=3.707%

Borrowing

The optimal weight exceeds one when A<(μP−rf)/σP2A < (\mu_P - r_f)/\sigma_P^2A<(μP​−rf​)/σP2​, here when A<2A < 2A<2. With A=1.6A = 1.6A=1.6 the investor wants y∗=0.08/(1.6×0.04)=1.25y^* = 0.08/(1.6 \times 0.04) = 1.25y∗=0.08/(1.6×0.04)=1.25: borrow a quarter of the own capital at rfr_frf​ and invest 125% in P, for an expected return of 13% and a volatility of 25%. In practice investors borrow at a higher rate than they lend, which bends the line downwards beyond P and lowers the optimal borrowing.

The figure draws the capital allocation line for the example. Drag the point along it to choose yyy; the curve through that point is the indifference curve you are on, and the dashed curve belongs to the optimum. Start at P, where the two curves are far apart, and drag towards the risk-free end: utility rises until the point snaps onto the optimum at y=0.5y = 0.5y=0.5, then falls again. Switch AAA and note that the optimum moves while the line stays the same.

Indifference curves on the capital allocation lineOpen in Portfolio Optimization →
Drag the point along the line (or use the arrow keys).
  • capital allocation line
  • indifference curve at the chosen point
  • indifference curve at the optimum
Weight in P, y
1.00
Expected return
11.00%
Volatility
20.0%
Utility U
3.00%
Certainty equivalent
3.00%
Optimal weight y*
0.50

Separation of the two decisions

The result splits the investment problem in two. Which risky portfolio to hold depends only on the market (expected returns, volatilities, correlations): every mean–variance investor picks the tangency portfolio. How much of it to hold depends only on the investor's AAA. This is the two-fund separation result: any optimal portfolio is a mix of the same two funds, the risk-free asset and P.

Summary

  • Mean–variance utility U=μ−12Aσ2U = \mu - \tfrac{1}{2}A\sigma^2U=μ−21​Aσ2 scores a portfolio; AAA measures risk aversion.
  • A portfolio's utility is its certainty equivalent: the sure return the investor finds equally attractive.
  • Indifference curves μ=U+12Aσ2\mu = U + \tfrac{1}{2}A\sigma^2μ=U+21​Aσ2 are parabolas, steeper for larger AAA.
  • The best complete portfolio holds y∗=(μP−rf)/(AσP2)y^* = (\mu_P - r_f)/(A\sigma_P^2)y∗=(μP​−rf​)/(AσP2​) in P; y∗>1y^* > 1y∗>1 means borrowing.
  • Everyone holds the same risky portfolio; only the split between it and the risk-free asset differs.

The next lesson, "CAPM, beta and the security market line", asks what happens to prices when every investor holds the same risky portfolio.

Try itCombine a risky asset with the risk-free rate and move along the capital allocation line in the Risk & Return lab →
2 questions on this lesson at the end of the series →
← PreviousThe efficient frontier and the capital market lineNext →CAPM, beta and the security market line
Connections
Risk aversion and the optimal complete p…
Open the full graph →
Labs for this lesson
Risk & ReturnPortfolio Optimization