U.S. stocks continued to rally Tuesday, adding to the previous day's gains as the Dow Jones Industrial Average surged past the 30,000-point mark.

The sharp rally in the first two days of the fourth quarter have helped boost the major indexes from 52-week lows.

The Dow rose 825.43 points, or 2.80%, to 30,316,32. The S&P 500 rose 112.5 points, or 3.06%, to 3,790.93, and the Nasdaq Composite was up 360.97 points, or 3.34%, to 11,176.41.

On Monday, the Dow rose nearly 765 points for its best day since June 24. The S&P 500 had its largest one-day gain, 2.6%, since July 27.

Some of the stocks that advanced Tuesday included Twitter (TWTR), which closed at $52.01, up $9.47, or 22.26%. Peloton Interactive's (PTON) price of shares rose $1.39, or 18.61%, to close at $8.86.

The two-day rally comes after a weeks-long slide. The Federal Reserve has been signaling it will continue to increase interest rates after hiking rates 0.75% three consecutive times.

Fed officials have said they will do what they can to stifle inflation and cool the economy.

"People like to hang onto good news but ... we're not going to have a recovery in this market until the Fed signals that they're going to stop raising rates, and that's not going to happen until inflation starts coming down," Holly Newman Kroft, wealth advisor at Neuberger Berman, told CNBC.