Investors were in a buying mood again Thursday, driving U.S. stocks higher for the second straight day as they took advantage of this month's heavy selloff.
The rally came a day after the stock market delivered its biggest gain in almost four years, which ended a steep six-day slump that was triggered by concerns about the health of the Chinese economy.
Energy stocks surged as the price of U.S. oil jumped $3.96, or 10.3 percent, to $42.56 a barrel.
Investors were encouraged by a rebound in the Chinese stock market as the nation's main index logged its biggest gain in eight weeks. But mostly, it was the opportunity to pick up beaten-down shares that drove the rebound. By Tuesday's close, the Standard & Poor's 500 index had tumbled more than 10 percent from the all-time high that it set in May.
"Asset prices sold off so much and so drastically, people went in and did start to bottom-fish," said David Lyon, global investment specialist at J.P. Morgan Private Bank in San Francisco.
The Dow Jones Industrial Average climbed 369.26 points, or 2.3 percent, to 16,654.77. The index has recouped almost 1,000 points in the past two days, or more than half of its losses during a sharp six-day slump.
The S&P 500 index gained 47.15 points, or 2.4 percent, to 1,987.66. The Nasdaq composite rose 115.17 points, or 2.5 percent, to 4,812.71.
All 10 sectors in the S&P 500 rose, led by energy stocks. The sector rose 4.9 percent, paring its losses for the year to 20 percent.
Financial markets have been volatile since China decided to weaken its currency earlier this month, a move investors interpreted as an attempt to bolster a sagging economy.
But Thursday, the news out of China was more positive. The Shanghai Composite Index rose 5.3 percent, its first gain in six days. The index is rebounding from losses that triggered worldwide selling and wiped nearly 23 percent off its value over the past week.
Traders also are jittery about the outlook for interest rates. The Federal Reserve has signaled it could raise its key interest rate for the first time in nearly a decade later this year.
William Dudley, president of the New York Federal Reserve Bank, said Wednesday that the case for a U.S. interest rate hike in September is "less compelling" given China's troubles, weak oil prices and emerging markets' weakness.