Fast mini-Portfolio Optimization solver fueled by ReHLine.
It is particularly good at solving the problems of the kind
where
git clone https://github.com/softmin/ReHLine-PO.git
# linear constraints Ax + b >= 0
A = np.r_[np.c_[np.ones(n), np.ones(n)*-1.0].T, np.eye(n)]
b = np.r_[-1.0, 1.0, np.zeros(n)]
# other variables (previous weights, transaction costs)
...
from rehline_po import MeanVariance
pf = MeanVariance(mu, cov, A, b, w_prev, transaction_costs)
w = pf.max_quad_util_portf(tol, risk_aversion)
Benchmark against other convex solvers can be found in benchmarks/
.
As the naming suggests, ReHLine-PO is based on an optimization algorithm ReHLine. Mathematical details of the implemetation can be found at
- Python 3.12+
- NumPy 1.26+
- SciPy 1.14+
- PLQ-Composite-Decomposition
- ReHLine-python
- [1] Dai, B., & Qiu, Y. (2023, November). ReHLine: Regularized Composite ReLU-ReHU Loss Minimization with Linear Computation and Linear Convergence. In Thirty-seventh Conference on Neural Information Processing Systems.