Implementation of the solution to the Maximum Expected Returns optimization problem.