U.S. stocks snapped higher Tuesday as markets eased some of the month's brutal losses before the end of October.

The rallied more than 1.5 percent to close at 2,682.63 as communications, energy and materials stocks carried the index out of correction territory. Shares of Charter Communications, DISH Network and Twitter all rose more than 4 percent each.

The Dow Jones Industrial Average surged by 431.72 points to finish at 24,874.64. Goldman Sachs, McDonald's and Boeing all outperformed the broader blue-chip index.

The tech-heavy Nasdaq Composite rose more than 1.5 percent to close at 7,161.65. That index climbed thanks to a 5.2-percent rally in Intel and a 4.7-percent gain in CNBC-parent Comcast; e-commerce giant Amazon shed 0.5 percent during the session.

The rebound on Tuesday followed a shaky start to the week in the prior session that saw stocks giving up sharp gains. The Dow traveled more than 900 points on Monday. Market participants cited the possibility of more U.S.-China tariffs, a drop in tech stocks and worries over higher interest rates for the decline.

After Tuesday's comeback, the Dow is down 5.9 percent this month, still its worst performance since August 2015. The S&P 500 is off by 7.9 percent in October, on track for its worst month since May 2010. On Monday, the S&P 500 closed in correction territory, down 10.2 percent from its record.

"Obviously we're in a correction phase of the stock market and I think investors have to realize that," said Bruce Bittles, chief investment strategist at Baird. "The monetary environment has changed. As you can see, even with a 10 percent change in the stock markets, interest rates have barely moved lower."

"Typically bull markets are global in scope and the question was: would we follow the rest of the world, or would they follow us? I think we've found the answer," Bittles added.

Even with the most recent sell-off, U.S. stocks have generally outperformed overseas indexes throughout 2018. The Stoxx Europe 600, which was little changed Tuesday, is down more than 8 percent for the year. In Asia, the Shanghai Composite has fallen more than 24 percent since January. The Chinese index rose 1 percent Tuesday.