How the Dow Jones industrial average and other major averages did Friday

The stock market closed out its best week in nearly two years on a positive note Friday, helped by strong quarterly earnings from Microsoft and other big U.S. companies.

Investors were able to set aside dismal third-quarter results from Amazon. The giant online retailer's shares took a beating, but that wasn't enough to drag the rest of the market down.

On Friday:

The Dow Jones industrial average rose 127.51 points, or 0.8 percent, to 16,805.41.

The S&P 500 gained 13.76 points, or 0.7 percent, to 1,964.58.

The Nasdaq composite climbed 30.92 points, or 0.7 percent, to 4,483.72.

For the week:

The Dow is up 425.00 points, or 2.6 percent.

The S&P 500 is up 77.82, or 4.1 percent.

The Nasdaq has added 225.28 points, or 5.3 percent.

For the year:

The Dow is up 228.75 points, or 1.4 percent.

The S&P 500 index is up 116.22 points, or 6.3 percent.

The Nasdaq is up 307.13 points, or 7.4 percent.