Stocks drifted between gains and losses in a low-volume summer session on Thursday. The Dow Jones Industrial Average (DJINDICES:^DJI) and the S&P 500 (SNPINDEX:^GSPC) ultimately closed in the red.

Today's stock market

Index Percentage Change Point Change
Dow (0.29%) (74.52)
S&P 500 (0.14%) (4.12)

Data source: Yahoo! Finance.

Energy stocks had another bad day, with the Energy Select Sector SPDR ETF (NYSEMKT:XLE) losing 0.9%. Chinese stocks rebounded from trade-related weakness; the iShares China Large-Cap ETF (NYSEMKT:FXI) closed up 1.5%.

As for individual stocks, Roku (NASDAQ:ROKU) reported a blowout quarter, while Rite Aid (NYSE:RAD) and Albertsons announced they are terminating their planned merger.

Front of New York Stock Exchange.

Image source: Getty Images.

Roku's platform business is soaring

Streaming-media company Roku reported second-quarter results that blew away its previous guidance and Wall Street expectations, causing shares to rocket 21.3% higher. Revenue jumped 57% to $157 million after the company had told investors three months ago to expect $135 million to $145 million. Roku also reported a slight profit when observers were expecting a loss of $0.15 per share.

Roku got its start selling streaming devices, but its pivot to selling a platform built into smart televisions and offering an ad-supported streaming service is clearly working. Platform revenue soared 96% to $90.3 million. Player revenue had a strong showing after falling in Q1, growing 24% to $66.5 million. Gross profit increased 83% from the period a year earlier, excluding the benefit from a one-time accounting credit. Active accounts grew 46% to 22 million, streaming hours were up 57% to 5.5 billion hours, and average revenue per user increased 48% to $16.60.

Looking forward, Roku raised its outlook for full-year revenue by $25 million to a range of $710 million to $730 million and now says it expects 2018 adjusted EBITDA to be between $11 million and $23 million, up from a loss at the midpoint of the previous range.

The latest quarter shows that Roku is firing on all cylinders as it takes advantage of its leadership position with cord-cutters.

Albertsons and Rite Aid call the whole thing off

Rite Aid and privately held Albertsons called off their impending merger, citing objections from shareholders, but investors who traded Rite Aid stock today didn't seem to like the decision, and shares tumbled 11.5%.

The two companies issued a joint statement yesterday, one day ahead of a special shareholder meeting. "While we believed in the merits of the combination with Albertsons, we have heard the views expressed by our stockholders and are committed to moving forward and executing our strategic plan as a stand-alone company," said Rite Aid Chairman and CEO John Standley in the press release. Neither company will be responsible for payments to the other party as a result of the merger termination.

The decision apparently ends years of Rite Aid's attempts to sell itself, starting with a plan in 2015 to merge with Walgreens Boot Alliance that ended with Rite Aid selling only some of its stores to its rival. The company is now struggling with a lack of scale, warning just three days ago that generic drug purchasing efficiencies will be lower than expected and lowering its outlook for the year.

According to an article in The Wall Street Journal (subscription required), several of Rite Aid's largest shareholders had planned to vote against the deal because they felt the terms undervalued the company's retail business and pharmacy-benefit management unit. But for today, at least, investors seem to believe the company is worth even less now that it will be going it alone.

Jim Crumly owns shares of Roku, Inc. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.