Wall Street ticks higher after data in choppy trading

U.S. stocks edged higher on Wednesday after stronger-than-expected data in the services and private employment sectors, but lower oil and metals prices hurt energy and materials shares.

Stocks oscillated between gains and losses as hopes that Spain will eventually request a bailout were offset by concern over China's slowing economy.

Data showed growth in the U.S. services sector picked up in September, defying economists' expectations for a slight decrease while the private sector added more jobs last month than forecast.

But the price of crude and metals fell, pressuring stocks in the energy and basic materials sectors, after the euro zone's economic woes increased last month and China's slowdown looked likely to extend to a seventh quarter.

The S&P materials index and the energy sector index were both negative.

"The market has lifted meaningfully since June 1st and it has taken the last couple of weeks to consolidate those gains. I think it will be another day of flat to slightly down price action," said Jim Russell, chief equity strategist at U.S. Bank Wealth Management in Cincinnati.

The S&P 500 closed last week its fourth-straight month of gains, adding roughly 10 percent since the end of May.

The Dow Jones industrial average rose 13.53 points, or 0.10 percent, to 13,495.89. The S&P 500 Index gained 2.64 points, or 0.18 percent, to 1,448.39. The Nasdaq Composite added 9.63 points, or 0.31 percent, to 3,129.67.

Best Buy shares gained 2.9 percent to $17.47 as founder Richard Schulze and at least four private equity firms started examining its books, in early steps toward what could become an $11 billion buyout.

Shares of Family Dollar Stores rose 4.6 percent to $69.03 after the discount chain posted a higher quarterly profit.

Monsanto shares fell 3 percent to $87.80 after the agribusiness group posted a fourth-quarter loss during a seasonally sluggish sales period.

(Reporting by Rodrigo Campos; Editing by Kenneth Barry)