NEW YORK - U.S. stocks rebounded Wednesday and had their best performance in more than a month, led by gains in health care and consumer staples companies.
Once again, investors were willing to step in to buy any noticeable dip in the market, even as more bad news emerged about Europe's economy and worries over violence in Iraq and Syria continued.
The Dow Jones industrial average advanced 154.19 points, or 0.9 percent, to close at 17,210.06, its best day since Aug. 18. The Standard & Poor's 500 index rose 15.53 points, or 0.8 percent, finishing at 1,998.30, and the Nasdaq composite rose 46.53 points, or 1 percent, to end at 4,555.22.
The gains came after three days of losses for the S&P 500 and two straight days of triple-digit losses for the Dow Jones industrial average. With the rise on Wednesday, the Dow recovered more than half of what it lost Monday and Tuesday.
The biggest gainer in the S&P 500 was Bed Bath & Beyond (BBBY), which rose $4.64, or 7.4 percent, to $67.33. The home furnishings company reported a quarterly profit of $1.17 a share, two cents above analysts' expectations. It also raised its full-year forecast.
Wal-Mart (WMT) rose $1.48, or 2 percent, to $77.08, making it the second-biggest advancer in the Dow. The retail giant took a big step into the financial services sector, announcing a new checking account program for customers in collaboration with Green Dot (GDOT). The news sent Green Dot shares soaring $4.59, or 24 percent, to $23.41.
Investors also got a positive report on the U.S. economy. Sales of new homes jumped 18 percent in August, reaching an annual rate of 504,000, according to the Commerce Department, far better than the 430,000 rate economists had expected.
Even with Wednesday's gain, there's a lot of caution in the market, traders say.
Investors continue to focus on Europe's economic malaise and tensions in the Middle East after the U.S. and several Arab nations attacked the Islamic State group's headquarters in Syria.
The Ifo business confidence index in Germany, Europe's largest economy, dropped for a fifth month in September. The decline was larger than expected and confirmed that Europe's economy remains weak. The day before, a closely watched business gauge for the region fell to a nine-month low.
The eurozone's economy has been flat or barely growing since April, hobbled by the lingering effects of a debt crisis, uncertainty over a conflict in Ukraine and a lack of confidence among consumers, businesses and banks.
"It's clear now that the Russian sanctions are causing a slowdown in the European economy, particularly manufacturing," said Anastasia Amoroso, a global markets strategist at JPMorgan Funds. "But we see this as a temporary soft patch."
Health care stocks rebounded after taking a beating at the start of the week on news that the U.S. was tightening rules on a tax-saving maneuver called an "inversion." Many companies using the tactic, in which a smaller company is acquired overseas so that the U.S. company can move its headquarters there and take advantage of lower tax rates, have been health companies.
AbbVie (ABBV), which fell nearly 2 percent Tuesday, rose 2.6 percent Wednesday.
U.S. government bond prices fell. The yield on the 10-year Treasury note rose to 2.57 percent from 2.53 percent the day before.
In other markets, benchmark U.S. crude oil rose $1.24 to $92.80 a barrel on the New York Mercantile Exchange. Oil rose after the government reported a larger-than-expected decline in oil stocks. Brent crude, a benchmark for international oil used by many U.S. refineries, rose 10 cents to close at $96.95 on the ICE Futures exchange in London.
In other energy futures trading on the NYMEX, wholesale gasoline rose 3.5 cents to close at $2.664 a gallon, heating oil rose 0.6 cent to close at $2.689 a gallon and natural gas rose 9.5 cents to close at $3.911 per 1,000 cubic feet
The euro slid to $1.28, and the dollar rose to 108.94 Japanese yen. The price of gold fell $2.50 to $1,219.50 an ounce. Silver fell eight cents to $17.70 an ounce, and copper rose two cents to $3.05 a pound.