Ridge Regularization in Minimum-Variance Portfolio Optimization
Summary
The document explains how to include ridge shrinkage when minimizing portfolio variance subject to weights summing to one. It distinguishes a quadratic penalty on squared weights from a linear term and shows how the penalty fits the quadratic-programming objective used by a solver such as MATLAB’s quadprog.
One approach is to constrain the squared norm of the weights, with the constraint level corresponding inversely to the penalty strength. Alternatively, adding the penalty directly to the objective amounts to adding a scaled identity matrix to the covariance matrix. The answer relates this formulation to prior work on portfolio norm constraints. It does not provide empirical comparisons, solver code, or guidance on selecting the regularization level; the correspondence is stated conceptually rather than derived in detail.
Key ideas
- A squared-weight ridge penalty can be included in the quadratic objective by adjusting its quadratic matrix.
- A norm constraint offers another way to regularize portfolio weights while retaining variance minimization.
- The norm bound and additive penalty strength are described as having an inverse correspondence.
- The portfolio is constrained to have weights that sum to one.
Tags
Full text
# Ridge and Quadratic Programming for Portfolio Norm Optimization
# Ridge and Quadratic Programming for Portfolio Norm Optimization
Much like this post: https://stats.stackexchange.com/questions/119795/quadratic-programming-and-lasso, I'm trying to integrate RIDGE Penalty in a dedicated quadratic solver. In my case, I am working with quadprog from MATLAB. Unlike LASSO where you can eliminate the absolute value in the constrained form and rewrite them in linear form (effectively keeping a quadratic problem), you can't with RIDGE. This means that in order to have a quadratic problem, I have to work with the penalty form:
$$ RIDGE: \sum_{i=1}^{N} (y - x'\beta)^2 + \lambda \sum \beta_{i}^{2}$$
My explicit problem is to minimize the variance with added RIDGE Penalty.
$${\underset{w}{\arg\min}} \frac{1}{2} w' \Sigma w \ + \lambda \sum w_i^{2}$$ $$s.t. \ \sum_{i=1}^{N} w_i = 1$$
Basically, I want to minimize the variance while summing the weights to 1. A pretty standard problem in finance. My question is: How to adapt the objective function so that it includes the penalty? When working with a dedicated solver like quadprog, you can only specify the positive definite squared matrix and the vector for the unsquared terms. With the formulation below, you then specify $H$ and $f$. Link: https://www.mathworks.com/help/optim/ug/quadprog.html
$${\underset{x}{\arg\min}} \frac{1}{2} x' H x \ + f'x$$
I can either modify H (which is my covariance matrix), but this would change the number of values in my $w$ vector, or I could work with $f'$, but this is for unsquared term. I need to implement $\lambda x'x$ in my objective function, which is equal to $\lambda \sum x_i^{2}$.
## Answer by develarist (score 2, accepted)
https://quant.stackexchange.com/a/58542
The model you were assigned comes from the following paper:
- de Miguel et al (2009) A Generalized Approach to Portfolio Optimization: Improving Performance by Constraining Portfolio Norms
Instead of using an additive penalty term, the ridge shrinkage of the portfolio weight vector should, or works best, as a separate constraint:
$${\underset{w}{\arg\min}} \frac{1}{2} w' \Sigma w \ $$
\begin{aligned} s.t. & \sum w_i^{2} \leq \delta^2 \\ & \ \sum_{i=1}^{N} w_i = 1 \end{aligned}
where $\delta$ has a one-to-one inverse correspondence to $\lambda$. In other words, instead of increasing $\lambda$ to make the portfolio weights smaller, you decrease $\delta$ to achieve the same regularization effect.
This is what is meant by adapting the objective function for the penalty. The linear regression formula first shown is better suited to the Lagrangean approach to regularization, whereas the optimization (second) formula you showed is better suited to the constrained optimization approach of regularization, and also deflects concerns of non-linear optimization since the main objective function (portfolio variance) I wrote is quadratic as is, while the two constraints are linear. Both approaches are equivalent due to the one-to-one correspondence between $\lambda$ and $\delta$.
If you insist on using the additive $\lambda$ penalty term, then the objective would reduce to the well-known closed-form analytical solution for the ridge covariance matrix where $I$ is an identity matrix the size of $\Sigma$.
$${\underset{w}{\arg\min}} \frac{1}{2} w'(\Sigma + 2\lambda I)w$$ $$s.t. \ \sum_{i=1}^{N} w_i = 1$$Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.