I have a portfolio optimization problem similar to this question here, with a V-shape transaction costs such that we pay a fee proportionally to the sum of absolute rebalancing: $$TC(\omega) = \frac{1}{2} |\omega-\omega_\text{old}|' \cdot \gamma$$ where $$\omega : \text{target portfolio to optimize},$$ $$\omega_\text{old} : \text{initial portfolio},$$ $$\gamma : \text{vector of average bid-ask spread}.$$
Essentially, my problem can be written as
$$ \omega_{opt} = \arg\min {\lambda \omega'\Sigma\omega + TC(\omega) - \omega'\alpha } \\ \text{ s.t. }\omega_{i} \in [0,1], \forall i \text{ (no short-sell)}\\ \sum_{i=1}^n \omega_i = 1, \\ \sum_{i=1}^n |\omega_i - \omega_{\text{old,i}}| \leq 0.5 \text{ (turnover constraint)}, \\ |\omega_i - \omega_{\text{old,i}}| \leq 0.1, \forall i \text{ (concentration constraint)}, \\ \beta = \omega' \Sigma \omega_{old}/\sigma^2 = 1 \text{ (beta constraint)}$$
I managed to solve this using scipy.minimize
in python
, but it is not really "clean".
My question is: can I transform this into a quadratic / convex optimization problem such that I can then use cvxopt
to implement the solution?
My guess was to introduce some new variables $p$ and $q$ such that the $TC$ part becomes equivalent to:
$$\frac{1}{2} (p+q)' \cdot \gamma$$
s.t.
$$ p_i, q_i \geq 0, \forall i \\ \omega - \omega_{old} = p - q$$
such that the absolute term disappears, but then I end up with 3 times more unknowns: $\omega, p$ and $q$. Then I don't know if this is possible to reformulate that problem into a convex quadratic program of the form:
$$ \text{minimize } \frac{1}{2} x'Px+ c'x \\ \text{ s.t. }G x \leq h\\ Ax = b \\$$ with $P$ positive semi-definite and feed it into the convex optimizer.
EDIT: I have reformulated the objective function with the change of variables using $p$ and $q$ to get:
$$\omega - \omega_{old} = p - q \rightarrow \omega = \omega_{old} + p - q \\ \Rightarrow \lambda \omega'\Sigma\omega + TC(\omega) - \omega'\alpha = \lambda (\omega_{old} + p - q)'\Sigma(\omega_{old} + p - q) + \frac{1}{2} (p+q)'\gamma - (\omega_{old} + p - q)'\alpha \\ = \lambda (\omega_{old} + p - q)'\Sigma(\omega_{old} + p - q) + \frac{1}{2} (p+q)'\gamma - (p - q)'\alpha$$
where in the last line I removed the constant term $-\omega_{old}'\alpha$,
s.t.
$$p_i, q_i \geq 0, \forall i \\ \omega - \omega_{old} = p - q \\ \omega_{old,i} + p_i - q_i \in [0,1], \forall i \text{ (no short-sell)}\\ \sum_{i=1}^n (\omega_{old,i} + p_i - q_i) = 1, \\ \sum_{i=1}^n (p_i+q_i) \leq 0.5 \text{ (turnover constraint)}, \\ (p_i+q_i) \leq 0.1, \forall i \text{ (concentration constraint)}, \\ \beta = (\omega_{old} + p - q)' \Sigma \omega_{old}/\sigma^2 = 1 \text{ (beta constraint)}$$
The latter expression is close to the expected canonical form $\frac{1}{2} x'Px+ c'x$.
It also turns out that $\omega_{old}' \Sigma \omega_{old}/\sigma^2 = 1$, so the latter constraint would translate into $(p - q)' \Sigma \omega_{old}/\sigma^2 = 0$.
But then what? Do I need to do another change of variable or do I need to solve for $p$ and $q$, and in this latter case how? Do I need to stack up $p$ and $q$ in a vector $x$ of size $2n$, with $n$ being the number of assets (and also the dimension of $\omega$)?