U.S. stocks on Tuesday closed 2013 at records, with the S&P 500 posting its largest annual jump in 16 years and the Dow its biggest gain in 18, after positive reports on consumer confidence and housing boosted sentiment on the final trading day of the year. "It's been a great year, if you look at it from what the prevailing sentiment was at the beginning of the year, it has surpassed even the most bullish of predictions. It's the type of year you want to savor, there's been a nice wealth effect that has warmed people's portfolios," said Matthew Kaufler, portfolio manager at Federated Investors. "Between the rise in the markets as well as the rebound in housing prices, this year went a long way in repairing consumer balance sheets," he added. (Read more: ) Hertz Global Holdings rose a day after the car-rental company said it had adopted a one-year shareholder rights plan after "unusual and substantial activity" in its shares. gained after saying Berkshire Hathaway would exchange about $1.4 billion in shares to acquire a unit that produces chemicals to improve pipeline flow. Marvell Technology Group surged after private-equity firm KKR & Co. said in a regulatory filing that it held a 6.8 percent stake in the chip manufacturer.

Major U.S. Indexes

Up 26.5 percent for the year, the Dow Jones Industrial Average finished the year at another closing high, its 52nd for 2013. It rose 72.37 points, or 0.4 percent, to 16,576.66.

led blue-chip gains, which extended to 23 of its 30 components. Tallying its fourth monthly advance, and up 29.6 percent for the year, the also advanced to an all-time finish, with energy the best performing and telecommunications the hardest hit among its 10 major sectors. It gained 7.29 points, or 0.4 percent, to 1,848.36. (Read more: ) For the year, consumer discretionary gained the most, followed by health care, with telecommunications and utilities performing most poorly. The Nasdaq rose 22.39 points, or 0.5 percent, to 4,176.59, a yearly advance of 38.2 percent, and its best year since 2009. For every stock falling, nearly two gained on the New York Stock Exchange, where 568 million shares traded. Composite volume surpassed 2.3 billion.

The 10-year Treasury note yield used in determining mortgage rates and other consumer loans rose 6 basis points to 3.036 percent, its highest of the year and since July 2011. The dollar edged higher against the currencies of major U.S. trading partners. (Read more: ) On the New York Mercantile Exchange, oil futures fell 87 cents, or 0.9 percent, to $98.42 a barrel, while gold futures settled 28 percent lower for 2013 at $1,202.30 an ounce, its largest annual fall in 32 years. Stocks furthered their advance after the Conference Board's index of to 78.1 in December from 72 in November. Analysts expected a December reading of 76. Ahead of Wall Street's open, stock futures retained modest gains after a report had home prices in 20 U.S. cities climbing in October from the year earlier, illustrating the bounce back in real estate will continue in the new year. The S&P/Case-Shiller home price index in October from the year earlier period. Stocks offered little to no reaction to the Institute of Supply Management's Chicago purchasing manager's index, which fell to 59.1 in December from 63. On Monday, stocks finished little changed. "Going forward, I would say I am optimistic on equities but valuations are essentially fair, so I don't know that we are going to tack on another 20 to 30 percent in 2014, my expectation would be 8 to 10 percent. Just because the economy is picking up and tapering has begun doesn't mean the markets are going to perform accordingly," said Kaufler.