Shares of Oatly Group (OTLY 3.05%), a maker of oat-based foods and beverages, were taking a dive this week after the company reported middling results and as a rally the previous week leading into the earnings report faded.

According to data from S&P Global Market Intelligence, the stock was down 17.9% for the week as of 3:18 p.m. ET on Friday.

A barista pouring oat milk into a pitcher.

Image source: Oatly.

Oatly still needs to prove itself

Oatly stock fell sharply in the first two trading days of the week even as there was no news on the stock. Investors seemed to believe that shares of the company, best known for oat milk, were overbought heading into its second-quarter earnings report.

That impulse seemed to be correct as the stock sold off on Wednesday as well following its earnings report even as headline numbers beat estimates.

Revenue in the quarter rose 3.2% to $202.2 million, edging out estimates at $201.1 million, showing the company has stabilized previous revenue declines. Its business outside of China also showed stronger growth, with North America up 10%.

Oatly's recent cost-cutting and rightsizing efforts appear to be paying off as gross margin jumped by 10 percentage points to 29.2%, and its adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA) loss was $11 million, which was significantly better than a loss of $41.5 million in the quarter a year ago.

On the bottom line, it reported a per-share loss of $0.05, which was better than the consensus at a loss of $0.07.

CEO Jean-Christophe Flatin said, "In the second quarter, we grew volumes in every segment, continued to structurally reduce our cost structure, and continued to invest to further strengthen our brand."

Can Oatly come back?

Oatly has made a lot of improvements over the past year, but the company is still unprofitable, and revenue growth is only modest.

Oatly appears to be the leader in its category, but it's unclear if there's significant growth potential there as the buzz around oat milk has worn off after its initial boom. At this point, the stock seems fairly valued, at least until its revenue growth accelerates.