The S&P 500 posted 18 new 52-week highs and 2 new lows, while the Nasdaq Composite recorded 55 new highs and 267 new lows. (EPA Images pic)NEW YORK: US stocks closed lower on Thursday, as a drop in Nvidia shares after CEO Jensen Huang's exit outweighed gains in energy shares.

The chip company's shares fell 4.3% but were well off the day's lowest level after earlier dropping nearly 12%. Retail investors bought Nvidia shares worth about US$111 million in the first half hour of trading, the biggest opening bid on record for the stock, according to data from Vanda Analytics.

The S&P 500 energy index rose 1.5%, its fourth straight session of gains, as the best-performing of the 11 major S&P sectors. Crude prices climbed after President Donald Trump wrote on social media that the US did not need a deal with Iran.