I have the following optimization problem:
$min_{w} \sum^{N}_{i=1} |\mu_i| \cdot log(|w_i|) $ s.t.
$\sqrt{w' \cdot \Sigma \cdot w} \leq 0.05$
$w_i > 0 $ if $\mu_i > 0$
$w_i < 0 $ if $\mu_i < 0$
$\sum^{N}_{i=1} |w_i| = 1$
The optimization algorithm that I have chosen is SQP (for reasons not discussed here). However, this algorithm requires smooth objective functions that are continous and differentiable. As I have the absolute and log in my function, this requirement seems to be violated.
I understand that then the general practice is to reformulate this problem. I am however puzzled how to do this. How could this problem be reformulated? Where do you start?
I am assuming here that $\mu_i$ is constant. Here is a possible formulation:
Let $s_i = \text{sign}(\mu_i)$ and $\varepsilon=10^{-6}$
NLP: $$\begin{align} \min & \sum_i |\mu_i| \log(\varepsilon+s_i w_i)\\ & w'Qw \le 0.05^2\\ & \sum_i s_i w_i = 1 \\ & w_i \le 0 && \forall i| s_i=-1\\ & w_i \ge 0 && \forall i|s_i=+1 \end{align}$$
Notes: