The Nasdaq reached a record high at Tuesday's close, but rising consumer confidence and positive housing-market data weren't enough to push the Dow Jones Industrial Average to 20,000.

The Dow retreated from its intraday high by the end of regular trading in New York, gaining 0.06%, while the S&P 500 added 0.23% and technology stocks pushed the Nasdaq up 0.48% to 5,487. 

The S&P Corelogic Case-Shiller 20-city home price index for October gained 0.6% from the prior month and 5.1% from a year ago, showing an improvement in the residential housing market. Housing stocks gained, with Toll Brothers (TOL - Get Report)  rising 1.8% and D.R. Horton (DHI - Get Report)  gaining 1.3%, following the news.

The consumer confidence index for December, meanwhile, jumped to 113.7 from 109.4, after a significant increase following the presidential election in November. The December data marks the highest confidence level since 2001.

The Dow is being watched closely as it nears 20,000 after hitting an intraday high of 19,980 on Tuesday. The index of 30 blue-chip stocks crossed 19,000 on Nov. 22 and later surged to within 15 points of the next milestone before retreating.

"Since the election, there has been a strong rotation in leadership in the large cap domestic space, which has benefited the Dow Jones Industrial Average more than broader measures like the S&P 500," Bill Northey, chief investment officer at U.S. Bank's Private Client Group, said in an e-mail. "The 20,000 level is neither fundamentally nor technically significant, but reaching market milestones can excite market participants and create further short-term interest, particularly for retail investors."

Crude oil prices were up, benefiting from an agreement by the Organization of Petroleum Exporting Countries to decrease global oil supplies.

West Texas Intermediate crude oil rose 1.68% to $53.91 a barrel on Tuesday. Brent crude, the global benchmark, traded at $56.09, up 1.7%.

In other markets, Italy's oldest bank, Monte dei Paschi di Siena, confirmed it would need a bailout of €8.8 billion ($9.2 billion), based on an assessment by the European Central Bank. The ECB said that Monte dei Paschi remains solvent, and its capital reserves are larger than previously estimated.

Tesla Motors (TSLA - Get Report) and Panasonic said in a joint statement that they would work together on the construction of a Gigafactory, a large-scale battery manufacturing plant in the U.S. Panasonic will spend 30 billion yen ($256 million) on the New York state cylindrical lithium-ion cell facility, which both companies said will employ 6,500 workers by 2020. Shares of Tesla gained 2.9% to $219.50.

Amazon (AMZN - Get Report) shares rose 1.4% to $771.46 as investors evaluate the retail giant's performance during the Christmas sales season. During the holidays, the company said that it shipped more than 1 billion products and the season marked its best year for Amazon devices such as the Echo Dot.

Biogen (BIIB - Get Report) moved higher following the FDA's approval of Spinraza, a treatment for spinal muscular atrophy developed by Ionis Pharmaceuticals (IONS - Get Report) . Shipments of the medication will be made available to health-care providers within one week, the company said. Biogen's stock rose 1.2% to $290.86, while Ionis increased 3.2% to $55.10.

Pharmacy chain Fred's (FRED - Get Report) traded lower after Alden Global Capital, a hedge fund investor, took 25% ownership and the company said it was adopting a shareholder rights plan. Fred's surged more than 75% last week after agreeing to purchase 865 Rite Aid (RAD - Get Report) stores and other assets for $950 million in cash. Fred's fell 3% to $19.62 on Tuesday.

Fitbit's (FIT - Get Report) app is right behind Nintendo's (NTDOY) Super Mario Brothers, a positive sign for its holiday sales. Shares of Fitbit were up 7.5% to $7.84.

Seattle Genetics (SGEN - Get Report) slid 15.4% on Tuesday after the FDA placed the company's cancer-drug trial on a clinical hold following the deaths of four patients while they were being treated.

Endologix (ELGX - Get Report) fell 26.7% to $5.27 when the aortic disorder-treatment developer said that it would temporarily suspend shipments of AFX, one of its best-selling devices, to investigate a manufacturing issue with certain sizes.

"We believe we will be able to lift the hold on some sizes in the near future, with the timing for the remaining sizes dependent on the outcome of our investigation," John McDermott, Endologix CEO, said in a statement.

Toshiba shares fell after the company reported that it will have to record a loss of billions of dollars for its U.S. nuclear power acquisition, Reuters reported. The Japanese company has struggled with an accounting scandal and previous nuclear business losses.