Optimal Portfolios: Theory


Kevin Crotty
BUSI 448: Investments

Where are we?

Last time:

Where are we?

Last time:

  • Diversification: possible reduction in risk at no cost in expected return!
  • Efficient frontier: set of risky asset portfolios with least risk

Today:

  • Capital Allocation: Risk-free + Risky
  • Preferences over risk and return
  • Optimal portfolios

Which return series do you prefer?

Which return series do you prefer?

Which return series do you prefer?

Where would you like your portfolio to live?

Capital Allocation

Adding a risk-free asset

What does the set of possible portfolios look like if we combine a risky asset with a risk-free asset?

Example: a money market savings account with a stock fund.

Expected Return:

\[ E[r_p] = w E[r_{\text{risky}}]+ (1-w) r_f \,.\]

Variance:

\[\text{var}[r_p]=w^2 \text{var}[r_{\text{risky}}]+ (1-w)^2 \text{var}[r_f]+ 2 w(1-w) \text{cov}[r_{\text{risky}},r_f]\,. \]

What is true of \(\text{var}[r_f]\) and \(\text{cov}[r_{\text{risky}},r_f]\)?

\[ \text{sd}[r_p] = |w| \cdot \text{sd}[r_{\text{risky}}] \]

Capital Allocation Line

We can solve for \(w\) and substitute into the expected return def’n to obtain:

\[ \text{E}[r_p] = r_f + \bigg[ \frac{E[r_{\text{risky}}]-r_f}{\text{sd}[r_{\text{risky}}] }\bigg] \cdot \text{sd}[r_p] \]

The CAL for a risky asset is a set of portfolios combining the risky asset with the risk-free asset.

The term in brackets is called the Sharpe ratio!

Capital Allocation Line

Tangency Portfolio

Risk-free + Multiple Risky Assets

Let’s assume that in addition to the US stock market fund, we are also considering investing in a long-term bond fund.

The Tangency Portfolio Problem

  • Given a risk-free asset, the optimal risky portfolio is the set of weights that maximizes the portfolio’s Sharpe ratio.

Mathematically, choose portfolio weights to solve the following constrained optimization problem:

\[ \underset{w_1,w_2,\dots,w_N}{\text{max}} \frac{E[r_p]-r_f}{\text{sd}[r_p]} \]

subject to constraints: \(\sum_i w_i=1\)

The Tangency Portfolio Problem in Python

from scipy.optimize import minimize
n = len(MNS)
def f(w):
    mn = w @ MNS
    sd = np.sqrt(w @ COV @ w)
    return -(mn - RF) / sd
# Initial guess (equal-weighted)
w0 = (1/n)*np.ones(n)
# Constraint: fully-invested portfolio
A = np.ones(n)
b = 1
cons = [{"type": "eq", "fun": lambda x: A @ x - b}]
# No short-sale constraint
bnds = [(None, None) for i in range(n)] 
# Optimization
TOL = 10**(-10)
wgts = minimize(f, w0, bounds=bnds, constraints=cons, options={'ftol':TOL}).x

The Tangency Portfolio Problem

Allowing short sales, the tangency portfolio weights satisfy a system of equations: \[\begin{align*} \sum_{i=1}^N \text{cov}[r_1,r_i] w_i &= \delta (E[r_1] - r_f) \\ \sum_{i=1}^N \text{cov}[r_2,r_i] w_i &= \delta (E[r_2] - r_f) \\ & \vdots \\ \sum_{i=1}^N \text{cov}[r_N,r_i] w_i &= \delta (E[r_N] - r_f) \end{align*}\] where \(\delta\) is a constant (it is a Lagrange multiplier from the optimization problem)

Intuition

  • The LHS terms are the contributions of each asset to overall portfolio risk.
  • The RHS terms are proportional to each asset’s risk premium.
  • The ratio of an asset’s excess return to its contribution to overall portfolio risk is the same across all assets for the optimal combination of risky assets!

Theoretical tangency (no shorting restrictions)

import numpy as np

# Tangency: theoretical solution without short-sale constraint
w = np.linalg.solve(cov, means - r)
wgts_tangency = w / np.sum(w)

Preferences

Preferences and the Capital Allocation Line

  • Consider the tangency portfolio’s capital allocation line.

  • Would you ever invest in portfolios to the right of this line?

  • Where on this CAL would you invest?

  • Location on CAL depends on risk aversion!

Mean-Variance Preferences

  • We will assume that we like expected returns and dislike risk.

  • Risk aversion \(A\) measures `how much’ we dislike risk

\[ U(r_p)=E[r_p] - 0.5\cdot A \cdot \text{var}[r_p]\,.\]

Different risk aversions

When risk aversion is higher, a higher expected return is required to reach the utility for a given level of risk, and the extra expected return increases when risk increases.

Indifference Curves

  • Investors are indifferent between portfolios that generate the same utility.

  • Higher utility is achieved with either a higher expected return, lower risk, or both.

Preferences and the Capital Allocation Line

A mean-variance investor chooses \(w\) to solve:

\[ \underset{w}\max E[r_p] - 0.5\cdot A \cdot \text{var}[r_p]\,. \]

with \(r_p = w r_{\text{risky}} + (1-w) r_f\).

The optimal allocation to the risky portfolio is:

\[ w^* = \frac{E[r_{\text{risky}}-r_f]}{A \cdot \text{var}_{\text{risky}}}\,.\]

Investors with different risk aversion will choose different combinations of the risky asset and the risk-free asset.

Preferences and the Capital Allocation Line

Risk aversion and allocation to Risky Assets

Alternatives to mean-variance preferences

Alternatively, some investors have a either a target expected return or target standard deviation.
If we have a target expected return, solve for \(w_{\text{risky}}\):

\[ E[r_p] = w_{\text{risky}} \cdot E[r_{\text{risky}}] + (1-w_{\text{risky}}) \cdot r_f \]

If we have a target standard deviation, solve for \(w_{\text{risky}}\):

\[ \text{sd}[r_p] = w_{\text{risky}} \cdot \text{sd}[r_{\text{risky}}] \]

Learn Investments Dashboard resources

Manual search for optimal Sharpe ratio

3-asset tangency

3-asset capital allocation

N-asset portfolios

For next time: Practical Issues in Portfolio Optimization