NEW YORK (Reuters) - The S&P 500 finished little changed after a volatile session on Thursday, as investors continued to be spooked by uncertainty on both domestic and international issues, driving up bids for defensive shares while financials and consumer discretionary stocks were the biggest drags.

The Dow eked out a gain. The S&P oscillated between positive and negative territory after failing to sustain an opening rally spurred by hopes for progress in U.S.-China trade negotiations. A Chinese Commerce Ministry spokesman had said Washington and Beijing were in close contact over trade.

“It’s a market that’s been very nervous. Investors get excited in the morning and then their fears come back,” said Omar Aguilar, chief investment officer for equities at Charles Schwab Investment Management in San Francisco.

Aguilar cited worries on issues ranging from the U.S. Federal Reserve’s interest rate hikes, a flattening U.S. Treasury yield curve and the U.S.-China trade talks to uncertainty about Brexit, Italy and European Union monetary policy.

“We need a catalyst to get us a more consistent trend. It could be good economic data or more clarity on the Fed’s intentions for next year or more certainty in U.S.-China trade. I don’t think it’s going to happen any time soon,” he said.

The Dow Jones Industrial Average .DJI rose 70.11 points, or 0.29 percent, to 24,597.38, the S&P 500 .SPX lost 0.53 point, or 0.02 percent, to 2,650.54 and the Nasdaq Composite .IXIC dropped 27.98 points, or 0.39 percent, to 7,070.33.

At its session high the S&P was up 0.75 percent. Trading has been choppy all week with major stock indexes failing to hold direction for a full session.

Also fuelling investor fears, a Reuters poll showed that strategists expect the U.S. Treasury yield curve to invert next year, possibly within the next six months, much earlier than forecast just three months ago, with a recession to follow as soon as a year after that.

The defensive sectors were the three biggest percentage gainers out the 11 major S&P sectors. Utilities .SPLRCU rose 0.9 percent, real estate .SPLRCR 0.6 percent and consumer staples .SPLRCS 0.7 percent.

The S&P's financial sector .SPSY was down 0.6 percent as bank stocks .SPXBK fell 1 percent. The next biggest drag was the consumer discretionary index .SPLRCD, which fell 0.44 percent and was hurt by retail stocks. The S&P retail index .SPXRT snapped a three-day rally with a 0.4 percent drop.

Under Armour UAA.N, hitting a five-day losing streak, slid 5.2 percent on Thursday after the sportswear maker forecast 2019 revenue growth and profit below Wall Street estimates.

The materials sector .SPLRCM was the S&P's biggest percentage loser with a 1.1 percent drop.

General Electric Co GE.N rose 7.3 percent after JP Morgan upgraded the industrial conglomerate's shares to "neutral."

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

The S&P 500 posted 11 new 52-week highs and 47 new lows; the Nasdaq Composite recorded 14 new highs and 328 new lows.

On U.S. exchanges 7.55 billion shares changed hands, compared to the 8.02 billion average for the last 20 sessions.