Stocks retreated in volatile trade Thursday as market sentiment turned jittery after Federal Reserve Chairman Jerome Powell expressed concerns over mounting U.S. debt and the impact of the prolonged government shutdown on the economy.

The market had whipsawed for most of the session following a four-day winning streak as investors dealt with a mix of progress in trade talks, less-than-stellar Chinese economic data and disappointing holiday sales data.

How are major benchmarks faring?

The Dow Jones Industrial Average DJIA, +0.03% fell 27 points, or 0.1%, to 23,850, while the S&P 500 SPX, -0.04% shed 5 points, or 0.1%, to 2,579 and the Nasdaq Composite Index NQH9, -0.36% dropped 19 points, or 0.3%, to 6,937.

See: Here’s how to play stocks in the late innings of this recovery, according to Deutsche

What’s driving the market?

Investors were initially cheered by Powell, who during a discussion at the Economic Club of Washington, reiterated that the central bank will be “flexible” and “patient” on monetary policy as inflation is “under control.”

Read: Powell says Fed is ‘watching and waiting’ on interest rates

But the market quickly turned lower when he indicated that he is worried about the country’s rising debt burden even though he stressed that the Fed is more concerned with business cycles, according to CNBC.

Stocks had gained Wednesday after minutes of the December policy meeting indicated that the Fed is cautious about further interest rate increases.

New data on the Chinese economy compounded fears of tepid global growth, offsetting growing optimism among investors that the U.S. and China will avoid an escalation of their trade conflict following reports that the two sides made progress during a three-day meeting this week.

Meanwhile, there were signs of trouble ahead on the earnings front after several companies, including American Airlines Group Inc., issued disappointing sales forecasts Thursday morning, potentially raising fears that fourth-quarter earnings season will fail to assuage concerns over a slowing U.S. economy.

Another worry for investors is the partial U.S. government shutdown, with a stalemate entrenched after President Donald Trump walked out of a border-wall meeting with Democrats on Wednesday, and said he may still declare a national emergency in order to build a wall on the border with Mexico.

New jobless claims fell to 216,000 in the week ended Jan. 5, below economists’ expectations of 216,000, per a MarketWatch poll.

A report on wholesale inventories was due to be released by the Commerce Department Thursday, but will be delayed due to the government shutdown.

What are analysts saying?

“Retailers are having a bad morning, and that’s obviously weighing on markets today,” JJ Kinahan, chief market strategist at TD Ameritrade, told MarketWatch. But investors aren’t panicking yet, as the market has decided that these issues are company-specific rather than a comment on the broader economy, he said.

Nevertheless, investors remain heartened by headlines this week that indicate the U.S. and China are making progress on trade negotiations, Kinahan said. “The recent selloff was all about uncertainty over trade and growth,” he said. “As we start rolling into earnings next week there are hints and hopes that there will be more clarity on this issue going forward.”

Read: The stock market is too damaged for a sustained rally, strategist says

“Equity markets around the globe are in negative territory on Thursday, with the U.S. seen following suit, but that’s nothing to be concerned about with the drop coming after a good run of gains across stock markets,” said Craig Erlam, senior market analyst at Oanda, in a note.

“It’s been an impressive rebound over the last week or so, made all the more encouraging by the fact that it’s been supported by some genuine positive headlines. While specifics are lacking, talks between the U.S. and China appear to be going well, as the Chinese foreign ministry confirmed on Thursday. This is very good news for investors as it represents one of the primary risks for markets,” he said.

Which stocks are in focus?

Shares of L Brands LB, -7.35% shed 7.2%, after the Victoria’s Secret parent reported that same-store sales were flat in December from the year-ago period.

Twitter Inc. TWTR, +1.40% stock rose 1.1% after Bank of America upgraded the stock from underperform to buy, while J.P. Morgan analysts Dough Anmuth added the stock to his “best ideas” list of 2019.

Kohl’s Corp. KSS, -6.91% shares fell 6.7% after the retailer reported a deceleration in holiday-period sales growth.

American Airlines AAL, -5.18%  slumped 6.2% after the company lowered its estimates for 2018 earnings-per-share from between $4.40 to $4.60, versus the consensus $4.62. The stock had been up 4.3% during the first three trading days of the week.

Shares of Macy’s Inc. M, -18.51% tumbled 19% after the retailer revised down annual sales and profit estimates for 2018.

How are other markets trading?

Asian stocks were mostly weaker, with Japan’s Nikkei NIK, -1.29%  down 1.2%, while shares in Shanghai SHCOMP, -0.36%  slipped 0.4%. Stocks in Europe recovered from an earlier retreat, with the Stoxx Europe 600 up 0.3%.

Oil prices pulled back although the U.S. benchmark CLG9, -0.17%  still traded above $50 a barrel, while gold futures GCG9, -0.25%  slid and the ICE U.S. Dollar Index DXY, +0.39% edged up.

—Barbara Kollmeyer contributed to this report

Providing critical information for the U.S. trading day. Subscribe to MarketWatch’s free Need to Know newsletter. Sign up here.