By Julie Wernau

Cocoa futures wavered on Tuesday, ending at loss for a third straight session, as fears about the Chinese economy outweighed a day's gains for Chinese stocks.

The cocoa industry is expecting China to be the next great frontier for consumption of cocoa, the main ingredient in chocolate, but demand for the product has softened recently and weak economic data released this week further fueled concerns that a weakening economy there would cut into demand for chocolate's main ingredient.

Cocoa for September ended down 0.03% at $3,165 a ton, after rising as high as $3,188 in early trading, on the ICE Futures U.S. exchange. Analysts warned that further losses could be on the horizon with more economic data on tap for later this week.

Commodities haven't hit bottom yet, said Norbert Ruecker, head of commodities research at Julius Baer. "While commodities seem oversold and the extended positioning bears the risk of a short-covering rally, we refrain from bottom-fishing in the asset class," he wrote in a note. "The fading supercycle remains the headline story and structural cost deflation is set to keep commodity prices lower for longer."

In July, cocoa futures fell to their lowest level in more than a month, after demand data from Asia, viewed as a key growth market for the luxury bean, showed a steep decline. Disappointing manufacturing data out of China on Monday fueled further fears about the stability of the Chinese economy.

The Cocoa Association of Asia said commercial demand in the region for grinding--the process by which producers crush roasted cocoa nibs to release cocoa butter and eventually turn them into chocolate products--fell 12% in the second quarter from year-ago levels. It was the fourth consecutive decline, and followed evidence of a decline in North America and barely perceptible growth in Europe.

"The global oversupply in commodities as a whole gets amplified by China," said Chris Narayanan, head of agricultural commodities research at Societe Generale in New York.

In other markets, raw sugar for October rose 1.1% to end at 11.01 cents a pound, breaking a three-day losing streak that had prices at their lowest in six-and-a-half years. White sugar, which is traded in London, has been trading at a premium to raw sugar, said Robin Shaw, analyst at Marex Spectron, which could be driving up demand for raw sugar as refineries seek to profit from relatively-low-priced raw sugar that can be refined and sold at high prices.

Frozen concentrated orange juice for September delivery jumped 3% to end at $1.3195 a pound, the highest since Feb. 18 as the height of hurricane season approaches. Arabica coffee for September rose 0.8% to close at $1.249 a pound and cotton for December fell 0.6% to close at 63.64 cents a pound.

Write to Julie Wernau at julie.wernau@wsj.com

Subscribe to WSJ: http://online.wsj.com?mod=djnwires