# Mean-Variance optimization with no short selling

I am wondering how I can find the vector of Lagrange multipliers $$\mu$$ for the non-negativity constraint of the following problem:

$$L(w,\lambda, \mu) = w^{T}\Sigma w - \lambda(w -1) + \mu w$$

So far what I cam up with is, that $$\mu$$ can be isolated with first order condition $$\frac{\partial L }{\partial w}$$:

$$\Sigma w - \lambda = - \mu$$ $$\mu = \lambda - \Sigma w$$

Is there a way I can find a explicit solution for $$\mu$$?

I have no background in finance nor optimization, every suggestion or comment is appreciated, thanks!

• Is $\mu$ the expected returns vector of the assets? Why do you want to solve this when it's just a given input to the model. you should be interested in $w$ (or $\lambda$) only Commented Apr 14, 2020 at 11:05
• $\mu$ is the Lagrange multiplier of the positivity constraint (i.e. w > 0) Commented Apr 14, 2020 at 13:50

You can use Lagrangian only with equal type constaints. There are inqualities in your problem, namely $$w \ge 0$$ and $$w \le 1$$. Hence Lagrange method cannot be employed here.

According to tags you added to the question, you are solving Markowitz optimization problem. One of its formulation (maximizing profit and minimizing risk at the same time) is

$$f = \mu ^T w - \lambda w^T\Sigma w \rightarrow \text{MAX},$$

subjected to $$0 \le w \le 1$$ and $$\sum w_i =1$$. Vector $$\mu$$ contains expected returns of assets in portfolio, $$\Sigma$$ is covariance matrix of returns and parameter $$\lambda$$ is used for setting averse to risk. Higher $$\lambda$$ means higher risk averse.

• are you calling $r$ what he is calling $\mu$? Commented Apr 14, 2020 at 11:06
• @secretsanta: As I mentioned in my answer, Lagrangian method can be used only for optimization with constraints in form of equalities. In your cae $\mu w$ means condition $w=0$ which does not make sense. Commented Apr 14, 2020 at 16:52