Foggalong / RobustOCS

Robust optimal contirbution selection problems for genetics with Python
https://pypi.org/project/robustocs
MIT License
1 stars 0 forks source link

Alternate Framing #8

Open Foggalong opened 4 months ago

Foggalong commented 4 months ago

We frame this problem as the return maximization problem

$$ \maxw \left(\min{\mu\in U_{\mu}} \left(w^{T}\mu \right) - \frac{\lambda}{2}w^{T}\Sigma w\right) \text{ subject to }\ Mw = \begin{bmatrix} 0.5 \ 0.5\end{bmatrix},\ l\leq w\leq u, $$

which after some wrangling becomes

$$ \max_{w,z} \left(w^{T}\bar{\mu} - \kappa z - \frac{\lambda}{2}w^{T}\Sigma w\right) \ \text{ subject to }\ z^2\geq w^{T}\Omega w,\ Mw = \begin{bmatrix} 0.5 \ 0.5\end{bmatrix},\ l\leq w\leq u. $$

and this seems to work well. When we first started though, we initially framed the problem as the risk minimization problem

$$ \minw \left(\frac{1}{2}w^{T}\Sigma w - \lambda\max{\mu\in U_{\mu}} \left(w^{T}\mu \right)\right)\ \text{ subject to }\ Mw = \begin{bmatrix} 0.5 \ 0.5\end{bmatrix},\ l\leq w\leq u, $$

which after similar (though slightly gnarlier) wrangling becomes

$$ \min_{w,z} \left(\frac{1}{2}w^{T}\Sigma w - \lambda w^{T}\mu - \lambda\kappa z\right)\ \text{ s.t. }\ z^2\leq w^{T}\Omega w,\ Mw = \begin{bmatrix} 0.5 \ 0.5\end{bmatrix},\ l\leq w\leq u. $$

We dropped this because the mathematics was far fiddlier, but as a non-crucial extension, it could be interesting to add a similar solver for this formulation to the module. I don't anticipate that being beneficial any more, but in the Jupyter testing I did note that it ran significantly slower on this formulation and it could be interesting to back that with analysis.

jajhall commented 4 months ago

In the return maximization problem, $z^2\geq w^{T}\Omega w$ (for non-negative $z$) is the set of points on/above the triangular cone $z=\sqrt{w^{T}\Omega w}$, which is a convex set. So, for example, it can be approximated by linearizations.

In the risk minimization problem, $z^2\leq w^{T}\Omega w$ (for non-negative $z$) is the set of points on/below the triangular cone $z=\sqrt{w^{T}\Omega w}$, which is not a convex set. Hence the optimization is vastly more difficult.

jajhall commented 4 months ago

For an appropriate value of $\lambda$, the return maximization problem should be equivalent, so the two problems should be identical from the point of view of convexity. Since the $z^2\leq w^{T}\Omega w$ constraint comes from optimization of the uncertainty term being $kz$ for $z=\sqrt{w^{T}\Omega w}$, are you sure there's not a minus sign error that puts you on the wrong side of $z^2= w^{T}\Omega w$?

Foggalong commented 4 months ago

the two problems should be identical from the point of view of convexity

That's a good shout, I think I may have been thinking of the wrong way around. If I get round it this checking for a sign error is where I'll start :+1:

gregorgorjanc commented 3 months ago

Skimming through the above notes, shouldn’t the last expression involve mubar instead of mu?

Foggalong commented 3 months ago

@gregorgorjanc it should indeed, I think that's a copy past error because the code did use $\bar{\mu}$.