I want to solve following constrained optimization problem from portfolio optimization: The solution is supposed to be a modified risk parity portfolio:

The optimization problem is:

\begin{align} w^{opt} = \max_w \sum_{i=1}^N |\mu_i| \log |w_i| \\ u.c. \begin{cases} w'\Sigma w \leq \sigma_{target}^2 \\ w_i > 0 \text{, if } \mu_i \geq 0 \\ w_i < 0 \text{, if } \mu_i < 0 \end{cases} \end{align}

where $\mu_i$ is a given return score, $w_i$ the weight of the i'th asset. Using matrix notation $w$ is a vector of weights $w=(w_1,...,w_N)'$, $|\mu|$ is a vector of the absolute value of return scores $|\mu|= (|\mu_1|,...,|\mu_N|)$, $\Sigma$ is the variance covariance matrix and $w' \Sigma w$ is the portfolio volatility.

When establishing the Lagrangian I have some difficulties to formulate constrain 2 and 3. To guarantee that 2 and 3 are fullfilled I formulate the constraint:

$w_i \cdot sign(\mu_i) > 0 $ or equally $ -w_i \cdot sign(\mu_i) \leq 0 $

Thus the Lagrangian is:

$\mathcal{L}(w,\lambda)= \sum_{i=1}^N|\mu_i| \cdot \log{|w_i|} - \lambda_0 ({ w' \Sigma w}) -\sum_{i=1}^N \lambda_i(-w_i \cdot sign(\mu_i))$

When I implement the optimization in R, for the optimal solution constrained 2 and 3 are not fullfilled anymore.

I wonder if my formulation of the i Lagrange multipliers really addresses constraints 2 and 3. Has anyone any tipps regarding the formulation of constraints 2 and 3 so that I can implement it using Newtons Method? Or as an alternative knows a way to incorporate upper and lower bounds for the $w$'s?

  • $\begingroup$ You don't need any logical statement, $w_i \cdot sign(\mu_i)>0$ suffices. And by the way you should use $\geq$ instead, since otherwise the problem is ill-posed. $\endgroup$ – AndreaCassioli Sep 10 '14 at 12:15
  • $\begingroup$ Thanks for the answer. I think I cannot tackle this optimization problem with Newton's method. As I see it it is not able to incorporate the $-w_i sign(\mu_i) \leq 0$ constraint. I think sequntial quadratic programming fits better but the constraint is not three times continuously differentiable. So I'm not sure if SQP is able to tackle the problem... $\endgroup$ – Stevie88 Sep 11 '14 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.