(AP) -- Energy and technology companies helped lift stocks on Wall Street broadly higher Wednesday, reversing the market's pullback from a day earlier.
The S&P 500 rose 0.8% after another day of choppy trading. It was the biggest daily gain for the benchmark index since late August and it put the S&P 500 on pace to close the week higher.
About 80% of stocks in the index rose. Energy companies did particularly well as prices for crude oil and natural gas climbed, and Microsoft helped pull the tech sector higher after announcing a dividend increase and a new stock buyback program. Health care and financial stocks also made solid gains. Utilities, which investors tend to shun when they're more willing to take on risk, were the only sector to fall.
The rally marked the latest reversal for the market this month, which has been characterized by choppy trading and small moves, usually ending with stocks finishing lower, but still near their recent all-time highs. Stocks fell Friday, rose Monday and then fell again on Tuesday.
"We've just retraced some of the weakness that we've seen the past few days," said Willie Delwiche, investment strategist at All Star Charts. "In aggregate, the median stock hasn't really gone anywhere in six months."
The S&P 500 rose 37.65 points to 4,480.70. The index is within 1.3% of its all-time high set Sept. 2. The Dow Jones Industrial Average gained 236.82 points, or 0.7%, to 34,814.39. The Nasdaq composite added 123.77 points, or 0.8%, to 15,161.53. Small-company stocks did even better with the Russell 2000 index gaining 24.46 points, or 1.1%, to 2,234.45.
U.S. government bond yields rose. The yield on the 10-year Treasury rose to 1.30% from 1.27% late Tuesday. Banks benefitted from the higher yields, which allow them to charge more lucrative interest rates on loans. Citigroup rose 2.4% and Capital One Financial gained 2.9%.
Oil prices rose 3.1% and natural gas prices rose 3.8% as the oil and gas industry continues to sort through the damage caused by hurricane season in the Gulf. Disruptions have been more pronounced than originally expected, and there's been some oil spills from some refineries.
ExxonMobil gained 3.4%, while Occidental Petroleum climbed 6.1% and Marathon Oil finished 7.7% higher.
Casino stocks slumped following reports of a possible crackdown on the industry by Chinese officials in Macau, the former Portuguese colony and gambling center. Wynn Resorts fell 6.3% for the biggest drop in the S&P 500, while MGM Resorts fell 2.5% and Las Vegas Sands slid 1.7%.
Investors have been navigating a choppy market as they try to determine how rising cases of COVID-19 because of the highly contagious delta variant will impact economic growth. The employment market has been slow to recover and consumer spending has been tempered in recent months.
Wall Street will get get more information on jobs and consumer spending on Thursday when the Labor Department releases its weekly report on unemployment benefits and the Commerce Department releases retail sales data for August.