We encourage users to exploit their models thoroughly to reach a SOC-equivalent problem, thereby making the most of the versatility and practical performance of the NAG SOCP solver nag_opt_handle_solve_socp_ipm.
In this section, we show the performance of the NAG SOCP solver from the NAG Library for Python together with the NAG SOCP solver called from CVXPY and the default solver in CVXPY. While we used Python, the same NAG SOCP solver is available in many other environments (C, Java, Fortran, etc.). All solvers were at default settings with accuracy at and in single-threaded mode.
The solvers were used on classic portfolio optimization problems ranging from 1100 to 2900 assets. Randomly generated data was used in a Markowitz model whose objective involved a large covariance matrix and was subject to a long-only constraint and a budget constraint.
The computational time comparison can be found in Figure 2. Here it can be seen that the NAG solver called from CVXPY is faster than the standard CVXPY solver. Further, for smaller problems, the NAG solver called from Python is at least twice as fast as standard CVXPY, becoming as much as five times faster for larger problems.
Figure 2: Comparison of time on portfolio optimization problems.
In conclusion, SOCP is widely used in finance due to its powerful nature. At Mark 29.3, NAG introduces an updated SOCP solver (nag_opt_handle_solve_socp_ipm) that is highly performant on portfolio optimization problems. In some cases, reformulation of your problem is required, yet it is worth the effort. For further examples and reading visit our GitHub Local optimization page.
The solver is available for multiple languages and environments including C and C++, Python, Java, .NET and Fortran, on Windows, Linux and MacOS. See the Getting Started page for how to download and install.