The U.S. stock market bounced back on Thursday and made history.

After several volatile days with huge swings in both directions, the Dow finished Thursday up 369 points. Combined with Wednesday's 619-point rally, it's the best two-day point gain for the Dow in its history, surpassing the previous record set in 2008.

The S&P 500 and Nasdaq both posted gains above 2% Thursday.

U.S. energy stocks were some of the biggest winners. Energy sector stocks gained 6% overall Thursday as oil prices soared over 10% and rose back over $42 a barrel. It was oil's best rally since 2009.

Stocks of Halliburton (HAL), Baker Hughes (BHI) and Transocean (RIG) all surged more than 9% Thursday.

There was also good news about the U.S. economy, which grew 3.7% in the second quarter of this year, much higher than the first official estimate on growth of 2.3% and even higher than what economists were projecting.

It's a healthy sign that the American economy hasn't been hurt that much from China's economic slowdown yet. That eases fears about China's impact on the overall U.S. economy.

Related: 3 moves to make in a crazy market

The rally comes on the heels of a Federal Reserve official signaling that with all the turmoil, a September rate hike is less likely now. Most investors see a rate hike as bad for stocks and the 6-year bull market because it'll make borrowing more expensive, even though it's considered a good thing for the economy.

Stocks have had a wild ride recently. After closing down 588 points Monday and 204 points Tuesday, the Dow's Wednesday 619-point rally was its best one-day point gain since 2008.

The Dow, Nasdaq and S&P 500 were positive for the week by the close on Thursday.

The S&P 500 and Dow are still negative for the year.

But as tech stocks surged Thursday, the Nasdaq turned positive for the year. It's worth keeping in mind that stocks remain a lot higher from where they were in the past few years.

The S&P 500 is still up over 200% since its low point in 2009.