# Finding a minimum variance portfolio when using a regulariser?

I am aware that the minimum variance portfolio of a market with $n$ securities can be shown to be:

$$w^* = (1^T_n\Sigma^{-1}1_n)^{-1}\Sigma^{-1}1_n, \\ s.t. \ \ 1^T_nw = 1$$

by using the method of Langrange multipliers or other. I am interested in demonstration of the extension: $$w^* = \underset{w}{\mathrm{argmin}}\lbrace w^T \Sigma w + \lambda\sum_{i=1}^n\rho(w_i)\rbrace\\ s.t. \ \ 1^T_nw = 1$$

where $\rho(.)$ is some arbitrary penalty function (e.g. $\lvert w_i\rvert$).

Perhaps you could go through the process step by step as I am getting lost when I try.

Thanks!

You're not going to get an analytic formula except in special cases of function $\rho(x)$. And you're probably going to want $\rho$ convex.

• If $\rho$ is convex, the problem is a convex optimization problem and can be efficiently solved numerically. If $\rho$ isn't convex, the optimization problem may be difficult to solve.

• If $\rho(x) = |x|$ you basically have the LASSO objective which doesn't have an analytic solution (though the solution can be efficiently found numerically).

• If $\rho(x) = x^2$, you get a clean formula.

### Special case $\rho(x) = x^2$

Then $\lambda \sum_i \rho(w_i) = \lambda \mathbf{w}'I\mathbf{w}$. Your optimization problem is then:

$$\begin{array}{*2{>{\displaystyle}r}} \mbox{minimize (over w_i)} & \mathbf{w}' \left(\Sigma + \lambda I \right)\mathbf{w} \\ \mbox{subject to} & \sum w_i = 1 \end{array}$$

And it's essentially the same as your original problem. $\Sigma$ is replaced by $\Sigma + \lambda I$.

$$w^* = \frac{\left( \Sigma + \lambda I\right)^{-1}\mathbf{1}}{\mathbf{1}'\left( \Sigma + \lambda I\right)^{-1}\mathbf{1}}$$

(Just to be explicit, I use bold letters for vectors and $I$ is the identity matrix.)

-- Update -- Motivated by the comment from @noob2, I've attached a simulated example showing how security weights (in case $n = 8$) change as $\lambda$ increases. As @noob2 pointed out, higher $\lambda$ pushes weights towards the equal weight portfolio.

(Note: I've used a random covariance matrix, not one based on actual data. So don't over generalize anything besides the long run convergence towards 1/n.)

• Interesting. What this is saying is as $\lambda \rightarrow \infty$ make the portfolio look more and more like the $\frac{1}{N}$ portfolio. For $\lambda=0$ take the ususal minvar portfolio. And for $\lambda$ in between, a compromise between these two. Feb 2, 2018 at 15:28
• @noob2 Yeah, I added a picture from an example simulation. Feb 2, 2018 at 15:51
• @MatthewGunn This is very useful thanks. Could you point me towards a resource that demonstrates finding numerical solution in the Lasso case? Maybe an algorithm or pseudocode? Thanks. Feb 2, 2018 at 16:04
• Following my above comment am I right in assuming I could use gradient descent or some Newton Raphson based approach to converge on an optimal solution in the convex case? Feb 2, 2018 at 16:23
• @PsychicSteven717 If you use cvx in MATLAB (you'll have to add carriage returns) cvx_begin variables w(k); dual variable u; minimize(quad_form(w, S) + lambda * norm(w, 1)) subject to: u: sum(w) == 1; cvx_end Of course you can find optimization libraries for any language. Feb 2, 2018 at 16:27