Stocks mostly fell on Wednesday, weighed by the energy services sector, but gains in technology shares buoyed the Nasdaq and helped keep the S&P 500 near four-year highs.

The benchmark S&P 500 index, up 11.6 percent so far this quarter, found buyers at the 1,400 level, which has been held for five straight days. Support at that level suggests more gains in coming weeks.

The technology sector rose again, with the Nasdaq 100 technology index <.NDXT> up 0.4 percent for the day and up close to 18 percent this year. It helped the broader Nasdaq Composite edge up for the day.

What we're seeing is a rolling correction. Different industry groups are correcting while others are showing strength, said Paul Nolte, managing director at Dearborn Partners in Chicago. Equity markets are being held up in general by the technology group.

A string of upbeat U.S. economic data in recent weeks has fueled the market's surge, and pullbacks have been brief. Since a three-day decline two weeks ago, the S&P 500 has not lost more than 0.3 percent in one session.

The PHLX Oil Services index <.OSX> fell 1.9 percent after Baker Hughes said it expects first-quarter profit margins to fall sharply. Its stock fell 5.8 percent to $45.04, its lowest close since mid-December.

The S&P 500 energy sector index <.GSPE> was off 1 percent.

In a report 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 it's 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.

The Dow Jones industrial average <.DJI> fell 45.57 points, or 0.35 percent, to 13,124.62 at the close. The S&P 500 Index <.INX> dipped 2.63 points, or 0.19 percent, to 1,402.89. The Nasdaq Composite <.IXIC> edged up 1.17 points, or 0.04 percent, to 3,075.32.

Volume was low, with just over 6 billion shares traded on the New York Stock exchange, NYSE Amex and Nasdaq, compared with the 6.87 billion daily average so far this year.

Advancing issues were almost evenly matched with decliners on both the NYSE and the Nasdaq.

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 2.2 percent to $23.46.

Oracle Corp shares fell 2.3 percent to $29.41 after climbing to a session high at $31.15 earlier. The world's No. 3 software maker beat Wall Street's earnings estimates as a sharp drop in hardware revenue was offset by new software sales.

The Nasdaq got a lift from Green Mountain Coffee Roasters shares, which shot up 10 percent to $55.79 after the company said it will carry Starbucks-branded coffee in packs designed for its new line of brewers, boosting its efforts to protect its lead in the U.S. single-cup coffee market.

Earlier, data showed U.S. home sales fell in February, but upward revisions to January's pace and the first yearly increase in prices in 15 months suggested the recovery in the housing market remained on track.

An index of housing stocks <.HGX> rose 0.5 percent and is up 26.6 percent so far this quarter.

The U.S. stock market's recovery started last October as investors saw ways to avoid a worst-case scenario in the European debt crisis that threatened the global economic recovery. But analysts see a shift in investor sentiment that could translate into more market gains.

We believe that the bull market is transitioning from an advance based on crisis resolution toward one driven by expanding risk appetite stemming from mounting evidence of a more durable, self-sustaining economic expansion, said Carmine Grigoli, chief investment strategist at Mizuho Securities USA, in a note to clients.

(Reporting by Rodrigo Campos; Editing by Jan Paschal)