Technology companies led a broad rally in U.S. stocks, erasing much of the market’s losses from a day earlier and more in Wednesday’s Stock Market Update.

Traders pivoted to riskier holdings Wednesday as encouraging developments overseas helped alleviate anxiety over the global economy. Lawmakers in Britain were seeking a less chaotic exit from the European Union and political tensions in Hong Kong eased.

The rally reversed Tuesday’s losses, when disappointing economic data and an escalation in the ongoing trade war between the U.S. and China led to a sell-off that ended a three-day winning streak for the market.

Chipmakers, which have been at the mercy of trade war volatility, did much of the heavy lifting for the technology sector Wednesday. Intel rose 4.1% and Nvidia rose 2.8%. Apple, which relies on China as a key part of its supply chain, rose 1.7%.

Communication services, industrial and financial stocks also notched solid gains. Activision Blizzard climbed 4.7%, Honeywell gained 2.2% and Citigroup added 1.3%.

Traders moved away from safe-play holdings, such as utilities and real estate, which lagged the market, as did the health care sector. Humana dropped 2.2%.

Investors have been worried that the trade war and a slowing global economy could tip the U.S. into a recession. The bond market has reflected these fears, with long-term bond yields falling below short-term ones in August, a so-called inversion in the U.S. yield curve that has frequently predicted previous recessions.

Long-term bond yields moved back above short-term ones on Wednesday. The yield on the 10-year Treasury note held steady at 1.46%. It briefly rose to 1.47% before falling again. The yield on the 2-year Treasury note fell to 1.43% from 1.46%.

STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 rose 31 points, or 1.1%, to 2,937. The Dow Jones Industrial Average climbed 237 points, or 0.9%, to 26,355. The Nasdaq rose 102, or 1.3%, to 7,976.

OVERSEAS: Asian stocks finished broadly higher. The Hang Seng in Hong Kong surged 3.9% after the government withdrew an extradition bill that had set off three months of protests in the region.

Stocks in Europe also rose following the latest developments in Britain’s plans to exit the European Union. Britain’s parliament will attempt to defy Prime Minister Boris Johnson and his plans to pull out of the EU on Oct. 31 with or without a withdrawal agreement. Leaving the EU without a deal that covers trade and other issues could result in economic chaos for Britain and complicate trade with member nations in the EU.

ANALYST’S TAKE: While geopolitical developments in Britain and Hong Kong are giving the markets a lift, investors should keep in mind Tuesday’s weak manufacturing activity report as yet another harbinger of an economic slowdown.

“Without any sort of catalyst to help turn sentiment around we anticipate that continued weakness in the manufacturing sector is likely to bleed over into the consumer sector, which can then drag down the economy further,” said Peter Donisanu, investment strategy analyst at Wells Fargo Investment Institute.

DISAPPOINTING DRUMSTICKS: Tyson Foods slumped 7.7% after the meat producer slashed its 2019 profit forecast because of commodity costs and a fire at a beef processing plant. The company and its competitors are all facing higher costs for animal feed such as corn because flooding delayed the planting season.

BAG HANDOVER: Tapestry climbed 5.1% after CEO Victor Luis resigned from the upscale handbag maker less than a month after it warned investors about a profit slump. The company has been struggling with its Kate Spade brand, which it bought in 2017. It also owns the Coach brand.

© The Associated Press. All rights reserved.