(AP) -- A broadly rally led by technology companies drove U.S. stocks sharply higher Monday, giving the S&P 500 its biggest increase since late January.
The latest gains also snapped a five-day losing streak for the benchmark index, which was coming off its worst weekly stumble this year.
Nvidia was the S&P 500's strongest performer after agreeing to buy chipmaker Mellanox. Apple benefited from an analyst upgrade. A sharp decline in Boeing stemmed the gain for the Dow Jones Industrial Average.
Investors drew encouragement from a report showing a slight increase in U.S. retail sales for January after a steep decline in December, and from new data showing a rebound in Chinese exports this month, said Tom Martin, senior portfolio manager with Globalt Investments.
"The data that's coming in today is at the margin at least OK; there's no negative news," Martin said. "People want to be in the market. Rates are low. Stocks are OK."
The S&P 500 gained 40.23 points, or 1.5 percent, to 2,783.30. The Dow rose 200.64 points, or 0.8 percent, to 25,650.88. The average bounced back after declining 242 points as shares in Boeing slumped.
The Nasdaq composite, which is heavily weighted with technology stocks, jumped 149.92 points, or 2 percent, to 7,558.06. The Russell 2000 index of smaller companies picked up 26.99 points, or 1.8 percent, to 1,548.88.
Major European stock indexes finished higher.
Monday's gains helped the market reclaim the momentum it had in January and February, when it posted the best two-month start to a year since 1991. Despite stocks posting their worst week since December last week, the S&P 500 and Nasdaq are showing double-digits gains for the year so far, and the Dow is just shy of a 10 percent increase.
Investors are still waiting for more details on any potential trade deal between the U.S. and China. Costly tariffs have hurt both nations and investors hope a deal can be struck to at least take some pressure off the global economy, which has shown signs of cooling off.
"Last week was a little bit of a breather and investors said, 'Well, maybe we overreacted a little bit,'" said Karyn Cavanaugh, senior markets strategist at Voya Investment Management. "We have good economic data, earnings should be pretty solid, and the Fed is on hold. We potentially have progress going on with China. So overall, things are pretty good and stocks are the place to be."
Technology sector stocks drove Monday's rally, with chipmakers leading the way.
Nvidia jumped 7 percent after the chipmaker said it will buy network transmission company Mellanox for $6.9 billion in cash.
The companies are frequent collaborators and said that together they help to power more than 250 of the world's 500 supercomputers, including Sierra and Summit, operated by the U.S. Department of Energy.
Apple gained 3.5 percent after receiving an analyst upgrade.
Boeing's stock slumped 5.3 percent following the second deadly crash involving the newest version of the aircraft maker's popular 737.
An Ethiopian Airlines jetliner went down Sunday, killing 157 people. Back in October, another 737 Max 8 crashed in Indonesia, killing 189 people. Authorities in Ethiopia, China and Indonesia have grounded all Boeing 737 Max 8 aircraft.
Boeing's stock had been soaring. On Monday, shares slid more than 13 percent at one point. It was the only stock in the Dow to close with a loss. Despite Boeing's decline, the industrial sector managed to post a gain.
Gains in health care stocks also helped drive the market higher. Align Technology rose 5.4 percent.
Social media companies also notched gains. Facebook added 1.5 percent and Twitter picked up 2.8 percent.
Germany's Deutsche Bank rose 5 percent following reports that it agreed to hold merger talks with rival Commerzbank.
Benchmark U.S. crude climbed 1.3 percent to settle at $56.79 per barrel. Brent crude, the international standard, rose 1.3 percent to close at $66.58 per barrel.
Bond prices fell. The yield on the 10-year Treasury note rose to 2.64 percent from 2.62 percent late Friday.
The dollar strengthened to 111.21 Japanese yen from 111.07 yen late Friday. The euro fell to $1.1240 from $1.1242.
Gold dropped 0.6 percent to $1,291.10 an ounce. Silver lost 0.5 percent to $15.27 an ounce. Copper added 0.3 percent to $2.90 a pound.
In other energy futures trading, wholesale gasoline gained 1.3 percent to $1.83 a gallon. Heating oil dropped 0.3 percent to $1.99 a gallon. Natural gas slid 3.2 percent to $2.77 per 1,000 cubic feet.