Stocks added to gains in the last hour of trading Wednesday after struggling to find direction much of the day.
The market has been bound in a trading range since May, with the S&P failing to break beyond 1,130. The bias, however, has tilted higher lately, with all major indexes in positive territory for the year.
The Dow Jones Industrial Average rose more than 50 points, led by Travelers, General Electric, and Kraft. United Technologies and Chevron fell.
The S&P 500 and the Nasdaq also advanced. The CBOE Volatility Index, widely considered the best gauge of in the market, rose above 22.
The Dow and S&P 500 snapped a four-day winning streak in the previous session with financial and industrial stocks leading the declines.
Among key S&P 500 sectors, utilities, energy, and materials fell, while health care and consumer staples rose.
"Every day that we go by without a disaster coming out of Europe and the financial services industry is a good day," said Paul Larson, equities strategist at Morningstar. "A lot of the breathless predictions of doom and gloom, are frankly not just coming to fruition and that’s a good thing."
Health care stocks were higher Wednesday, led by pharmaceutical distributors McKesson , AmerisourceBergen and Cardinal Health , after analyst reports that fortunes for the companies may be improving.
As a whole, health care should do well, as a number of stocks in the sector are "just plain cheap," said Larson at Morningstar.
"I think what may be going on there is the market has an oversized trepidation regarding the health care reform," Larson said. "Meanwhile, you have a fairly large number of stocks and companies that are positioned exceptionally well, with strong franchises, and wide economic moats."
Energy stocks were weak despite a decline in crude inventoriesthat was more than expected, as traders focused on Enbridge's announcement that it had fixed a leaking pipeline. Oil fell just above $76 a barrel.
Energy giants Chevron and Exxon slumped, as did drillers, including Diamond Offshore Drilling and Schlumberger .
Meanwhile, BP shares rose after outgoing CEO Tony Hayward defended his company's safety recordat a hearing before British lawmakers.
The technology sector was higher, but chip stocks slumped after Goldman Sachs downgraded Micron Technology to "neutral," from "buy," citing weakness in the PC market due to a surge in tablet sales. The bank also downgraded chipmaker Maxim Integrated Products to "sell."
Meanwhile, shares of Apple rose after BMO raised its target price on the iPod maker to $320 from $315. Rivals Microsoft and Hewlett-Packard also climbed.
Elsewhere in technology, Yahoo! rose after news the online media company doesn't plan to sell its 39 percent stakein Alibaba Group, the Chinese Internet firm.
Homebuilders, including Beazer Homes , Hovnanian Enterprises and PulteGroup, tumbled after a report showed continued weakness in the housing sector. U.S. mortgage applications for both home purchases and refinancing fell 8.9 percent in September, as refinancing slowed for a second week, and a survey from real estate website Trulia.com showed more sellers are slashing asking prices for a third month.
Also Beazer said orders for new homes could be as low at 700,000 vs. 767,000 previously supported. And Standard & Poor's Ratings Service on Tuesday cut PulteGroup's debt ratings and lowered its outlook on Hovananian, because of the expiration of the federal tax credit for first-time homebuyers.