Encouraging U.S. economic data and a batch of corporate deals put investors in a buying mood Monday, sending stocks sharply higher.
The broad rally nudged the Dow Jones industrial average back into positive territory for the year after a rough stretch for the market most of last week.
Traders welcomed a government report showing that consumer spending and incomes rose in February. Another report hinted at a strong start to the spring buying season.
Energy stocks were among the biggest gainers, bucking a slide in the price of crude oil. Several drugmakers soared on merger news.
The Dow rose 263.65 points, or 1.49 percent, to 17,976.31. The 30-company index was up as much as 295 points. It's now up 0.9 percent for the year.
The Standard & Poor's 500 index rose 25.22 points, or 1.22 percent, to 2,086.24, while the Nasdaq composite gained 56.22 points, or 1.15 percent, to 4,947.44. Both indexes are also up for the year.
The government said that consumer spending edged up 0.1 percent in February following two straight monthly declines, while consumers' incomes rose a solid 0.4 percent. The National Association of Realtors reported that its index of pending home sales rose to its highest level since June 2013.
Expectations that any increase in the Federal Reserve's key interest rate this year will be gradual also helped lift the market. On Friday, Federal Reserve Chair Janet Yellen said in a speech that continued improvement in the U.S. economy means an increase in the Fed's key interest rate could come this year, but would likely be gradual.
All told, the 10 sectors in the S&P 500 rose, with energy stocks notching the biggest gain. The sector rose 2.1 percent. It's still down 2.7 percent for the year. Analog Devices led all stocks in the S&P 500, climbing $5.97, or 10.2 percent, to $64.81.
The price of oil fell slightly ahead of Tuesday's deadline for negotiators to reach a general agreement to curb Iran's nuclear program in exchange for an easing of sanctions. If it appears that more Iranian crude could eventually come on the market, prices could fall. U.S. oil fell 19 cents to $48.68 a barrel. Brent crude, a benchmark for many international oils imported by U.S. refineries, slipped 12 cents to $56.29 a barrel. In other futures trading, natural gas rose 0.5 cent to $2.644 per 1,000 cubic feet
Precious and industrial metals futures closed mixed. Gold fell $15 to $1,184.80 an ounce, silver fell 40 cents to $16.67 an ounce and copper edged up a penny to $2.78 a pound.
U.S. government bond prices rose. The yield on the 10-year Treasury note edged down to 1.96 percent from 1.97 percent late Friday.