Exercises
Exercise 11.1 (Change of variable) Show why \bSigma\bm{x} = \bm{b}/\bm{x} can be equivalently solved as \bm{C}\bm{x} = \bm{b}/\bm{x}, where \bm{C} is the correlation matrix defined as \bm{C} = \bm{D}^{-1/2}\bSigma\bm{D}^{-1/2} with \bm{D} a diagonal matrix containing \textm{diag}(\bSigma) along the main diagonal. Would it be possible to use instead \bm{C} = \bm{M}^{-1/2}\bSigma\bm{M}^{-1/2}, where \bm{M} is not necessarily a diagonal matrix?
Exercise 11.2 (Naive diagonal risk parity portfolio) If the covariance matrix is diagonal, \bSigma = \bm{D}, then the system of nonlinear equations \bSigma\bm{x} = \bm{b}/\bm{x} has the closed-form solution \bm{x} = \sqrt{\bm{b}/\textm{diag}(\bm{D})}. Explore whether a closed-form solution can be obtained for the rank-one plus diagonal case \bSigma = \bm{u}\bm{u}^\T + \bm{D}.
Exercise 11.3 (Vanilla convex risk parity portfolio) The solution to the formulation \begin{array}{ll} \underset{\bm{x}\ge\bm{0}}{\textm{maximize}} & \bm{b}^\T\log(\bm{x})\\ \textm{subject to} & \sqrt{\bm{x}^\T\bSigma\bm{x}} \le \sigma_0 \end{array} is \lambda\bSigma\bm{x} = \bm{b}/\bm{x} \times \sqrt{\bm{x}^\T\bSigma\bm{x}}. Can you solve for \lambda and rewrite the solution in a more compact way without \lambda?
Exercise 11.4 (Newton's method) Newton’s method requires computing the direction \bm{d} = \mathsf{H}^{-1}\nabla f or, equivalently, solving the system of linear equations \mathsf{H}\,\bm{d} = \nabla f for \bm{d}. Explore whether a more efficient solution is possible by exploiting the structure of the gradient and Hessian: \begin{aligned} \nabla f &= \bSigma\bm{x} - \bm{b}/\bm{x},\\ \mathsf{H} &= \bSigma + \textm{Diag}(\bm{b}/\bm{x}^2). \end{aligned}
Exercise 11.5 (MM algorithm) The MM algorithm requires the computation of the largest eigenvalue \lambda_\textm{max} of matrix \bSigma, which can be obtained from the eigenvalue decomposition of the matrix. A more efficient alternative is the power iteration method. Program both methods and compare their computational complexity.
Exercise 11.6 (Coordinate descent vs. SCA methods) Consider the vanilla convex formulation \begin{array}{ll} \underset{\bm{x}\ge\bm{0}}{\textm{minimize}} & \frac{1}{2}\bm{x}^\T\bSigma\bm{x} - \bm{b}^\T\log(\bm{x}). \end{array} Implement the cyclical coordinate descent method and the parallel SCA method in a high-level programming language (e.g., R, Python, Julia, or MATLAB) and compare the convergence against the CPU time for these two methods. Then, re-implement these two methods in a low-level programming language (e.g., C, C++, C#, or Rust) and compare the convergence again. Comment on the difference observed.