Wall Street’s main indexes closed higher on Tuesday, driven by gains in Tesla and other megacap growth stocks, despite thin trading volumes ahead of the July Fourth holiday and the upcoming June nonfarm payrolls report on Friday.

The Dow Jones Industrial Average rose 162.33 points (0.41%) to 39,331.85, the S&P 500 gained 33.92 points (0.62%) to 5,509.01, and the Nasdaq Composite added 149.46 points (0.84%) to 18,028.76.

Tesla surged after reporting a smaller-than-expected drop in Q2 vehicle deliveries. Apple rose 1.6%, while Amazon and Alphabet also saw gains. Nvidia fell 1.3%, though it remains up over 147% year-to-date.

U.S. job openings increased in May, with layoffs also rising, ahead of the crucial June nonfarm payrolls data. Federal Reserve Chairman Jerome Powell noted significant economic progress but highlighted the need for further improvements before policy changes.

Paramount Global climbed 5.7% on news of a potential takeover bid by IAC. Trading volumes are expected to remain light with the market closing early Wednesday and shut all day Thursday for Independence Day.

Advancing issues outnumbered decliners by a 2.06-to-1 ratio on the NYSE. The S&P 500 and Nasdaq recorded several new highs despite mixed performances in other sectors.