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

The S&P 500, still up about 12 percent for the year, was just slightly off in afternoon trade after seesawing between modest gains and losses for most for the day.

I think we are leveling off here, but the overall story hasn't changed much. Even with weak signals from China, the market hasn't reacted that much, which I think is a bullish sign, said Joe Benanti, managing director at Rosenblatt Securities in New York.

A warning about China's growth sparked selling in energy and industrial shares on Tuesday, but the losses were modest.

We might dip back a little, but I see equities moving back higher to 1430s, even 1450s, Benanti said, referring to where he sees the next resistance level for the broad S&P 500 index. He did not give a time frame for his projection.

The Dow Jones industrial average <.DJI> slipped 28.88 points, or 0.22 percent, to 13,141.31. The Standard & Poor's 500 Index <.SPX> dipped 0.54 of a point, or 0.04 percent, to 1,404.98. But the Nasdaq Composite Index <.IXIC> rose 10.40 points, or 0.34 percent, to 3,084.55.

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

Some market participants viewed the day's decline as a start of a short-term pullback.

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.

In a report to clients on Wednesday, Goldman Sachs said the prospects for future returns in equities relative to bonds are as good as they have been in a generation.

Given current valuations, we think its time to say a 'long good bye' to bonds, and embrace the 'long good buy' for equities as we expect them to embark on an upward trend over the next few years, Goldman Sachs said in the 40-page note.

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

Hewlett-Packard Co said it was merging its printer and PC businesses in a major reorganization to save costs and boost growth. The stock, a Dow component, fell 1.8 percent to $23.56.

Oracle Corp shares fell 0.9 percent to $29.83, 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.

But the Nasdaq got a lift from Green Mountain Coffee shares, which shot up 10.7 percent to $56.13 after the company snagged Starbucks-branded coffee to sell in packs designed for its new line of premium coffee-brewing machines.

Earlier, data showed U.S. existing home sales slipped last month, suggesting challenges in the U.S. housing sector despite signs of recovery.

(Reporting by Angela Moon; Editing by Jan Paschal)