Stocks struggled on Wednesday to rise above recent highs, hampered by losses in risk-associated sectors like energy and financials.

Equities, which started the day off flat, drifted mostly lower after data showed existing homes sales slipped last month, suggesting challenges in the U.S. housing sector despite signs of recovery.

The S&P 500, which crept back into positive territory at midday, had declined slightly after the housing data. But some market participants viewed that dip as the start of a short-term pullback from a rally that has lasted for more than three months without a significant correction.

There are things that stood out today that made me believe this might be the start of a 2 (percent) to 4 percent correction - the relative weakness in energy and industrial stocks, and the reversal in financial stocks, said Seth Setrakian, co-head of U.S. equities at First New York Securities.

Investors usually wait for the start of a new quarter to take some money off the table. That tends to happen a little early when everyone is expecting the same thing.

The S&P 500 energy sector <.GSPE> was off 0.8 percent. The financial sector <.GSPF> index was off 0.2 percent, after rising nine of the last 10 sessions.

Oilfield services companies' stocks slid, dragged lower by Baker Hughes , which slumped 4.3 percent to $45.77 after it said it expects sequentially lower operating profit before tax in the first quarter.

The Dow Jones industrial average <.DJI> was down 14.54 points, or 0.11 percent, at 13,155.65. The Standard & Poor's 500 Index <.SPX> was up 0.45 of a point, or 0.03 percent, at 1,405.97. The Nasdaq Composite Index <.IXIC> was up 10.04 points, or 0.33 percent, at 3,084.19.

The S&P 500 was still up nearly 12 percent for the year.

Oracle Corp shares were trading flat by midday, down 0.1 percent at $30.05, after climbing to a session high at $31.15 earlier. The world's No. 3 software maker beat Wall Street's earnings estimates as new software sales came in at the high end of its own forecast, offsetting a sharp drop in hardware revenue.

The Nasdaq also got a lift from Green Mountain Coffee shares, which jumped 12.3 percent to $56.93 after the company snagged Starbucks-branded coffee to sell in packs designed for its new line of premium coffee-brewing machines.

Hewlett-Packard Co shares dropped 2 percent to $23.49 after the company, a Dow component, announced an organizational realignment that will merge its printer and PC businesses.

(Reporting By Angela Moon; Editing by Jan Paschal)