NEW YORK - Another drop in China's currency sent global stocks sharply lower on Wednesday before they rallied strongly into the close. Down as much as 277 points in morning trading, the Dow Jones industrial average ended less than a point lower than where it started, at 17,402.6.
Still, China's falling currency raised worries about weakness in the world's second-largest economy. Major markets in Europe slumped, and traders plowed money into the safety of government bonds.
The Standard & Poor's 500 index closed up 2 points, or 0.1 percent, to 2,086. And the Nasdaq composite finished the day 7.6 points higher, 0.15 percent, to 5,044.4.
China's government devalued its currency for a second straight day on Wednesday, attempting to support flagging growth in the world's second-largest economy. The Chinese yuan fell 1.8 percent on the heels of Tuesday's 1.9 percent fall.
"There's a lot of uncertainty right now," said David Joy, chief market strategist for Ameriprise Financial. "What does this tell us about how weak their economy is? And is this going to spread their weakness to other countries?"
Alibaba Group slumped after posting sales that fell short of Wall Street's high expectations, even though first-quarter income for China's top internet retailer more than doubled. Alibaba's stock dropped $4.77, or 6 percent, to $72.59.
Macy's (M) reported a drop in quarterly profits and sales on Wednesday, as the department-store chain was hobbled by weak tourist spending and delays at West Coast ports. Its stock lost $3.44, or 5.1 percent, to close at $64.09.
The largest stock markets in Europe continued their slide. Germany's DAX dropped 3.3 percent, France's CAC 40 dropped 3.4 percent, while Britain's FTSE 100 lost 1.4 percent.
China's government said its moves were attempts to make its exchange rate more responsive to the market. But a cheaper yuan also benefits China by making exports less expensive to overseas customers. Many investors considered the devaluation a sign that the country's economic growth is much worse than official reports suggest. In response, they sold stocks in companies that do significant business in China, such as YUM! Brands (YUM) and Tiffany (TIF) dropped 3.3 percent and 4 percent, respectively.
"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.
China's move battered Asian markets for a second day running. Japan's Nikkei 225 fell 1.6 percent and Hong Kong's Hang Seng dropped 2.4 percent. South Korea's Kospi lost 0.6 percent and Australia's S&P/ASX 200 slipped 1.7 percent. The Shanghai Composite Index fell 1.1 percent.
U.S. crude oil climbed 31 cents to $43.37 a barrel on the New York Mercantile Exchange, bouncing off a six-year low reached Tuesday.
U.S. government bonds slipped a bit, sending the yield on the 10-year Treasury up to 2.15 percent from 2.14 percent the day before. The dollar slipped to $1.1172 for every euro and weakened to 124.14 yen.
Precious and industrial metals futures ended broadly higher, following a slump the day before in the price of copper. Gold rose $15.90 to $1,123.60 an ounce, silver rose 19 cents to $15.48 an ounce and copper rose two cents to to $2.35 a pound.