Stocks reversed an early slide on Wall Street and finished broadly higher Wednesday, giving the market its second straight gain in a week of bumpy trading.

Big technology and communications companies, including Microsoft, Apple, and Google parent Alphabet, led the rally as the market shrugged off an initial stumble. Banks took heavy losses following a sharp drop in bond yields.

Investors got in a buying mood after Treasury Secretary Steven Mnuchin gave a Senate subcommittee a promising update on the Trump administration’s efforts to reach a trade deal with Canada and Mexico. Markets also got a boost from reports that the White House plans to delay new tariffs on car and auto parts imported from Europe by up to six months.


‘‘The market does not believe that the trade discord will be protracted or widen, nor lead to a worldwide economic slowdown, or worse yet, a global recession,’’ said Sam Stovall, chief investment strategist at CFRA.

The S&P 500 index gained 16.55 points, or 0.6 percent, to 2,850.96. The Dow Jones industrial average rose 115.97 points, or 0.5 percent, to 25,648.02. The index had briefly fallen 190 points.

The Nasdaq, which is heavily weighted with technology stocks, added 87.65 points, or 1.1 percent, to 7,822.15.

Small-company stocks lagged. The Russell 2000 index picked up 5.21 points, or 0.3 percent, to 1,548.27.

Major indexes in Europe closed higher.

Stocks have been whipsawed this week by worries over the worsening trade relationship between China and the United States and the fallout it may have on the broader global economy. The market plunged Monday, bounced back Tuesday, and see-sawed Wednesday.

On Wednesday, Mnuchin told a Senate subcommittee that the United States is making progress on lifting tariffs imposed on steel and aluminum from Canada and Mexico, potentially overcoming a key hurdle toward approval of a trade agreement covering the three countries.


Addressing another contentious trade issue, Mnuchin said he expects to soon travel to Beijing with US Trade Representative Robert Lighthizer to resume negotiations on the US-China trade dispute. President Trump has said he expects to meet China’s president in late June at the G-20 summit in Osaka, Japan.

Tensions between the world’s two biggest economies intensified over the last week. The Trump administration more than doubled tariffs on $200 billion in Chinese imports and spelled out plans to target the $300 billion worth that aren’t already facing 25 percent taxes. The escalation covers everything from sneakers to toasters to billiard balls. The Chinese have retaliated by hiking tariffs on $60 billion in US imports.

The escalation surprised investors, who had been expecting a resolution. That confidence was a key component of the stock market’s sharp gains so far this year. Analysts have been warning that the stock market will remain volatile as long as the United States and China remain locked in their latest spat.

Major carmakers turned higher Wednesday following media reports the United States is planning to delay new tariffs on car and auto parts from Europe. The proposed tariffs would add another front to US trade disputes and increase investors’ anxiety.

Both European and US automakers stand to suffer from retaliatory tariff increases that would cut into international sales. Ford stock rose 1.2 percent, Fiat Chrysler added 1.5 percent, and General Motors gained 0.9 percent.

Wednesday’s rally could be a case of investors reading too much into what is otherwise good news on the trade front. In this case, the potential delay in tariff increases for European cars could signal something more worrisome.


‘‘The market is having an overly optimistic reaction to the small kernels of positive news flow that have come out today,’’ said Kristina Hooper, chief global market strategist at Invesco. ‘‘I would argue the developments we heard today only underscore the precarious situation the US is in with China.’’

Banks lagged the broader market as bond yields slumped. Bond prices rose sharply, sending yields lower, after some surprisingly disappointing US economic data, including weak figures on retail sales and industrial production.

The yield on the 10-year Treasury note, which is used to set rates on many kinds of loans, including mortgages, fell to 2.37 percent from 2.42 percent late Tuesday, a large move.

That decline hurts banks because it cuts into their profits from interest on loans. Bank of America fell 1.2 percent; Citigroup slipped 0.6 percent.

Technology and communications stocks accounted for much of the market’s rally. Microsoft rose 1.4 percent, Apple gained 1.2 percent, and Alphabet climbed 4.1 percent. Video game publisher Activision Blizzard added 3.5 percent.

Not all technology stocks did well. Chip makers, which are heavily dependent on sales in China, remained weak. Nvidia lost 1.5 percent.

Progressive rose 5.2 percent after a solid first-quarter earnings report and renewal of its stock buyback plan. The insurer reported a sharp rise in written premiums.


Agilent plunged 11 percent after cutting its revenue forecast for the year following a disappointing first quarter. The scientific instruments maker reported profit and revenue that fell short of Wall Street forecasts.

Alibaba climbed 1.6 percent after the online retailer blew past Wall Street profit forecasts. The Hong Kong company also beat revenue forecasts.

Benchmark US crude rose 0.4 percent to settle at $62.02 per barrel. Brent crude, the international standard, closed 0.7 percent higher at $71.77.