Wall Street edged higher on Tuesday as China's trade surplus eased fears about a slowdown in global economic growth and Microsoft said it would pay $8.5 billion in cash for Internet phone service Skype.

But investors shifted into more defensive positions in a sign the recovery was not accelerating as quickly as anticipated. The leading gainer among S&P 500 sectors was utilities.

Overall, it looks like that market wants to go higher, but I don't see the upside above 1,370, said Stifel Nicolaus options market strategist Elliot Spar.

There are a lot of sectors that are looking tired.

The Dow Jones industrial average <.DJI> was up 45.94 points, or 0.36 percent, at 12,730.62. The Standard & Poor's 500 Index <.SPX> was up 5.87 points, or 0.44 percent, at 1,352.16. The Nasdaq Composite Index <.IXIC> was up 12.93 points, or 0.45 percent, at 2,856.18.

The S&P was off 1.4 percent from its recent intraday high on May 2, which was the highest since early June 2008.

The utilities sector <.GSPU> rose 1.4 percent.

Burt White, chief investment officer at LPL Financial in Boston, said the market was relocating its growth expectations and a reallocation of assets is in the works.

We're in a new position in this business cycle, White said, pointing to a shift out of oil, basic materials and technology, and more toward companies with stable growth such as utilities.

Microsoft Corp said it plans to buy Internet phone service Skype for $8.5 billion in cash, a rich price as it seeks to regain ground on growing rivals such as Google Inc .

Microsoft shares were down 1.2 percent at $25.53 but shares of eBay Inc , which has a stake in Skype, rose 2.4 percent to $33.91.

China, the world's second-largest economy, posted an $11.4 billion trade surplus in April, nearly four times greater than expected, after exports hit a record on healthy demand and imports rose less than forecast.

China's export numbers were very good, said LPL's White. That gave a shot in the arm to this market.

Boston Scientific Corp was the most heavily traded stock on the Big Board after Chief Executive Ray Elliot said he will step down at the end of 2011. The surprise announcement sent shares of the medical device maker down 10.3 percent to $6.91.

Dean Foods Co jumped 10.8 percent to $12.17 after posting higher-than-expected quarterly profit.

Investors awaited results from Dow component Walt Disney Co .

(Reporting by Angela Moon, Editing by Kenneth Barry)