Stocks were up on Wednesday as investors used the recent pullback from a rally that took markets to five-year highs as a buying opportunity.
Housing stocks were among the day's leaders following stronger-than-expected data on home sales. The PHLX housing sector index <.HGX> jumped 2.5 percent, led by a 6.2 percent advance in PulteGroup , the second-largest U.S. home builder, to $16.73.
The pace of U.S. home resales rose 7.8 percent in August, fastest in over two years. Housing starts also climbed, a hopeful sign that a budding housing market recovery is gaining traction.
The report came as investors looked for improving economic data to help bolster a rally of more than 6 percent in the S&P 500 since the start of August.
"One of the things we look at is housing, and, after today's data, it seems to be stabilizing," said Anthony Conroy, head trader for BNY ConvergEx, an affiliate of the Bank of New York, in New York.
"We have so much money on the sidelines that stocks will continue to rally for weeks, maybe even months. The recent pull-back was a buying opportunity."
The Dow Jones industrial average <.DJI> was up 39.90 points, or 0.29 percent, at 13,604.54. The Standard & Poor's 500 Index <.SPX> was up 3.15 points, or 0.22 percent, at 1,462.47. The Nasdaq Composite Index <.IXIC> was up 4.25 points, or 0.13 percent, at 3,182.05.
Last week the S&P 500 reached its highest levels since December 2007 following a decision by the U.S. Federal Reserve to launch a new round of economic stimulus. The market pulled back or ended flat for two days, causing some investors to get back into stocks that had lost ground.
Industrial conglomerate 3M Co was the latest major U.S. company after FedEx to caution about the economy. 3M said the "economic environment has changed" since the company adopted its long-term 7 to 8 percent revenue growth target, and it now views that range as a "stretch target". Shares edged up 0.3 percent to $93.79.
Both 3M and FedEx are viewed as economic bellwethers because they are involved with so many sectors of the economy. Their warnings come as S&P 500 companies are expected to post a 2 percent contraction in third quarter earnings.
As of Friday, there were 88 major companies which have lowered their profit expectations compared to 21 positive announcements. The ratio is the weakest showing since the third quarter of 2001, according to Thomson Reuters data.
Oil-related stocks fell and kept a cap on gains as U.S. crude slid for the third straight day after Saudi Arabia said it would take action to keep prices in check. The PHLX oil service sector index <.OSX> shed 1.27 percent.
General Mills Inc reported higher quarterly earnings on Wednesday, helped by recent acquisitions, and stood by its full-year outlook. The shares rose 2.1 percent to $40.15.
Questcor Pharmaceuticals Inc plunged 39.3 percent to $30.66 after Aetna Inc , America's third-largest health insurer, dropped coverage for the company's only product, Acthar, for all but one condition, to treat seizures in babies.
(Reporting By Aleksandra Michalska; Editing by Kenneth Barry)