Stock maximize solution