(AP) -- Technology companies and banks led stocks higher on Wall Street Tuesday, erasing most of the market's losses from a broad sell-off a day earlier.
The rally, which lost some momentum in the final hour of trading, left the S&P 500 1.1% higher. About 73% of the companies in the benchmark index rose.
Technology stocks did much of the heavy lifting for the broader market, which helped drive the Nasdaq 1.3% higher, its biggest gain since Aug. 23. Chipmaker Nvidia rose 3.6% and Microsoft gained 2%.
Communications stocks also made solid gains after losing ground the day before. Netflix rose 5.2%. Utilities and real estate stocks were the only laggards in the S&P 500.
The gains mark a reversal in the market's overall trajectory in recent weeks. The S&P 500 fell 4.8% in September, its first monthly drop since January. After steadily losing ground since it set an all-time high Sept. 2, the index slipped Tuesday below its 100-day moving average of 4,354. That sends a signal to traders that the index has reached "a good level of support for stocks to trade higher," said Terry Sandven, chief equity strategist at U.S. Bank Wealth Management.
"Today's activity is primarily in response to the weakness we've experienced over the last 10 days or so," he said.
The S&P 500 rose 45.26 points to 4,345.72. The Dow Jones Industrial Average added 311.75 points, or 0.9%, to 34,314.67, and the Nasdaq gained 178.35 points to 14,433.83.
Small company stocks also notched gains. The Russell 2000 index picked up 10.89 points, or 0.5%, to 2,228.36.
Bond yields gained ground. The 10-year Treasury rose to 1.53% from 1.49% late Monday. Rising bond yields helped lift banks, which rely on higher yields to charge more lucrative interest on loans. Bank of America rose 2% and Citigroup added 1.7%.
Energy prices continued rising. U.S. oil rose 1.7% to $78.93 per barrel. Natural gas futures jumped 9.5%. Rising energy prices have been steadily pushing gasoline prices higher. The average price for a gallon of gas in the U.S. is $3.20, up more than $1 from a year ago, according to AAA.
The rise in energy prices helped lift oil company shares. Chevron rose 1.1% and Hess rose 1.6%.
A wide range of companies that focus on consumer services gained ground following an encouraging update on the services sector, which is the largest part of the U.S. economy. The Institute for Supply Management reported that the sector continued growing in September and at a faster pace than economists expected. Chipotle rose 1.4% and Carmax gained 3%.
The market has been choppy for weeks as investors try to gauge how the economy will continue its recovery with COVID-19 and the highly contagious delta variant crimping consumer spending and job growth. Inflation concerns have been driving much of the up-and-down shifts for technology companies and the broader market.
Rising inflation has been prompting businesses from Nike to Sherwin-Williams to temper sales forecasts and warn investors that higher costs will hurt financial results. Supply chain disruptions and delays, along with rising raw materials costs, are among some of the key problems facing companies as they try to continue recovering from the pandemic's impact.
The lingering pandemic and global supply chain problems prompted the International Monetary Fund to trim its forecast for global growth this year.
Still, Wall Street is still expecting solid corporate profit growth when the third-quarter earnings season kicks off later this month. S&P 500 companies are projected to post a 27.7% increase in earnings for the July-September quarter versus a year earlier, according to FactSet.
"We're now on the doorstep of third-quarter releases, which in our view will show earnings are growing, and that's a basis for stocks to trend higher," Sandven said.
Facebook rose 2.1%. The stock fell nearly 5% on Monday as the company suffered a worldwide outage and faced political fallout after a former employee told "60 Minutes" that the company has consistently chosen its own interests over the public good. The former employee, Frances Haugen, testified in front of Congress on Tuesday.
Stock markets in Europe rose, while markets in Asia were mostly lower.