Solves portfolio optimization problems