By Yasmeen Abutaleb
NEW YORK (Reuters) - U.S. stocks closed out their best week in nearly two years on Friday, helped by earnings from Microsoft and Procter & Gamble and as concerns eased over the possible spread of Ebola in the United States.
The S&P 500 (.SPX) was up 5.5 percent from its low on Oct. 15 and had its best weekly gain in nearly two years, boosted by solid corporate earnings reports.
News of the first case of Ebola diagnosed in New York City hit futures late on Thursday, but the markets shook off those concerns on Friday. A doctor being treated for Ebola in a New York City hospital is in stable condition, the city's health commissioner said, while the World Health Organization set out plans for speeding up development and deployment of experimental Ebola vaccines.
"I am encouraged by the fact that the market seems to be having a cooler head about the most recent Ebola news," said Steve Sosnick, equity risk manager at Timber Hill/Interactive Brokers. "It feels like a market that's trying to consolidate some very sharp moves."
Shares of Microsoft (MSFT.O) rose 2.5 percent to $46.13, after the company reported higher-than-expected quarterly revenue while keeping profit margins largely intact.
Fellow Dow component Procter & Gamble (PG.N) gained 2.3 percent to $85.16. The world's largest household products maker said it would split off its Duracell battery business into a separate company.
On the downside, Amazon (AMZN.O) plunged 8.3 percent to $287.06 and was the biggest drag on both the S&P 500 and Nasdaq 100 (.NDX) after the online retailer's sales projections for the crucial holiday quarter disappointed Wall Street and third-quarter results missed forecasts.
According to Thomson Reuters data through Friday morning, of 205 companies in the S&P 500 that have reported earnings, 69.8 percent have topped analysts' expectations, above the 63 percent rate since 1994. On the revenue side, 59.8 percent have beaten expectations, slightly below the 61 percent rate since 2002.
The Dow Jones industrial average (.DJI) rose 127.51 points, or 0.76 percent, to 16,805.41, the S&P 500 (.SPX) gained 13.76 points, or 0.71 percent, to 1,964.58 and the Nasdaq Composite (.IXIC) added 30.92 points, or 0.69 percent, to 4,483.72.
Advancing issues outnumbered declining ones on the NYSE by 1,905 to 1,150, for a 1.66-to-1 ratio on the upside; on the Nasdaq, 1,501 issues rose and 1,151 fell for a 1.30-to-1 ratio favoring advancers.
The benchmark S&P 500 index posted 38 new 52-week highs and two new lows; the Nasdaq Composite recorded 50 new highs and 48 new lows.
About 5.3 billion shares changed hands on U.S. exchanges, well below the 8.1 billion October average, according to BATS Global Markets.
(Editing by Bernadette Baum, Chris Reese, Chizu Nomiyama and James Dalgleish)