NEW YORK - The stock market closed out its best week in nearly two years on a positive note Friday, helped by strong quarterly earnings from Microsoft (MSFT) and other big U.S. companies.
The S&P 500 rose 4.1 percent for the week, its biggest gain since January 2013. But volatility can go both ways. Just as the market jumped sharply this week, it plunged just as sharply last week. The index is still down 0.4 percent for October.
On Friday, the Dow Jones industrial average rose 127.51 points, or 0.8 percent, to close at 16,805.41. The Standard & Poor's 500 index added 13.76 points, or 0.7 percent, ending at 1,964.58, and the Nasdaq composite rose 30.92 points, or 0.7 percent, to finish at 4,483.72.
After weeks of speculation over the fate of Europe's economy, Ebola fears and plunging oil prices, investors were able to get back to basics. Wall Street is in the midst of one of the busiest times of the year, when companies report their quarterly results. Ultimately what drives stock prices higher is the potential for a company to earn more, so higher profits generally mean higher stock prices.
"What matters most to the market are earnings expectations and corporate fundamentals, and so far they're looking pretty good," said Michael Arone, chief investment strategist at State Street Global Advisors.
Profits for S&P 500 companies are up 5.6 percent from a year ago this earnings season, according to FactSet. That growth is better than the 4.6 percent increase the market was expecting.
Quarterly results from Microsoft and UPS (UPS) helped lift stocks Friday, but there have been other strong reports this week. Caterpillar (CAT), 3M (MMM), Apple (AAPL) and others all came in well above expectations.
Microsoft's sales and profits were well above analysts' expectations. Cloud services, a business the company has focused on, also grew. Microsoft shares rose $1.11, or 2.5 percent, to $46.13.
UPS also reported strong results and expects December shipments to rise 11 percent from a year ago. Many investors consider UPS a bellwether for how the U.S. economy is doing, particularly during the crucial holiday shopping season. UPS rose 11 cents, or 0.1 percent, to $100.59.
Investors were able to set aside dismal third-quarter results from Amazon (AMZN). The online retailer's stock took a beating, but that wasn't enough to drag down the rest of the market.
"We've seen the market sell-off, and we saw people buy on the bounce, and that looks like it will continue," said Brad McMillan, chief investment officer at Commonwealth Financial.
Amazon reported a steeper-than-expected quarterly loss despite soaring sales. Investors have grown impatient with Amazon, which has been unable to deliver profits even as it gains ground as one of the world's largest retail companies. Amazon fell $26.12, or 8 percent, to $287.06.
Investors are turning their focus to next week's Federal Reserve policy meeting for hints about the future of the central bank's bond purchases and its short-term interest rates.
The bond-buying program has kept long-term rates extremely low to encourage investment and hiring. Recent mixed signals about the strength of the U.S. recovery have prompted speculation that the Fed might let the program continue for longer than previously anticipated.
Investors will also get another large batch of quarterly results from U.S. companies next week, when 159 members of the S&P 500 index report. Those companies include Merck (MRK), Exxon Mobil (XOM), Chevron (CVX) and Visa (V).
The price of oil fell Friday on further evidence of ample supplies and weak demand. Benchmark U.S. crude dropped $1.08 to close at $81.01 a barrel in New York.
Brent crude, a benchmark for international oil used by many U.S. refineries, fell 70 cents to close at $86.13 in London.
In New York, wholesale gasoline fell 2.5 cents to close at $2.182 a gallon, heating oil fell 1.7 cents to close at $2.482 a gallon and natural gas rose 0.1 cent to close at $3.623 per 1,000 cubic feet.
The price of gold rose $2.70 to $1,231.80 an ounce, silver rose two cents to $17.18 an ounce and copper was flat at $3.04 a pound.