The stock market gave up a modest amount of ground on Wednesday, reacting negatively to worries about sluggish growth in the Chinese economy and some lackluster earnings results among major U.S. corporations. Yet when you look at major benchmarks, the size of the declines was relatively small, showing the overall confidence that investors seem to have about the state of affairs for the market. Moreover, some good news for key companies helped lift some stocks. HEXO (NASDAQ:HEXO), Smart & Final Stores (NYSE:SFS), and Ericsson (NASDAQ:ERIC) were among the top performers. Here's why they did so well.

HEXO gets high praise from B of A

Shares of HEXO picked up over 11% after the Canadian cannabis company got good marks from analysts at Bank of America/Merrill Lynch. Analysts gave HEXO a buy rating and a price target of $10 per share, calling it a "top pick in cannabis" and suggesting that its valuation is relatively attractive compared to its marijuana stock peers. B of A/Merrill also pointed to HEXO's innovative spirit and willingness to make future partnerships as key assets, and with a stable supply of cannabis secured, shareholders hope that HEXO will be able to make the most of the opportunities for growth in marijuana both in Canada and around the world.

Person in white lab coat in front of greenhouse full of cannabis plants.

Image source: HEXO.

Smart & Final makes a deal

Smart & Final Stores saw its stock soar 20% after the discount retailer agreed to an acquisition bid from a private equity investor. Funds associated with Apollo Global Management offered to pay $6.50 per share in cash for Smart & Final, putting a total value of $1.1 billion on the value-oriented food and staples seller. Smart & Final CEO David Hirz said that he expects the company to "benefit from Apollo's strategic guidance, which will help us accelerate our existing strategy in a dynamic industry environment." Given that the stock had struggled through much of the past several years, the acquisition provides a nice exit for Smart & Final shareholders, who'll now be able to move on from a lackluster investment.

Ericsson gets good reception

Finally, shares of Ericsson jumped 7%. The maker of mobile telecom equipment said that adjusted revenue in the first quarter of 2019 was higher by 7% from year-ago levels, with the company citing particular strength in the North American market. Ericsson also reversed a year-ago loss by posting a solid profit, and CEO Borje Ekholm pointed at the company's strategy in taking advantage of the rollout of 5G technology as being instrumental to its recent success. With the prospects for 5G to take off in the U.S. and elsewhere across the globe in the years to come, Ericsson looks like it's moving in the right direction.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.