How do I maximize utility subject to contraint via Langrangian function

71 Views Asked by At

I have the following Utility function: \begin{align} U = w^\prime\mu - \frac{c}{2}w^\prime\Sigma w \end{align}

The Langrangian function subject to the constraint that the weights need to sum up to one is: \begin{align} F (w, \lambda)= w^\prime\mu - \frac{c}{2}w^\prime\Sigma w - \lambda(w^\prime i - 1) \end{align} Taking the first derivative with respect to the weights and the lambda respectively leads to the following equations: \begin{align} \begin{split} \frac{\partial F}{\partial w}= & \mu - c\Sigma w - \lambda i\\ \frac{\partial F}{\partial \lambda}= & -(w^\prime i - 1)\\ \end{split} \end{align} Solving the system analytically, the formula for optimization of the weights is found: \begin{align} \begin{split} w= & \frac{1}{c}\Sigma^{-1}(\mu - \lambda i)\\ i^Tw= & 1 = \frac{1}{c}i^T\Sigma^{-1}\mu - \frac{\lambda}{c}i^T\Sigma^{-1}i\\ \lambda= & \frac{i^T\Sigma^{-1}\mu - c}{i^T\Sigma^{-1}i}\\ \end{split} \end{align} \begin{align} w = \frac{1}{c}\Sigma^{-1} \left(\mu - \frac{i^T\Sigma^{-1}\mu - c}{i^T\Sigma^{-1}i}i\right) \end{align}

However, when my c = 0 (risk aversion is zero), my utility function becomes: \begin{align} U = w^\prime\mu \end{align} and my Langrangian function subject to constraint: \begin{align} F (w, \lambda)= w^\prime\mu - \lambda(w^\prime i - 1) \end{align}

But then I get stuck and do not know how to solve the system and obtain the function for the weights.. I really hope someone can show me how to get the right function for the weights! Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

If you are risk-neutral ($c=0$) and one stock has an expected payoff greater than the other, then you earn a profit from selling $k$ units of the second stock and using the proceeds to buy $k$ units of the first stock. So you can set $k \mapsto \infty$ and earn an infinite expected profit, meaning the problem is unbounded and Lagrange multiplier theory breaks down. For this reason, if you are choosing a small/zero value of $c$ then you need another constraint, although you lose your ability to obtain a closed form solution in this case.

You might want to consider limiting short-selling (e.g. $x_i \geq -k, \ \forall i$) or limiting the total magnitude of $x$ via $\vert \vert x \vert \vert_1 \leq k$. The second approach has the advantage of promoting sparsity according to this paper: http://www.pnas.org/content/106/30/12267.short