S&P 500 ekes out gain, erases losses after WHO calms coronavirus fears

Nasdaq closes at record high even amid coronavirus scare

Stocks closed little changed on Thursday, recovering most of their losses from earlier in the session, after the World Health Organization quelled some of the fears around the deadly coronavirus.

The S&P 500 closed 0.1% higher at 3,325.54 while the Nasdaq Composite rose 0.2% to 9,402.48, notching a record closing high. The Dow Jones Industrial Average ended the day down 26.18 points, or 0.1% at 29,160.09. The 30-stock average dropped more than 200 points earlier.

The WHO said it was a "bit too early to consider this event is a public health emergency of international concern."

American Airlines rose 5.4% on the back of that comment while United Airlines closed 1.9% higher. Gilead Sciences rose 0.8% while Inovio Pharmaceuticals surged 11.6%.

Investors had been fretting over the virus as the number of confirmed cases topped 600. The virus originated in Wuhan, China and cases have now been reported in Singapore and the U.S.

Asian shares tumbled overnight, while Chinese Treasury futures surged, as fears of an economic fallout from the virus sent investors running for cover. The Shanghai Composite dropped 2.75%, its biggest one-day loss since May 6, when it plummeted 5.6%. In Japan, the Nikkei 225 dropped 1% along with Korea's Kospi index.

A trader works beneath Boeing Co. signage on the floor of the New York Stock Exchange (NYSE) in New York, U.S., on Wednesday, April 25, 2018.
Michael Nagle | Bloomberg | Getty Images

The outbreak "has heightened fears of a global pandemic with potential implications across the economy," said Robert Samuels, consumer analyst of the Americas at UBS. He noted U.S. companies with exposure to China "could potentially be negatively impacted from lower demand as nervous consumers stay home should the virus continue to spread."

In the U.S., investors also pored through the latest batch of corporate earnings results. NBCUniversal-parent Comcast and Travelers both reported better-than-expected quarterly figures. However, Comcast dipped 3.8% while Travelers slid 5.1%.

More than 12% of S&P 500 companies have reported quarterly earnings. Of those companies, about 70% have beaten analyst expectations, FactSet data shows.

"As we look at fourth-quarter earnings, they're coming in a little bit better than expected. But we need to recognize the bar was relatively low in terms of expectations," said Bill Northey, senior investment director at U.S. Bank Wealth Management.

Wall Street was coming off a choppy session which ended with the major averages closing along the flatline. TThe major averages are also on pace for their first weekly decline of 2020.

"Investors are wondering what will ultimately crack this stock market," said Jim Paulsen, chief investment strategist at The Leuthold Group. "Even though a stock market correction is almost assured at some point, a sentiment refresh, alone, would not likely produce a sustained decline."

On the data front, weekly jobless claims rose less than expected to 211,000 from 205,000 the week before.

—CNBC's Elliot Smith contributed to this report.