Exercises
Exercise 14.1 (Sensitivity of naive portfolios)
- Choose a portfolio optimization formulation.
- 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.
- 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.
- For each data sample, solve the portfolio optimization obtaining the solutions \(\w^{(b)}\), \(b=1,\dots,B\).
- Compare the different portfolios \(\w^{(b)}\):
- Use barplots to visually compare the allocations of the different portfolios.
- Plot a histogram of the objective value achieved 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)
- Formulate a minimax version of the robust worst-case mean–variance portfolio for some choice of uncertainty sets for the mean vector and covariance matrix.
- Rewrite the problem in convex form by a brute-force sampling of the uncertainty sets and solve with a solver.
- 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.
- 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)
- Formulate in minimax form the robust mean–variance portfolio with robustness in the variance under an ellipsoidal uncertainty set for the covariance matrix.
- Using the Lagrange dual problem version of the worst-case covariance matrix, rewrite the robust mean–variance portfolio as a regular (not minimax) optimization problem.
- Is this optimization problem 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:
- Naive formulation of the maximum Sharpe ratio portfolio in convex form.
- Robust worst-case formulation of the maximum Sharpe ratio portfolio under general uncertainty sets for the mean vector and covariance matrix.
- 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)
- Choose a portfolio optimization formulation.
- Perform a backtest of
- the naive portfolio
- the bagged portfolio
- the subset resampled portfolio
- the subset bagged portfolio.
- Compare the performance and the computational cost.