By Anvee Bhutani

U.S. stocks closed higher with the AI trade again pacing the advance as investors returned from the Independence Day holiday weekend in an upbeat mood.

The Dow Jones Industrial Average rose 155.84 points, or 0.29%, to 53055.91. The S&P 500 rose 54.19 points, 0.72%, to 7537.43, while the Nasdaq Composite gained 288.49 points, or 1.12%, to 26121.16.

Tech stocks led the way higher, with Intel and Micron among the gainers. The advance comes ahead of a series of tests for the AI trade this week: Samsung is expected to share a preliminary second-quarter earnings update Tuesday, and South Korean chipmaker SK Hynix's $29 billion U.S. stock-market listing--set to be one of the biggest share sales in history--is expected to begin trading Friday.

SpaceX will join the Nasdaq-100 Tuesday after Nasdaq fast-tracked its inclusion, with mutual and exchange-traded funds collectively tracking some $800 billion in assets expected to buy shares of the rocket company after Monday's close. SpaceX shares slipped about 1% Monday ahead of the event.

Anthropic and crypto miner TeraWulf signed a 20-year, $19 billion lease for an AI infrastructure campus, sending TeraWulf shares up about 4.9%. Shares in data-center peers CoreWeave and Iren also jumped. Strategy slipped after the bitcoin-hoarding company said it sold 3,588 bitcoin last week, raising about $216 million to fund dividends on its preferred stock. The sale comes under a turnaround plan that allows the company to sell up to $1.25 billion of bitcoin to cover dividends, debt interest and share repurchases. Bitcoin rose about 1.54% to $63684.85.

Solstice Advanced Materials slid more than 15% after the specialty materials company, recently spun out of Honeywell, said it would buy chemicals maker Element Solutions for more than $12 billion in cash and stock.

Oil prices were little changed as a supply glut that has rapidly followed the Hormuz crisis to weighed on prices again. OPEC+ countries agreed Sunday to raise production for a fifth straight month. Tanker traffic through the Strait of Hormuz has settled into a new range of about 30 to 60 crossings a day, less than before the war, but enough to relieve pressure in global markets. Brent crude lost 13 cents per barrel, or 0.18% to $71.99.

The Texas Stock Exchange began live trading Monday in test mode, marking the first step toward challenging the listing duopoly of the New York Stock Exchange and Nasdaq. The exchange, backed by Wall Street heavyweights including BlackRock, expects to begin trading all publicly traded stocks as early as Friday and plans to start listing exchange-traded products in the third quarter.

Fed governor Christopher Waller said in Rome that the risks facing the central bank have "completely flipped" in the past year, with inflation now outweighing labor market concerns as the primary policy challenge. Investors are also looking ahead to Wednesday's release of minutes from the Fed's first meeting under Chairman Kevin Warsh, though some analysts cautioned not to expect much: Warsh, who has argued the Fed should communicate less, kept the June policy statement to just 132 words.

Yields on U.S. Treasury bonds rose. The 10-year yield increased 0.002 percentage point to 4.479%. The dollar increased by 0.01 percentage point. The euro was last seen at $1.14. Gold gained $42.40 per troy ounce, or 1.03%, trading at $4155.10.

Looking ahead, Samsung reports a preliminary second-quarter update Tuesday. Fed minutes are due Wednesday, and PepsiCo reports Thursday. SK Hynix's U.S.-listed shares begin trading on the Nasdaq Friday, the same day Delta Air Lines reports earnings.

Write to Anvee Bhutani at anvee.bhutani@wsj.com