\( \newcommand{\bm}[1]{\boldsymbol{#1}} \newcommand{\textm}[1]{\textsf{#1}} \def\T{{\mkern-2mu\raise-1mu\mathsf{T}}} \newcommand{\R}{\mathbb{R}} % real numbers \newcommand{\E}{{\rm I\kern-.2em E}} \newcommand{\w}{\bm{w}} % bold w \newcommand{\bmu}{\bm{\mu}} % bold mu \newcommand{\bSigma}{\bm{\Sigma}} % bold mu \newcommand{\bigO}{O} %\mathcal{O} \renewcommand{\d}[1]{\operatorname{d}\!{#1}} \)

Exercises

Exercise 14.1 (Sensitivity of naive portfolios)

  1. Choose a portfolio optimization formulation.
  2. Collect \(T\) observations of the returns of \(N\) assets, form the data matrix \(\bm{X}\in\R^{T\times N}\), and estimate the mean vector and covariance matrix.
  3. Sample \(B\) times new data matrices \(\bm{X}^{(b)}\in\R^{T\times N}\), \(b=1,\dots,B\), from a Gaussian distribution with the previous mean vector and covariance matrix as true parameters of the distribution.
  4. For each sampled data, solve the portfolio optimization obtaining the solutions \(\w^{(b)}\), \(b=1,\dots,B\).
  5. Compare the different portfolios \(\w^{(b)}\):
    • use barplots to compare visually the allocations of the different portfolios; and
    • plot a histogram of the achieved objective value by the different portfolios (evaluated under the original mean vector and covariance matrix used to draw the sampled data).

Exercise 14.2 (Sensitivity of robust worst-case portfolios) Repeat Exercise 14.1 but using a robust worst-case version of the portfolio formulation. Compare its sensitivity with that of the naive portfolio.

Exercise 14.3 (Sensitivity of resampled portfolios) Repeat Exercise 14.1 but using a bagged version of the portfolio formulation. Compare its sensitivity with that of the naive portfolio.

Exercise 14.4 (Worst-case mean vector under an ellipsoidal uncertainty set) Consider the ellipsoidal uncertainty set for \(\bmu\): \[ \mathcal{U}_{\bmu} = \left\{\bmu = \hat{\bmu} + \kappa \bm{S}^{1/2}\bm{u} \mid \|\bm{u}\|_2 \le 1\right\}, \] where \(\bm{S}^{1/2}\) is the symmetric square-root matrix of the shape \(\bm{S}\) and \(\kappa\) determines the size of the ellipsoid.

Derive the worst-case value of \(\w^\T\bmu\).

Exercise 14.5 (Worst-case mean vector under a box uncertainty region) Consider the box uncertainty region for \(\bmu\): \[ \mathcal{U}_{\bmu} = \left\{\bmu \mid -\bm{\delta} \le \bmu - \hat{\bmu} \le \bm{\delta}\right\}, \] where \(\bm{\delta}\) is the half-width of the box in all dimensions.

Derive the worst-case value of \(\w^\T\bmu\).

Exercise 14.6 (Worst-case covariance matrix under a data spherical uncertainty region) Consider the spherical uncertainty region for the data matrix \(\bm{X}\in\R^{T\times N}\) (containing \(T\) observations of the \(N\) assets): \[ \mathcal{U}_{\bm{X}} = \left\{\bm{X} \mid \|\bm{X} -\hat{\bm{X}}\|_\textm{F} \le \epsilon\right\}. \]

Derive the worst-case value of \(\w^\T\bSigma\w\) under a sample covariance estimation \(\hat{\bSigma} = \frac{1}{T}\hat{\bm{X}}^\T\hat{\bm{X}}\).

Exercise 14.7 (Robust worst-case mean--variance portfolio)

  1. Formulate a maximin version of the robust worst-case mean–variance portfolio for some choice of uncertainty sets for the mean vector and covariance matrix.
  2. Rewrite the problem in convex form by a brute-force sampling of the uncertainty sets and solve with a solver.
  3. Rewrite the problem in convex form by properly dealing with the worst-case mean vector and covariance matrix (either deriving the closed form or via Lagrange duality), and solve with a solver.
  4. Compare both solutions (try a different number of samples in the brute-force sampling approach).

Exercise 14.8 (Convexity of robust mean--variance portfolio under ellipsoidal covariance matrix)

  1. Formulate in maximin form the robust mean–variance portfolio with robustness in the variance under an ellipsoidal uncertainty set for the covariance matrix.
  2. Using the Lagrange dual problem version of the worst-case covariance matrix, rewrite the robust mean–variance portfolio as a regular (not maximin) optimization problem.
  3. Is the problem above convex? If not, can you rewrite it in convex form as a semidefinite program?

Exercise 14.9 (Robust worst-case maximum Sharpe ratio portfolio) Write down the following portfolio formulations:

  1. Naive formulation of the maximum Sharpe ratio portfolio in convex form.
  2. Robust worst-case formulation of the maximum Sharpe ratio portfolio under general uncertainty sets for the mean vector and covariance matrix.
  3. Choose some specific uncertainty regions and rewrite the robust worst-case formulation of the maximum Sharpe ratio in convex form.

Exercise 14.10 (Performance of resampled portfolios)

  1. Choose a portfolio optimization formulation.
  2. Perform a backtest of
    • the naive portfolio
    • the bagged portfolio
    • the subset resampled portfolio
    • the subset bagged portfolio
  3. Compare the performance and the computational cost.