U.S. stock markets closed mostly higher on Thursday as investors flocked to artificial intelligence. FactSet preliminary data shows that the S&P 500 SPX, +0.88% closed 0.9% higher. The tech-heavy Nasdaq composite COMP, +1.71% rose 1.7%, Nvidia Corp. (NVDA, +24.37%) was the best-performing stock on the S&P 500. The index’s tech sector ended with sharp gains exceeding 4%. The S&P 500’s second-best sector on Thursday was communication services, which rose a modest 0.4%. Investors expect Nvidia to benefit from AI. Shares of the company have soared.