The stock market climbed Friday morning, bouncing back from weakness the previous day. New economic data signaled further declines in inflation rates, and although year-over-year price changes remain well above the Federal Reserve's 2% target, investors seemed increasingly optimistic that the economy might avoid a recession entirely. Market indexes were up as much as 1.5% by 10 a.m. ET.

Several stocks stood out as strong gainers early in the session. Roku (ROKU 3.37%) continued to make progress in its efforts to take advantage of the fast-growing connected television market, while Boston Beer (SAM 0.66%) sought to get its stock moving in the right direction after a massive pullback in recent years. Below, you'll learn why their latest earnings reports helped send both of these stocks higher.

Roku claws its way back

Shares of Roku were up almost 20% Friday morning. The connected TV streaming specialist reported second-quarter financial results that showed how hard it's working on restoring its former growth trajectory.

Roku's numbers gave shareholders hope for the future. Revenue climbed 11% year over year to $847 million, with roughly equal contributions to top-line growth from both the platform and devices segments. Despite declines in gross margin, Roku effectively kept its operating expenses under control. Roku still lost money, but even though the losses were more extensive than in the year-ago period, they were much improved from levels three and six months ago.

Viewership metrics continued to work in Roku's favor. The company had 73.5 million active accounts, up 10.4 million over the past 12 months. Viewers streamed a total of 25.1 billion hours of content, up 21% year over year, and although revenue per user was down 7%, that wasn't enough to take away all of Roku's sales gains.

Roku expects current trends to remain in place, with macroeconomic concerns weighing on consumer demand to some extent. However, investors seem content with Roku's long-term story, as traditional cable TV gives way to the streaming video experience that Roku is concentrating all of its efforts on.

Boston Beer toasts its shareholders

Elsewhere, shares of Boston Beer climbed 18%. The brewer's second-quarter financial results finally gave shareholders some much-needed relief after a stock price decline that has lopped off more than two-thirds of Boston Beer's value since late 2020.

Not all of Boston Beer's financial numbers were attractive, but the one that matters most was. Revenue fell 2.1% year over year to $603 million, weighed down by a 3% drop in inventory depletions and a 4.5% decline in shipment volume. Yet Boston Beer improved its margins considerably, and net income climbed 9% to $58 million, working out to $4.72 per share.

Boston Beer continued to report difficulties in the hard seltzer category, which was the primary generator of so much shareholder excitement in 2019 and 2020 that led to the stock's rise and subsequent fall. However, strong growth in the company's Twisted Tea product helped to offset those challenges on the hard seltzer front.

Investors were also pleased to see Boston Beer maintain its guidance for $6 to $10 per share in earnings for the full 2023 year, as the company uses its pricing power to boost what it charges for its products to offset costs. With beer stocks seeing a lot of volatility based on changing consumer trends, Boston Beer has to take advantage of opportunities to rebuild market share.