A screen displays trading information for ride-hailing giant Didi Global on the floor of the New York Stock Exchange (NYSE) in New York City, U.S., December 3, 2021.
A screen displays trading information for ride-hailing giant Didi Global on the floor of the New York Stock Exchange (NYSE) in New York City, U.S., December 3, 2021. Reuters / BRENDAN MCDERMID

The S&P 500 and the Nasdaq rose on Monday, recovering some losses suffered last week as investors bought into heavyweights Apple and Amazon.com, while Twitter dropped after Elon Musk threatened to walk away from his $44 billion buyout deal.

Nine of the 11 major S&P sectors advanced, with communication services and consumer discretionary leading the pack with a rise of 0.7% and 0.6%, respectively.

Apple Inc, Tesla Inc, Alphabet Inc and Amazon.com climbed between 0.8% and 3.1%. Amazon shares were trading after adjusting to 20-to-1 split.

The gains came after a volatile week when a solid jobs report quashed hopes of a pause in the Federal Reserve's aggressive policy tightening plan to cool decades-high inflation.

"There's been too much pessimism and the market is trying to find a sustainable bottom. The big question is, is there going to be a recession? I think the answer is going to be 'no' ... that's good news," said Christopher Grisanti, chief equity strategist at MAI Capital Management.

"We are anxiously awaiting more data. The inflation report is not going to be good, but we are hoping it will be better than February and March."

The inflation report, due on Friday, is expected to show consumer prices rose 0.7% last month after rising 0.3% in April. Signs that inflation remains strong could spook markets already battered by worries that a hawkish Fed could tip the economy into a recession.

Money markets are fully pricing in 50 basis point rate increases by the U.S. central bank next week and in July.

The upbeat mood on Monday was also underpinned by optimism around easing regulatory crackdowns in China and signs of Beijing and Shanghai returning to normal life after the country's biggest COVID-19 outbreak in two years.

Didi Global Inc surged 36.8% after a report that Chinese regulators were preparing as early as this week to allow the ride-hailing firm's mobile app back on domestic app stores.

Shares of JD.com Inc, Baidu and Alibaba Group, all targets of China's crackdown on internet companies, gained between 6.6% and 7.1%.

At 12:19 p.m. ET, the Dow Jones Industrial Average was up 26.29 points, or 0.08%, at 32,925.99, the S&P 500 was up 12.76 points, or 0.31%, at 4,121.30, and the Nasdaq Composite was up 26.03 points, or 0.22%, at 12,038.76.

Twitter Inc slipped 2.5% after billionaire Musk said he might walk away from his buyout offer if the social media company fails to provide data on spam and fake accounts.

"The takeover was always destined to be a bumpy ride," said Susannah Streeter, senior investment and markets analyst, Hargreaves Lansdown.

"The fact the losses have not been deeper given the official filing of the letter is a sign of the already deep scepticism among investors about the prospects of the deal going ahead."

Advancing issues outnumbered decliners by a 1.43-to-1 ratio on the NYSE. Declining issues outnumbered advancers for a 1.03-to-1 ratio on the Nasdaq.

The S&P index recorded one new 52-week high and 29 new lows, while the Nasdaq recorded 52 new highs and 90 new lows.