New York —

The S&P 500 closed at a record high Tuesday, supported by strong corporate earnings, a rebound in tech shares and traders embracing hopes for progress on reopening the Strait of Hormuz.

The S&P 500 surged 1.79% to close at 7,737 points, its first record high in two months. The index surpassed its previous closing peak set in early June.

The Dow soared more than 900 points, or 1.71%, and closed above 54,000 points for the first time ever. The blue-chip index notched back-to-back all-time highs after clinching a record high on Monday, which was its first in a month.

The tech-heavy Nasdaq Composite surged 2.59% on Tuesday. Still, the Nasdaq is about 2% away from its record high set in early June as it recovers from a summer slump.