All major U.S. stock indices rose more than 2 percent Thursday, extending their rally and wiping out losses for the week.

Gains were steady through much of the day, but markets seesawed in the last hour before heading to a strong finish. The Dow Jones industrial average ended the day up 369 points, or 2.3 percent, to close at 16655. The Standard & Poor’s 500-stock index rose 2.4 percent. And the Nasdaq was up 2.5 percent.

The late-day volatility, which included the Dow slipping 300 points before bouncing back again in the last two hours of trading, was in line with the week’s wide swings.

Market strategists said they expect daily volatility to continue in the near term as investors adjust to the stomach-churning turmoil seen this week, due largely to questions about China’s economic health.

“I don’t think it’s straight back up from here,” said Jim Dunigan, chief investment officer for PNC Wealth Management.

Investors were energized Thursday by better-than-expected economic data in the United States and a rise in Chinese and European markets.

Gross domestic product expanded by 3.7 percent between April and June, up from the previous estimate of 2.3 percent, according to the Commerce Department. Initial jobless claims also dropped by 6,000 for the week ending in Aug. 22 to a seasonally adjusted 271,000, according to the Department of Labor. Together, the brighter reports may be giving investors confidence that the U.S. economy could withstand a continuing slowdown in China.

“The economic data in the United States has done nothing but get better all year long,” said Jamie Cox, managing partner at Harris Financial Group.

Markets may also stabilize once investors get more certainty about when the Federal Reserve will begin raising interest rates.

On Wednesday, William Dudley, president of the New York Federal Reserve, said the prospect of a September interest rate increase “seems less compelling” given the recent market turmoil. But consistently positive economic reports may encourage Fed officials to raise rates this year.

Investors will seek reassurance this week from top policymakers gathered at an annual symposium in Jackson Hole, Wyo., hosted by the Federal Reserve Bank of Kansas City. Bank President Esther George said the U.S. economy is strong enough to withstand an increase in the central bank’s target rate next month but that the recent turmoil in China and global financial markets could complicate that decision.

“Given what we’ve seen recently, I think we just have to wait and see,” George said on Fox Business Network. “I don’t want to take too much signal from something that could turn out to be noise.”

A worker walks past second-hand robots in a factory in Shanghai. The dramatic collapse of China's stock markets has shaken global investors. (Aly Song/Reuters)

U.S. investors were also encouraged by a rebound in global markets. European stocks closed in positive territory Thursday, with the STOXX Europe 600 index gaining 3.5 percent.

Chinese markets also rose dramatically. The benchmark Shanghai Composite Index soaring quickly in less than an hour of late afternoon trading to finish up a significant 5.3 percent.

China’s central bank took steps this week to stem panic, cutting interest rates Tuesday and lowering the reserve requirement for banks. But analysts worry that was not enough and predict ongoing volatility in the days and weeks ahead.

“The downward trend has not changed. The market is on track to bottom out,” said Shenzhen-based Yang Delong, chief strategy analyst at China Southern Asset Management. “The rebound [in China] is a technical rebound. It is the market self-correcting after several recent big drops.”

The Wall Street rally Thursday followed a solid rebound Wednesday, when the Dow climbed more than 600 points, its third-largest points gain. The Dow, the Standard & Poor’s 500-stock index and the Nasdaq each climbed close to 4 percent.

Emily Rauhala in Beijing and Ylan Q. Mui in Jackson Hole, Wyo., contributed to this report.