By Herbert Lash and Shreyashi Sanyal
(Reuters) -Stocks on Wall Street closed mixed on Tuesday, pressured by worries about U.S. lawmakers opposed to a deal to raise the $31.4 trillion debt ceiling, but supported by another surge in Nvidia shares that briefly lifted the chipmaker into the rare club of companies valued at $1 trillion.
The S&P 500 index closed essentially flat but remained near its highest level since August 2022, just above 4,200 points. The Dow Jones Industrial Average also was lower while the Nasdaq Composite rose. The S&P 500 and the Nasdaq were still set for monthly gains in May.
Over the weekend, U.S. President Joe Biden and Republican House of Representatives Speaker Kevin McCarthy agreed to temporarily suspend the debt ceiling and cap some federal spending.
On Tuesday, McCarthy said the deal should be "easy" for Republicans to vote for and was likely to pass, but some right-wing Republicans said they opposed the bipartisan deal.
"I would not be surprised if the first vote results in failure and they have to go back again," said Sam Stovall, chief investment strategist at CFRA in New York. But I firmly believe a debt ceiling agreement will be approved before the June 5 drop dead date."
The House Rules Committee began to consider the 99-page bill, with the White House saying Biden talked to both progressive and moderate Democratic members of Congress.
Nvidia Corp pared gains after setting a record high. The company anticipates a surge in demand for its AI chips that power chatbot sensation ChatGPT and other applications.
The chipmaker rose 3.0% to close with a market cap of about $991 billion, just shy of the elite club of six companies valued at $1 trillion or more.
"Nvidia is the poster child for AI at the moment," said Thomas Hayes, chairman at Great Hill Capital LLC. "If this AI trend is real, the immediate demand is going to be in chips and computing power.
Digital Realty rose 1.7% after surging 14.6% the prior two sessions on expectations data centers will benefit from AI computing.
Federal Reserve rate hikes to fight stubborn inflation are denting economic growth and corporate profits, leaving about 20 companies to drive a 10% total return for the S&P 500 so far this year, said Anthony Saglimbene, chief market strategist at Ameriprise Financial in Troy, Michigan.
"Getting the debt ceiling legislation signed into law is not going to take away the other overhangs that are still out there on the market," he said, adding that the majority of stocks are essentially treading water this year.
"That's more telling of this market environment than the actual index performance of these handful of tech stocks."
The Philadelphia SE Semiconductor index closed 0.1% higher. During the session it rose as much as 2.8%, hitting its highest since February 2022.
Only three of the S&P 500's 11 sectors were higher, while declining stocks outweighed advancing shares on both the S&P 500 and Nasdaq.
The Dow Jones Industrial Average fell 50.56 points, or 0.15%, to 33,042.78, the S&P 500 gained 0.07 points, or 0.00%, to 4,205.52 and the Nasdaq Composite added 41.74 points, or 0.32%, to 13,017.43.
Volume on U.S. exchanges was 11.07 billion shares.
Data showed a consumer confidence rose more than expected in May, which could feed speculation that the Fed may hike rates more to fight inflation.
Futures traders assign a 65% chance of a 25 basis point rate hike at the end of Fed policymakers' June 13-14 meeting. [FEDWATCH]
The Labor Department's closely watched unemployment report for May, due on Friday, should hint at how resilient the economy has been as higher rates crimp company credit lines.
Tesla shares advanced, extending Friday's gains. CEO Elon Musk arrived in China's capital Beijing for the first time in three years.
Declining issues outnumbered advancing ones on the NYSE by a 1.12-to-1 ratio; on Nasdaq, a 1.21-to-1 ratio favored decliners.
The S&P 500 posted 20 new 52-week highs and 17 new lows; the Nasdaq Composite recorded 89 new highs and 121 new lows.
(Reporting by Shreyashi Sanyal and Shashwat Chauhan in Bengaluru; Editing by Shounak Dasgupta, Maju Samuel and David Gregorio)