A volatile week for the stock market ended with more volatility on Friday. The major indices started the morning with solid gains, only to largely give up those gains by early afternoon.

Index

Change at 12:10 p.m. EDT

Dow Jones Industrial Average (^DJI 0.67%)

0.06%

S&P 500 (^GSPC 0.87%)

(0.05%)

Nasdaq Composite (^IXIC 1.11%)

(0.41%)

Data source: Yahoo! Finance.

Two stocks that moved in the right direction for investors were Campbell Soup (CPB 2.08%) and Ambarella (AMBA 0.15%). Both companies reported results that handily beat expectations, leading to a strong rally for each.

Improved margins for Campbell Soup

Packaged food stocks haven't exactly been the toast of Wall Street lately, but Campbell Soup showed Friday that it could still put up solid results. The company behind Campbell's, Pepperidge Farm, Pacific Foods, and a host of other brands beat analyst expectations with its fiscal fourth-quarter report, driving margin improvements along the way. The stock was up about 8.7% at 12:10 p.m. EDT.

A can of soup.

Image source: Campbell's Soup.

Campbell's $2.02 billion revenue was good for a 2% increase from last year, and $40 million higher than the average analyst estimate. Excluding businesses that Campbell's agreed to sell in July, revenue was up 2% to $1.78 billion.

This growth was driven by the snacks segment, which grew sales by 3% to $967 million. Pepperidge Farm bakery products did well in the quarter, as did Kettle Brand potato chips and Goldfish crackers. A recall of Goldfish crackers in 2018 hurt sales last year, so growth for that brand wasn't surprising.

The meals and beverages segment generated $813 million of revenue, roughly the same as the prior-year period. U.S. soup sales rose 3%, offsetting weak sales of V8 beverages. Prego pasta sauce and Pace salsa also performed well in the quarter.

Campbell's also beat analyst expectations for earnings. The company's adjusted earnings per share came in at $0.49, nearly doubling from the prior-year period and $0.09 higher than analyst estimates. Excluding the businesses sold last month, adjusted EPS was up 14% to $0.42.

Campbell's stock has been hammered over the past few years -- it started 2019 down about 50% from highs reached in 2016. It's recovered some of that lost ground this year, and Friday's solid earnings report kept that rally intact.

Ambarella sees growth returning soon

Sales were down in the second quarter for semiconductor company Ambarella, but the market had been expecting much worse. The computer vision specialist blew past analyst estimates, leading to a 17.9% surge in the stock by 12:10 p.m. EDT.

Ambarella produced revenue of $56.4 million, down 9.7% year over year. This was more than $4 million higher than analysts were expecting, the result of improving demand from a large security camera customer in China and of growth in the computer vision (CV) business. Ambarella produced mass-production CV revenue from three customers in the quarter and preproduction CV revenue from more than 40 customers.

The company earned $0.21 per share on an adjusted basis, down from $0.25 per share in the prior-year period. This too was well above expectations, beating analyst estimates by $0.19 per share. Ambarella expects growth to return in the third quarter with revenue between $63 million and $67 million. That's up from $57.3 million in the third quarter of last year.

Ambarella stock carved out a new 52-week high Friday morning, but it remains more than 50% below the multiyear high it reached in 2015.