The Dow Jones Industrial Average gained more than 400 points Tuesday as U.S. stocks surged thanks to a less-aggressive stance on trade taken by Chinese President Xi Jinping.

Xi’s conciliatory comments on tariffs helped to ease concerns about an escalating conflict between the world’s two largest economies, sending prices of risky assets such as global equities and commodities higher.

The Dow Jones Industrial Average DJIA, +0.51% jumped 428.90 points, or 1.8%, to 24,408.00. The S&P 500 SPX, +1.05% finished 43.71 points, or 1.7%, higher to 2,656.87. The Nasdaq Composite Index COMP, +1.71% climbed 143.96 points to 7,094.30, a gain of 2.1%.

The day’s gains were broad, with 28 of the 30 Dow components as well as nine of the 11 S&P 500 sectors finishing in positive territory. Energy was the biggest gainer, up 3.3%, while tech shares jumped 2.5%.

Despite recent volatility, equities have largely trended to the upside. Major indexes are poised for their fifth positive session of the past six. U.S. stocks closed higher Monday, but they ended well off their highs of the session, with the rally deflating on the news of the FBI raid on President Donald Trump’s personal lawyer. The S&P 500, by one metric, suffered its worst final hour of trading in more than six years.

Need to know: ‘Curbing our enthusiasm’—big bank takes a knife to its S&P 500 target

What’s driving markets

Tuesday’s global equity rally was triggered as Chinese President Xi told the Boao Forum that Beijing plans to give foreign companies greater access to financial and manufacturing sectors. He also talked about a cut in tariffs on car imports and an improvement in protection of intellectual property, among other measures. While many of the measures had been previously touted by Xi, investors cheered the lack of any escalation in rhetoric.

Check out: The stock market is cheering what China’s Xi ‘didn’t say’ on trade

Trade optimism could, for now, help the market shake off the FBI’s seizure of records held by Michael Cohen, a personal lawyer for Trump. The records are reportedly related to a $130,00 payment to adult-film actress Stormy Daniels, who alleges she had a brief affair with the president. Trump dismissed the raid as a “witch hunt.”

Read:Here’s what FBI raid on Trump lawyer’s office means for the stock market

What are strategists saying?

“It was a short-term surprise to the risk markets that Xi put out a positive comment saying he’s open to trade negotiations and relaxing trade restrictions. This is going to be an ongoing issue for months, but for today it’s a shot of adrenaline,” said Chad Morganlander, senior portfolio manager at Washington Crossing Advisors.

Speaking about the FBI raid, Morganlander said investors “shouldn’t focus entirely on it, as earnings and growth trends will be more important, but these kinds of issues continue to be a cloud of uncertainty that need to be monitored.”

Opinion:These two trading patterns could trigger the long-awaited stock market ‘melt-up’

What data are in focus?

The National Federation of Independent Businesses index of small-business optimism fell to 104.7 in March. U.S. wholesale prices accelerated in March, showing a 0.3% increase despite lower energy costs, suggesting inflationary pressures in the U.S. have become more widespread.

Read:The economy is fine now, but watch out for 2020, top economist says

Which stocks could be active?

Facebook Inc. FB, +2.66% shares rose 4.5% as Mark Zuckerberg, chief executive of the social-media giant, testified in a joint hearing held by two Senate committees.

See also:Facebook’s Mark Zuckerberg testifies before Congress: live blog and video

See: Dow surges, defying a bearish ‘sell signal’—here’s a theory as to why

Energy stocks rose broadly, helped by a 3.6% gain in the price of crude oil. Exxon Mobil Corp. XOM, -2.47% added 2.9% in its biggest one-day jump since September 2016, while Chevron Corp. CVX, -1.00% rose 2.5%. The largest exchange-traded fund to track the energy sector, the Energy Select Sector SPDR ETF XLE, -1.03% , recorded its best session since November 2016, up 3.3%.

Shares of VeriFone Systems Inc. US:PAY surged 52% after the payment and business services provider said it has agreed to a $3.4 billion private-equity acquisition by a group led by Francisco Partners. The deal is worth $23.04 a share in cash, a premium of 54% on Verifone’s closing price Monday of $15.

Tenneco Inc. TEN, +0.57% said it planned on buying Federal-Mogul, a manufacturer of parts for cars and the aerospace industry, from Icahn Enterprises L.P. IEP, +0.57% in a deal valued at $5.4 billion. Shares of Tenneco rose 4.1% while those for Icahn Enterprises were up 2.9%.

Energous Corp. WATT, -1.65% rallied 10% after the developer of wireless charging technology said the Federal Communications Commission has approved its near-field transmitter WattUp.

Tupperware Brands Corp. TUP, +4.45% fell 11% after the plastic-container maker lowered its first-quarter earnings guidance.

Shares of Sprint Corp. US:S surged 17%, enough to trigger a trading halt for volatility, after The Wall Street Journal reported that the telecommunications company had restarted merger talks with T-Mobile US. TMUS, +1.64% about five months after previous deal talks were abandoned. T-Mobile rose 5.7%.

Read:Here are the changes Facebook has announced ahead of Zuckerberg testimony

What are other markets doing?

Asian stocks got a lift after the Chinese president’s speech, with Hong Kong’s Hang Seng Index HSI, -0.08% HSI, -0.08% rising 1.5%. European stocks SXXP, +0.20% hit multiweek highs as a global equity rally took hold.

Gold futures US:GCM8 rose for a third session, settling 0.4% higher at $1,345.90 an ounce.

Oil prices US:CLK8 settled at the highest level in three years, after surging 3.3% to $65.51 a barrel, climbing as trade-war tensions lifted.

The ICE U.S. Dollar Index DXY, +0.17% slipped 0.2% to 89.627.

Here's why private equity companies are buying fertility clinics

—Barbara Kollmeyer contributed to this article