Stocks edged lower on Wednesday after worse-than-expected housing market data for February and a soft outlook from oilfield services company Baker Hughes Inc.

Equities drifted negative after the National Association of Realtors said existing home sales slipped 0.9 percent to an annual rate of 4.59 million units last month, denting recent optimism the housing market had begun to turn a corner.

Certainly disappointing in terms of the consensus view. Even looking at the annual rate it is disappointing and isn't showing the kind of growth that many people had expected, said Mark Grant, managing director at Southwest Securities in Fort Lauderdale.

The PHLX housing index <.HGX> was up 0.5 percent, down from its initial highs. Armstrong World Industries Inc lost 0.7 percent to $56.78 after Stifel cut its rating on the stock to hold.

Oil service stocks declined, dragged lower by Baker Hughes , which slumped 3.9 percent to $45.96 after it said it expects sequentially lower operating profit before tax in the first quarter. The PHLX oil service sector index dropped 2.1 percent.

The Dow Jones industrial average <.DJI> dropped 8.59 points, or 0.07 percent, to 13,161.60. The Standard & Poor's 500 Index <.SPX> dropped 1.29 points, or 0.09 percent, to 1,404.23. The Nasdaq Composite Index <.IXIC> gained 2.24 points, or 0.07 percent, to 3,076.39.

While the benchmark S&P 500 index has steadily moved higher over the past two weeks, movement has been muted as investors weigh the possibility of a pullback against a surge higher.

Oracle Corp advanced 1.1 percent to $30.42 after beating earnings estimates as new software sales came in at the high end of the company's forecast, offsetting a sharp drop in hardware revenue.

General Mills Inc shed 0.6 percent to $38.53 after the food maker reported a slight dip in quarterly profit and stood by its lowered full-year forecast as it faces higher costs for raw materials.

Hewlett Packard Co dipped 1.1 percent to $23.72 premarket after the company announced an organizational realignment that will merging its printer and PC business.

U.S. staffing provider On Assignment Inc will buy privately held rival Apex Systems for $600 million, including debt, and said it expected the deal to significantly add to 2012 earnings. On Assignment shares surged 29.8 percent to $17.75.

Hartford Financial Services Group jumped 4.9 percent to $22.78 after the company said it would shed most of its life insurance-related operations, yielding to demands from its biggest shareholder, famed hedge fund manager John Paulson.

(Additonal reporting by Ryan Vlastelica; Editing by Padraic Cassidy)