Signs of more corporate dealmaking sent U.S. stocks higher on Tuesday, allowing investors to take their mind off Greece's debt troubles.
Investors were also looking ahead to Wednesday's economic and interest rate policy update from the Federal Reserve. They'll be looking for hints as to when the central bank will begin raising its key interest rate after holding it close to zero for more than six years.
Many economists expect the central bank will raise its rate in September if the economy keeps strengthening. Ultra-low rates have helped drive the six-year bull market. Stocks have managed only small gains this year, as investors have obsessed about the outlook for interest rates.
"The sooner they define it and actually do it, the better off for the market," said JJ Kinahan, TD Ameritrade's chief strategist. "The market just wants something tangible to trade on, and between the Fed and Greece we're getting neither."
The Dow Jones industrial average gained 113.31 points, or 0.6 percent, to 17,904.48. The Standard & Poor's 500 index rose 11.86 points, or 0.6 percent, to 2,096.29. The Nasdaq composite rose 25.58 points, or 0.5 percent, to 5,055.55.
All 10 sectors in the S&P 500 index moved higher, with consumer staples leading the gains. The sector rose 1.1 percent, but remains down 1.4 percent this year.
Aetna rose 3.3 percent after The Wall Street Journal reported that UnitedHealth Group approached the rival health insurer about a deal. Aetna added $3.96 to $124.97. UnitedHealth Group gained $2.57, or 2.2 percent, to $121.55.
Perrigo climbed gained $7.95, or 4.3 percent, to $191.25 as traders anticipated that it may be acquired by a rival. Mylan, a maker of generic drugs, has said it wants to buy the company, but is being targeted itself by Teva Pharmaceuticals.
On Tuesday, Abbott Laboratories, Mylan's biggest shareholder, said that it backed Mylan's plan to remain a stand-alone company. Teva has made a $40 billion bid for Mylan, but wants that company to drop its pursuit of Perrigo.
Coty surged 19.3 percent on news reports that the cosmetics and fragrance company has won an auction to buy several Procter & Gamble businesses. Coty gained $5.03 to $31.08.
News that U.S. homebuilders broke ground on fewer homes last month sent shares in homebuilders lower. Meritage Homes fell the most, losing 59 cents, or 1.3 percent, to $43.58.
European stocks were mixed. France's CAC 40 rose 0.5 percent, while Germany's DAX added 0.5 percent. Britain's FTSE 100 was flat. Greece's main stock index sank 4.8 percent.
In energy trading, benchmark U.S. crude rose 45 cents to close at $59.97 a barrel in New York. Brent crude for August delivery, a benchmark for international oil used by many U.S. refineries, fell 25 cents to close at $63.70 a barrel in London. The Brent contract for July delivery expired Monday at $62.61.
In other futures trading, wholesale gasoline rose 2.6 cents to close at $2.125 a gallon, while heating oil rose 1.5 cents to close at $1.885 a gallon. Natural gas fell 0.5 cent to close at $2.894 per 1,000 cubic feet.
In precious metals trading, gold dropped $4.90 to $1,180 an ounce. Silver fell 11.8 cents to $15.97 an ounce. Copper slipped 3 cents to $2.62 a pound.
Bond prices rose. The yield on the 10-year Treasury note edged down to 2.31 percent from 2.36 percent late Monday.