ECONOMY

US market closes out its best week in almost two years as strong earnings power stocks higher

This Thursday, Oct. 2, 2014 photo shows the facade of the New York Stock Exchange. U.S. stocks rose again Friday, Oct. 24, 2014, putting the market on track for the best week in almost two years. Amazon plunged after the company reported dismal third-quarter results, but that wasn't enough to drag the rest of the market down. (AP Photo/Richard Drew)

This Thursday, Oct. 2, 2014 photo shows the facade of the New York Stock Exchange. U.S. stocks rose again Friday, Oct. 24, 2014, putting the market on track for the best week in almost two years. Amazon plunged after the company reported dismal third-quarter results, but that wasn't enough to drag the rest of the market down. (AP Photo/Richard Drew)  (The Associated Press)

The stock market is closing out its best week in almost two years as earnings gains from Microsoft and others got investors in a buying mood.

The market is coming off a rocky two weeks. Indexes have made wide swings both up and down as traders balanced slowing growth in Europe with an improving profit picture for U.S. companies.

The Dow Jones industrial average rose 127 points, or 0.8 percent, to 16,805 Friday.

The Standard & Poor's 500 index rose 13 points, or 0.7 percent, to 1,964. The Nasdaq composite rose 30 points, or 0.7 percent, to 4,483.

Microsoft jumped 3 percent after its earnings came in well ahead of what analysts were expecting. Procter & Gamble rose 2 percent after saying it would spin off its Duracell battery business.