NEW YORK (Reuters) - The S&P 500 ended slightly higher and the Nasdaq eked out a record closing high on Thursday, helped by a jump in Netflix, while news about the coronavirus outbreak spreading from China and mixed earnings results kept a lid on the market.

The S&P and the Nasdaq had both been trading down before news late in the session that Gilead Sciences Inc GILD.O was assessing its experimental Ebola drug as a possible treatment for the virus.

The Dow ended modestly lower.

Even as health officials in China put millions of people on lockdown in efforts to contain the coronavirus outbreak, which has so far claimed 18 lives, the World Health Organization (WHO) said it was “a bit too early” to declare a global health emergency.

“The virus is, if not a diversion, it’s something the traders are going to capitalize on,” said Chuck Carlson, chief executive officer at Horizon Investment Services in Hammond, Indiana. “It matters, but it matters to a subset of the market, not with investors who are looking past the next 24 hours.”

The outbreak has strained global equity markets, just as millions of Chinese are preparing to travel for the Lunar New Year, which begins Saturday.

The fourth-quarter reporting season is gathering steam, with analysts now expecting fourth-quarter earnings to contract by 0.7% from a year ago. Of the 74 companies in the S&P 500 that have already posted results, 67.6% have beaten consensus expectations, according to Refinitiv data.

FILE PHOTO: Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., January 21, 2020. REUTERS/Brendan McDermid

“Today we’ve got a situation where we’ve got a flat market, which would indicate that markets are comfortable with earnings and that expectations had risen given the rally going into the earnings season,” Carlson said.

The Dow Jones Industrial Average .DJI fell 26.18 points, or 0.09%, to 29,160.09, the S&P 500 .SPX gained 3.79 points, or 0.11%, to 3,325.54, and the Nasdaq Composite .IXIC added 18.71 points, or 0.2%, to 9,402.48.

Of the 11 major sectors in the S&P 500, six closed in the red. Healthcare .SPXHC was the biggest percentage loser, while industrials .SPLRCI enjoyed the largest gain.

Insurance bellwether Travelers Cos Inc TRV.N reported a better-than-expected quarterly profit, with underwriting gains tripling and catastrophe losses falling. Nevertheless, the company's shares dropped 5.1%, and were the biggest drag on the blue-chip Dow.

Comcast Corp CMCSA.O beat Street estimates but lost more subscribers than analysts expected, sending its shares down 3.8%.

Freeport-McMoRan FCX.N results also came in above expectations, but investors focused on the mining company's drop in Indonesia production. Its stock fell 2.8%.

Among winners, Union Pacific Corp UNP.N gained 3.5% after the rail operator said the Phase 1 U.S.-China trade pact should reverse slumping volumes.

Netflix NFLX.O jumped 7.2%, rebounding from losses sparked by a disappointing forecast earlier in the week.

Declining issues outnumbered advancing ones on the NYSE by a 1.01-to-1 ratio; on Nasdaq, a 1.15-to-1 ratio favored decliners.

The S&P 500 posted 53 new 52-week highs and four new lows; the Nasdaq Composite recorded 98 new highs and 44 new lows.

Volume on U.S. exchanges was 7.52 billion shares, compared with the 6.87 billion average over the last 20 trading days.