Stocks climbed on Friday thanks to positive earnings news. The Dow Jones Industrial Average (DJINDICES:^DJI) and the S&P 500 (SNPINDEX:^GSPC) both gained about a half-percent.

Today's stock market

Index Percentage Change Point Change
Dow 0.54% 136.42
S&P 500 0.46% 13.13

Data source: Yahoo! Finance.

Consumer stocks led the market, lifting the Consumer Staples Select Sector SPDR ETF (NYSEMKT:XLP) up 1.2%. Energy was the only losing sector, with the SPDR S&P Oil & Gas Exploration & Production ETF (NYSEMKT:XOP) falling 1.1% on lower oil prices.

As for individual stocks, the Kraft Heinz Company (NASDAQ:KHC) gave a boost to the packaged food industry with an upbeat outlook and Groupon (NASDAQ:GRPN) missed expectations but stoked takeover hopes.

Rising stock graph, man with a dollar sign.

Image source: Getty Images.

Kraft Heinz delivers good results, upbeat outlook

Kraft Heinz served up some optimism when it beat expectations for second-quarter earnings, sending shares up 8.6%. Net sales managed a 0.7% gain to $6.69 billion, while analysts were expecting a decline to $6.59 billion. Adjusted earnings per share improved 2% to $1.00, beating the consensus estimate of $0.92 in EPS.

Sales in the U.S. fell 1.9% and Canada net sales dropped 8.2% excluding currency effects. But Europe, the Middle East, and Africa grew 4% organically and sales to the rest of the world were up 10.8% on that basis. Adjusted EBITDA declined 4.4%, with a lower tax rate accounting for the EPS gain.

Besides the strong results, what got investors excited were upbeat comments on the outlook. Kraft expects the U.S. to return to organic sales growth from Q3 forward and the trend in adjusted EBITDA to improve in Q4, gaining momentum into 2019.

"Our results through the first half were stronger than the expectations we put forward as recently as three months ago, and we have been even more encouraged by our recent performance in the marketplace," said CEO Bernardo Hees. Kraft believes the strong pipeline of new products will drive sustainable top-line growth.

The better-than-expected results and the cheery outlook were enough to get investors believing that the worst might be over for Kraft, a Warren Buffett favorite that has been battling disruption with innovation and marketing investments.

Groupon rises on takeover hopes 

Shopping deals specialist Groupon reported second-quarter results that missed expectations on both the top and bottom lines, causing the share price to fall initially, but the stock reversed course during the conference call, when comments by CEO Rich Williams added fuel to takeover rumors. Shares finished up 2.5%.

Revenue fell 6.8% to $617 million and non-GAAP earnings per share came in at $0.02, flat compared with the period a year earlier. Analysts were expecting the company to earn $0.03 on revenue of $632 million.

Groupon is focusing on growing gross profit in a turnaround effort, and had some success in its international business. International gross profit increased 11%, or 4% in currency-neutral terms, to $104.3 million. North America gross profit fell 6% to $219.4 million. Overall, gross profit fell 1%, or 3% excluding currency effects. Compared with last quarter, the number of active customers fell from 49.6 million to 49.3 million, but the gross profit per active customer improved from $27.16 to $27.27. 

Groupon shares were down 10% early in the day, but late in the conference call an analyst asked about takeover rumors. Williams replied by pointing out the company's expanding partnerships and growth in adjusted EBITDA and free cash flow, and then said, "So it's not surprising that we've received some expressions of interest on that side, as we have from time to time in the past, and our board always takes that very seriously."

That was enough to fuel investor hopes and save the shares from a big loss on the day.