Stocks rose on Friday as Microsoft lifted technology shares following positive comments from Goldman Sachs, and bets on a recovering global economy.

Microsoft jumped 2.8 percent to $24.15 after Goldman Sachs added shares of the world's largest software company to its Americas conviction buy list and said new products, combined with an increase in information technology spending, should underpin growth.

It is a big move for a big company like Microsoft, (which) can pull both software and hardware, said Janna Sampson, co-chief investment officer at OakBrook Investments LLC in Lisle, Illinois.

I think the Goldman Sachs report is buoying the sector across the board.

Microsoft was a top gainer in both the Dow industrials and the Nasdaq. The S&P information technology sector <.GSPT> rose 1.3 percent.

On the macro front, the International Monetary Fund underscored the sense of improving economic fundamentals after a top officer said the IMF may lift its 2010 growth forecast for the world economy amid signs the decline in global output was moderating.

Shares in the consumer discretionary, industrial and financial sectors rose, with bellwether 3M Co up 0.7 percent at $59.71.

The Dow Jones industrial average <.DJI> gained 24.19 points, or 0.28 percent, to 8,579.79. The Standard & Poor's 500 Index <.SPX> added 5.45 points, or 0.59 percent, to 923.82. The Nasdaq Composite Index <.IXIC> rose 24.11 points, or 1.33 percent, to 1,831.83.

After gaining as much as 40 percent from a 12-year closing low in early March, the S&P 500 has retreated as investors reassessed the potential strength of an economic recovery.

I think the market was due for a pullback, but maybe people think we've pulled back enough, OakBrook's Sampson said.

Apple Inc gave the top boost to the Nasdaq 100 <.NDX>, up 1.7 percent at $138.21 on the same day that its latest iPhone hit stores. Separately, AT&T Inc said it had sold hundreds of thousands of Apple's newest mobile phone in pre-orders.

(Editing by Jan Paschal)