US stocks closed at a record Monday, powered by technology shares as investors disregard the government shutdown, now in its sixth day, and instead cheer a multibillion-dollar infrastructure deal that signaled the artificial intelligence spending boom.

The S&P 500 Index rose 0.4% to notch its seventh straight session of gains for its longest winning streak since early May. The Nasdaq 100 Index advanced 0.8%, with Advanced Micro Devices Inc. soaring 24% — its biggest gain since April 9 — after inking a deal with OpenAI to roll out AI infrastructure in a pact the chipmaker said could generate tens of billions of dollars in new revenue. Nvidia Corp., AMD’s main competitor in graphics processors, was the largest S&P 500 point decliner, falling 1.1% following that announcement.