NEW YORK -- Corporate deals and some solid earnings reports propelled the stock market to its sixth straight gain Tuesday.
Allergan surged after Valeant Pharmaceuticals said it had teamed up with activist investor Bill Ackman to make a bid for the Botox maker. Netflix and Harley-Davidson rose sharply after reporting earnings that beat analyst's expectations.
Stocks are rebounding from a slump earlier this month when investors dumped high-flying biotechnology and Internet stocks. The gains over the past week have been driven by a combination of better economic news and respectable, if not spectacular, earnings reports.
"We were definitely oversold, there's no question about that," said Phil Orlando, chief equity strategist at Federated Investors. "Earnings, by and large, haven't been worse than we thought and the economic news has actually been a little better."
The Standard & Poor's 500 index rose 7.66 points, or 0.4 percent, to 1,879.55. The six consecutive gains in the index marks the longest winning streak since September.
The Dow Jones industrial average climbed 65.12 points, or 0.4 percent, to 16,514.37. The Nasdaq composite gained 39.91 points, or 1 percent, to 4,161.46.
Allergan rose the most in the S&P 500, climbing $21.65, or 15.2 percent, to $163.65. Health care stocks rose 1.04 percent, the biggest gain of the 10 sectors that make up the S&P 500 index.
There was also deal news in the health care industry from Europe. Swiss pharmaceutical maker Novartis AG unveiled a series of multibillion-dollar deals with Britain's GlaxoSmithKline PLC and the U.S.'s Eli Lilly & Co.
The announcements helped drive some speculative buying.
"Whenever there are mergers, people start looking for other potential merger candidates," said John Carey, a portfolio manager at Pioneer Investments. "So it usually drives some other stocks up."
Overall, first-quarter earnings at S&P 500 companies are expected to fall 0.8 percent in the first quarter compared with the same period a year earlier, and growth of almost 8 percent in the fourth quarter, according to S&P Capital IQ data.
While that would be the first decline in earnings since the third quarter of 2009, analysts had been expecting worse. So far, about 65 percent of companies that have reported their earnings have exceeded analysts' forecasts.
"It is a familiar dance," said Federated's Orlando. "Managements have gotten very adept at doing this: lowering the bar and essentially engineering a modest positive surprise."
The consumer discretionary sector had the second-biggest gain Tuesday after some good earnings reports.
Harley-Davidson jumped $4.33, or 6.4 percent, to $71.87 after reporting that its first-quarter earnings rose nearly 19 percent. Motorcycle sales grew 5.8 percent worldwide and efficiency efforts took hold.
Netflix climbed $24.41, or 7 percent, to $372.90 after the online video streaming service said late Monday that its first-quarter earnings soared. Another season of the popular political drama "House of Cards" helped attract an additional 2.25 million subscribers.
Investors even found something to like in a weak report on home sales.
Sales of existing U.S. homes slipped in March to their lowest level since July 2012 as rising prices and a tight supply of available homes discouraged many would-be buyers. The National Association of Realtors says sales edged down 0.2 percent to a seasonally adjusted annual rate of 4.59 million.
While it was the seventh drop in the past eight months, the decline was less than economists had forecast.
In government bond trading, prices were little changed. The yield on the 10-year Treasury note was unchanged at 2.72 percent from late Monday.
Among other stocks making big moves:
• Facebook rose $1.79, or 2.9 percent, to $63.03. Analysts at Credit Suisse raised their target price for the stock because they believe that the social media company will be able to boost its revenue with new services.
• Pentair slumped $5.53, or 6.9 percent, to $74.95 after the flow-control company posted an unexpected decline in revenue. Pentair's revenue fell 3 percent and revenue at its largest division, valves and controls, dropped 9 percent compared to last year. Pentair said weaker sales to the energy industry were the main reason for that decline.
• Omnicom fell $1.62, or 2.3 percent, to $69.87 after the advertising company's CEO said that the timing of a proposed $35 billion merger with France's Publicis Groupe SA remains unclear nine months after the deal was announced.