By Noel Randewich and Ragini Mathur

The S&P 500 and Nasdaq ended sharply higher on Monday, with Broadcom and other chip stocks rallying as investors bought shares in companies related to artificial intelligence that are expected to drive a strong second-quarter earnings season.

Broadcom NASDAQ:AVGO jumped after the chipmaker and Apple NASDAQ:AAPL agreed to extend a deal through 2031 to develop and supply a range of custom chips.

The S&P 500 information technology sector index SP:S5INFT climbed, while the Philadelphia SE Semiconductor index NASDAQ:SOX gained after two straight sessions of losses.

"This is a market that's leaving a lot of people out. If you're not in certain tech names, if you're not in semiconductors, then you're basically missing the entire rally," said Jake Dollarhide, chief executive officer of Longbow Asset Management in Tulsa, Oklahoma. "I think it's a very tenuous rally. There is a risk, particularly if the Fed continues to see higher interest rates for longer."

Taking advantage of massive investor demand for AI-related chip stocks, South Korea's SK Hynix KRX:000660 was set to debut on the Nasdaq later this week.

Microsoft shares fell after the tech heavyweight said it was cutting about 2.1% of its workforce, or roughly 4,800 jobs.

"What the market is saying is Microsoft can't afford all of its CapEx and there's not a clear return on invested capital yet. Therefore, laying off people in lieu of moderating CapEx spend is perceived as a negative," said Thomas Hayes, chairman at Great Hill Capital LLC.

In economic data, the Institute for Supply Management said its non-manufacturing purchasing managers index edged down to 54.0 last month, matching expectations.

According to preliminary data, the S&P 500 CBOE:SPX gained 55.10 points, or 0.74%, to end at 7,538.34 points, while the Nasdaq Composite TVC:IXIC gained 288.49 points, or 1.12%, to 26,121.16. The Dow Jones Industrial Average DJ:DJI rose 159.68 points, or 0.29%, to 53,053.59.

With Monday's gains, the S&P 500 is up about 10% in 2026, and the Nasdaq has added about 12%.

With major U.S. companies set to begin reporting quarterly earnings in the next few days, investors have high expectations.

Analysts expect S&P 500 companies to increase their earnings by an aggregate 24% year-over-year in the second quarter, according to LSEG I/B/E/S. Tech sector earnings are projected to jump around 65%.

Delta Air Lines NYSE:DAL and PepsiCo NASDAQ:PEP are set to report results later in the week.

Following a cooler-than-expected jobs report last week, traders see a 25% chance of a 25-basis-point rate hike at the central bank's July 29 meeting, according to CME's FedWatch tool.

Hawkish bets had risen after last month's Fed meeting, the first under new Chair Kevin Warsh. The minutes are due on Wednesday.

Fed Governor Christopher Waller said on Monday that forward guidance can be a "valuable tool" that speeds up the impact of monetary policy under the right circumstances, but can become problematic when used inflexibly.

Shares of O'Reilly Automotive NASDAQ:ORLY tumbled after Bloomberg News reported on Thursday that the auto parts retailer sent a cash offer to buy Genuine Parts NYSE:GPC. Genuine Parts also fell.