By Barbara Kollmeyer, MarketWatch , Ryan Vlastelica

9 of 11 S&P 500 sectors rise

U.S. stocks rose in a thinly traded session on Tuesday, with the Nasdaq hitting its latest in a series of records as the market's recent upward bias continued, helped by a gain in technology shares.

The 20,000 milestone, meanwhile, remained elusive for the Dow Jones Industrial Average, which came within 20 points of the psychologically important level only to give up most of the day's gains.

Read: Dow's 20,000 dalliance is a reminder that it's the best active fund ever fashioned (

Overall, stocks saw a broad but slight advance, with all but two of the S&P 500's 11 primary sectors higher on the day. Retail stocks were in focus as investors looked to the first reads on the strength of the holiday shopping season.

"We'll probably drift higher to finish the year, because that's typical from a historic basis," said Wayne Kaufman, chief market analyst at Phoenix Financial Services. "We're getting ready for 2017, waiting to see if there will be any kind of unwind in the 'Trump rally' because a lot of anticipation has been built into stock prices and it may be too much."

Also read:In One Chart: Stock-market inflows may have lot further to run (

Total composite volume, which includes New York Stock Exchange, Nasdaq,NYSE MKT and NYSA Arca composite volumes, was 4.081 billion shares--the second-lowest for a full-day trading session this year, according to final numbers.

The final trading week of the year is typically a quiet one, with light trading and few planned news events--such as central bank announcements or corporate earnings--to dictate market direction. Many traders were out of the office following the Christmas holiday, for which the equity market was closed on Monday, while others are waiting for the new year to make big portfolio changes.

Some investors may be looking to take profits given the sharp rally that occurred following the U.S. presidential election. The Dow is up almost 9% since the election, bringing its year-to-date gain to 14.5%. The blue-chip average has come within 0.1% of the psychologically significant level of 20,000, but has been unable to overcome the final hurdle. The Dow is coming off its seventh straight weekly gain.

See:What Dow 20,000 means for stock-market investors (

The S&P 500 is up about 6% since the election, and it is up 11% for the year, while the Nasdaq Composite has gained 9.6%, driven by a postelection rise of more than 5%. Small-cap stocks have been particular outperformers; the Russell 2000 is up 21.4% in 2016, with nearly 15% of that rise occurring since the election.

The Dow Jones Industrial Average rose 0.1%, or 11.23 points, to end at 19,945.04, while the S&P 500 advanced 5.09 points, or 0.2%, to 2,268.88 and the Nasdaq Composite Index added 24.75 points to settle at 5,487.44, a gain of 0.5%. In addition to ending at a record close, the Nasdaq also struck a new intraday record of 5,512.37.

The Nasdaq was boosted by a rise in technology shares; the sector rose 0.5% on the day, the best performer among S&P 500 industries. Nvidia Corp.(NVDA) rose 6.9%, ending at a record.

Read: Growing signs that the Dow might not make it to 20,000 by the end of 2016 (

In the latest economic data, the S&P Case-Shiller index ( of home prices climbed 0.6% in October and was up 5.1% in the past year, unchanged from the prior month. Consumer confidence in December jumped to 113.7 from a revised 109.4 in November, hitting its highest level since 2001 (

Opinion: What this week's stock market will tell you about 2017 (

( Tuesday's biggest movers, retailers Inc.(AMZN) and Wal-Mart Stores Inc.(WMT) were in focus amid postholiday Christmas shopping ( as the first. The SPDR S&P Retail ETF(XRT) rose 1% on Tuesday, while the Amplify Online Retail ETF(IBUY)--which only holds companies that get a majority of their sales from online purchases--rose 0.7%.

Amazon shares rose 1.4% while Wal-Mart edged 0.2% higher.

Across other markets, Asian stocks had a largely lackluster session (, while European equities traded mostly flat ( London markets remain closed for an extended Christmasbreak.

Opinion:New Year's Resolutions: What money pros vow to do better in 2017 (

Crude prices posted gains ( of 1.6%, while gold and silver prices moved higher. The dollar inched up against major rivals (

(END) Dow Jones Newswires

December 27, 2016 16:57 ET (21:57 GMT)

Copyright (c) 2016 Dow Jones & Company, Inc.