NEW YORK (AP) -- U.S. stocks made their biggest gain since March on Tuesday as technology companies like Apple and Microsoft soared. Homebuilders also climbed after the government said sales of new homes reached an eight-year high last month. That was a sign the housing market and the broader economy are still in pretty good shape.
Stocks opened higher following hefty gains in Europe. Tech stocks made their biggest gain in almost three months, which erased their losses from earlier this year. Banks rose as interest rates continued to inch higher, which lets banks make more money on lending. Stocks have alternated between gains and losses in recent days following a four-week-long string of losses.
"A little bit of good data has reminded people that things are actually OK," said David Lefkowitz, senior equity strategist at UBS Wealth Management. "It's almost like a rubber band. When things get too stretched they snap back."
The Dow Jones industrial average rose 213.12 points, or 1.2 percent, to 17,706.05. The Standard & Poor's 500 index picked up 28.02 points, or 1.4 percent, to 2,076.06. The Nasdaq composite index surged 95.27 points, or 2 percent, to 4,861.06.
Tech stocks led the market higher with their biggest jump since March 1. Apple picked up $1.47, or 1.5 percent, to $97.90 and Alphabet, Google's parent company, added $15.78, or 2.2 percent, to $733.03. Microsoft rose $1.56, or 3.1 percent, to $51.59.
Home building stocks jumped after the Commerce Department said sales of new homes reached their highest level since January 2008. Sales of both newly-built and previously-occupied homes grew as job gains and low mortgage rates encourage Americans to keep buying homes. Toll Brothers also reported better first-quarter results than analysts expected, and the company raised its annual projections for home prices and sales. The stock gained $2.36, or 8.7 percent, to $29.46.
Beazer Homes USA added 66 cents, or 9.2 percent, to $7.86 and PulteGroup rose 91 cents, or 5.1 percent, to $18.73.
Bond prices fell. The yield on the 10-year U.S. Treasury note rose to 1.86 percent from 1.84 percent. When interest rates go up, as they have been doing recently, banks can make more money from lending. JPMorgan Chase climbed $1.08, or 1.7 percent, to $64.54 and Bank of America gained 21 cents, or 1.6 percent, to $14.68.
Agribusiness giant Monsanto rejected an offer from German conglomerate Bayer worth $62 billion, or $122 per share. However Monsanto said it's open to talks with Bayer about a possible sale. As investors hoped for a richer offer, Monsanto stock rose $3.30, or 3.1 percent, to $109.30.
Streaming video company Netflix jumped after it said it struck deal with Disney. Starting in September, Netflix will have exclusive U.S. rights to new movies from Disney, Marvel, Lucasfilm and Pixar. Netflix stock jumped $3, or 3.2 percent, to $97.89.
Fertilizer maker CF Industries ended a deal to buy OCI's distribution networks for about $8 billion. CF planned to reincorporate in the U.K. as part of the deal, which would have reduced its tax bill, but the company said new Treasury Department rules made the combination less appealing. CF Industries will pay OCI $150 million for calling off the deal. CF Industries shed $2.24, or 7.5 percent, to $27.61.
Oil is trading at its highest price since early October, and benchmark U.S. crude picked up 54 cents, or 1.1 percent, to $48.62 a barrel in New York. Brent crude, used to price international oils, rose 26 cents, or 0.5 percent, to $48.61 a barrel in London.
Retailers continued to struggle. Electronics chain Best Buy said its quarterly sales kept falling and its outlook was weak. That made Best Buy the latest retailer to disclose disappointing quarterly results. Its stock lost $2.45, or 7.4 percent, to $30.55.
Shoe and accessories retailer DSW cut its outlook, saying it expects weaker sales this year. That came after the company reported disappointing results for its first fiscal quarter. The stock gave up $2.53, or 11.6 percent, to $19.20.
Athletic apparel maker Under Armour rose after it announced a deal with UCLA worth $280 million over 15 years. The stock jumped 95 cents, or 2.5 percent, to $38.22.
Twitter announced a series of format changes that make its 140-character limit a bit more flexible. While that might make Twitter more appealing to new users, Twitter did not abolish that limit entirely, as some had expected. Already trading around all-time lows, the stock declined 38 cents, or 2.6 percent, to $14.03.
France's CAC 40 added 2.5 percent while Germany's DAX gained 2.2 percent. In Britain the FTSE 100 rose 1.3 percent. Japan's benchmark Nikkei 225 fell 0.9 percent as the yen continued to strengthen, hurting Japanese exporters. South Korea's Kospi edged down 0.9 percent. Hong Kong's Hang Seng rose 0.1 percent.
In other energy trading, wholesale gasoline gained 1 cent to $1.65 a gallon. Heating oil rose 1 cent to $1.49 a gallon. Natural gas fell 8 cents to $1.98 per 1,000 cubic feet.
Gold fell $22.30, or 1.8 percent, to $1,229.20 an ounce. Silver slid 17 cents, or 1 percent, to $16.25 an ounce. Copper was unchanged at $2.07 a pound.
The dollar rose to 109.98 yen from 109.19 yen. The euro slipped to $1.1143 from $1.1221.