What happened

United Natural Foods (NASDAQ:UNFI) stock gained 20% last month, according to data provided by S&P Global Market Intelligence.

The rally helped shareholders recover some lost ground, but the organic food distributor is still trailing the market by a wide margin in 2017.

UNFI Chart

UNFI data by YCharts

So what

September's surge followed a surprisingly strong quarterly earnings announcement. Highlights from the fiscal fourth quarter included rising sales and earnings, with United Natural Foods' revenue improving by 6%, and higher profitability as grocery price deflation became less of a drag on the business. Recent acquisitions, including  Haddon House Food Products and Gourmet Guru, helped the company end its fiscal year on a positive note.

Now what

CEO Steven Spinner and his executive team are optimistic that they can extend the business rebound despite the highly competitive industry conditions. Their fiscal 2018 forecast calls for continued modest growth, with sales rising by between 3.8% and 5.8%, and earnings ranging from $2.67 per share to $2.77 per share, which translates into gains of between 4.3% and 8.2%.

A grocery cart being pushed through a supermarket aisle.

Image source: Getty Images.

That prediction implies no major disruption with its relationship with Whole Foods -- its single biggest customer -- despite that chain's acquisition by Amazon. That hint of optimism was enough to help shares recover a small fraction of the ground they've lost since early 2015.

Demitrios Kalogeropoulos has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon. The Motley Fool has a disclosure policy.