Stocks rallied in late trading Wednesday recovering the day's losses, which at times were around 1.5 percent. Investors spent most of the day dealing with the impact of the devaluation of the Chinese currency, the yuan. Some fear China's foundering economy will weigh on global growth.

At the close on Wall Street, the Dow Jones industrial average was down less than a point at 17,402.5. At midmorning it had been down 1.6 percent. The Standard & Poor's 500 index gained nearly 2 points, about 0.1 percent, to 2,086.1. At midmorning it had been down 1.5 percent. The Nasdaq composite added 7.6 points, about 0.2 percent, to 5,044.4. At midmorning, it was down 1.8 percent.

advertisement | advertise on newsday

CRUDE ENERGY: As markets closed, the price of the benchmark U.S. crude was up 21 cents at $44.08 a barrel on the New York Mercantile Exchange. It fell Tuesday to its lowest level in six years, losing $1.88 to $43.08 a barrel.

WINNERS & LOSERS: Apple Inc. rallied 1.4 percent, reversing an earlier 3.4 percent drop, and Intel Corp. rose 1.9 percent to pace gains among technology companies. Exxon Mobil Corp. and Chevron Corp. advanced more than 1.2 percent to lead energy shares higher. Macy's Inc. tumbled 5.1 percent after quarterly profit missed analysts estimates. Tiffany & Co. and Coach Inc. declined at least 4.1 percent on concerns on slower growth in China.

CHINA'S DEVALUATION: The International Monetary Fund welcomed Beijing's move toward more flexible exchange rates, but many investors saw it as an attempt to stimulate a slowing economy, since a cheaper yuan will benefit China's exports by making them less expensive overseas. The devaluation triggered selling of shares, oil and other commodities on expectations of weaker demand from China.

THE QUOTE: "Markets were not expecting any major moves on the currency from the Chinese government, despite its benefits, as the risks were perceived as too high. Now that this Rubicon has been crossed, keen attention should be paid to any other significant moves to prop up the Chinese economy," Angus Nicholson, a market analyst at IG, said in a commentary.

Reports from Bloomberg News and The Associated Press were used in this story.