Gains were broad-based, with all of the S&P 500 sectors ending in positive territory and real estate and technology leading gains.
Drugmaker AstraZeneca resumed its British clinical trials of its COVID-19 vaccine, one of the most advanced in development.
Also, Pfizer Inc rose 2.6% after the drugmaker and German biotech firm BioNTech SE proposed to expand their Phase 3 pivotal COVID-19 vaccine trial to about 44,000 participants.
"The market loves anything with a vaccine because that is the ultimate solution here. And we'll see more and more headlines," on that going forward, said Tim Ghriskey, chief investment strategist at Inverness Counsel in New York.
Merger-related news also lifted the market, and tech shares performed well but value-related sectors did as well, he said. That suggests investors may continue buy into value.
Nvidia Corp jumped 5.8% and was among the biggest boosts for the S&P 500 and Nasdaq following plans to buy UK-based chip designer Arm from Japan's SoftBank Group Corp for as much as $40 billion, in a deal set to reshape the global semiconductor landscape. The Philadelphia SE chip index rose 2.1%.
Oracle gained 4.3% as the cloud services company said it would team up with China's ByteDance to keep TikTok operating in the United States, beating Microsoft Corp in a deal structured as a partnership rather than an outright sale.
U.S. stocks are coming off of two straight weeks of losses as investors sold heavyweight technology shares that had powered the benchmark index to record highs in a dramatic recovery from its March lows.
The Dow Jones Industrial Average rose 327.69 points, or 1.18%, to 27,993.33, the S&P 500 gained 42.57 points, or 1.27%, to 3,383.54 and the Nasdaq Composite added 203.11 points, or 1.87%, to 11,056.65.
Seattle Genetics gained 14.5% after Merck & Co Inc said it would buy a $1 billion stake in the smaller drugmaker to co-develop and sell its cancer therapy.
Tesla Inc's shares rebounded 12.6% after losses last week.
Later this week, investors will focus on the Federal Reserve's last policy meeting before the Nov. 3 U.S. presidential elections.
In other deal news, Immunomedics Inc's shares surged after Gilead Sciences Inc's $21 billion buyout deal.
Advancing issues outnumbered declining ones on the NYSE by a 4.16-to-1 ratio; on Nasdaq, a 3.67-to-1 ratio favored advancers.
The S&P 500 posted 11 new 52-week highs and no new lows; the Nasdaq Composite recorded 50 new highs and 22 new lows.
Volume on U.S. exchanges was 8.72 billion shares, compared with the 9.28 billion average for the full session over the last 20 trading days.
By Caroline Valetkevitch