The Dow Jones Industrial Average and the SP 500 exited correction territory Thursday, with the stock market rising for a fifth session in a row as Federal Reserve Chairman Jerome Powell reiterated the central bank’s commitment to proceeding with caution on the monetary policy.

But the day’s gains come after a volatile session as investors dealt with a mix of optimism over progress in trade talks, less-than-stellar Chinese economic data and disappointing holiday sales data.

How did major benchmarks fare?

The Dow Jones Industrial Average

DJIA, +0.51%

rose 122.80 points, or 0.5%, to 24,001.92, up 10.1% from its Dec. 24 low. The SP 500

SPX, +0.45%

advanced 11.68 points, or 0.5%, to 2,596.64, climbing 10.4% from its December bottom. The Nasdaq Composite Index

NQH9, +0.35%

added 28.99 points, or 0.4%, to 6,986.07, rallying 12.8% from its Christmas Eve low, but the tech-centric index remains stuck in a bear market.

A correction is when an asset drops 10% from its recent peak.

See: Dow and SP 500 just exited a stock-market correction—after a 5-day surge Powell says Fed is ‘watching and waiting’ on interest rates

However, the market briefly turned lower when he expressed worries about the country’s rising debt burden even though he said 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 227,000, per a MarketWatch poll.

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

What were 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 were in focus?

Shares of L Brands

LB, -4.39%

shed 4.4%, after the Victoria’s Secret parent reported that same-store sales were flat in December from the year-ago period.

Twitter Inc.

TWTR, +2.60%

stock rose 2.6% 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, -4.81%

shares fell 4.8% after the retailer reported a deceleration in holiday-period sales growth.

American Airlines

AAL, -4.13%

slumped 4.1% after the company lowered its estimates for 2018 earnings-per-share to between $4.40 and $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, -17.69%

tumbled 18% after the retailer downgraded annual sales and profit estimates for 2018.

How did other markets trade?

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

SXXP, +0.34%

up 0.3%.

Oil prices pulled back although the U.S. benchmark

CLG9, -0.08%

still traded above $50 a barrel, while gold futures

GCG9, -0.38%

settled lower and the ICE U.S. Dollar Index

DXY, +0.43%

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.