What happened

Hershey (HSY -2.07%) stock outpaced the market last month by gaining 13% compared to a 1% uptick in the S&P 500, according to S&P Global Market Intelligence. That rally put shareholders of the confectioner solidly above the market in 2019, with returns over 35% compared to a 14% increase in the S&P 500.

A close-up of chocolate bars and hazelnuts

Image source: Getty Images.

So what

July's rally was supported by solid earnings results, with Hershey reporting strong sales and profit results late in the month. Second-quarter organic sales rose 2% despite the headwinds from the company's portfolio reboot efforts. Those initiatives include the divestment of underperforming brands and the addition of savory snacks like the recently acquired Pirate and Amplify franchises.

Now what

CEO Michele Buck and her team believe the new brands, which carry higher profit margins, will help push profitability higher by a full percentage point in 2019. They are also confident in hitting their target of a 2% sales uptick to mark just a small slowdown from last year's 3.7% increase. A stronger portfolio and reduced cost infrastructure, meanwhile, puts Hershey in a better position to potentially return to faster growth beginning in fiscal 2020.