NEW YORK -- Stocks closed at all-time highs, finishing this year's epic rally with yet another record.

The Dow Jones industrial average rose 72.37 points, or 0.4%, to 16,576.66 on the last trading day of 2013. For the year, the index of blue-chip stocks was up 26.5% -- its best performance since 1995.

The broader Standard & Poor's 500 index did even better. The S&P 500 index gained 7.29 points, or 0.4%, to 1,848.36 on New Year's Eve. For the year, it was up about 30%.

The tech-focused Nasdaq composite index rose 22.39, or 0.5% on Tuesday, to 4,176.59. The index gained about 38% for the entire year.

QUIZ: How much do you know about the stock market?

The Dow notched record after record this year, blowing past 14,000 for the first time in February. The index of blue-chip stocks smashed 15,000 in May, 16,000 in November. Tuesday's new record closing high marked its 52nd for the year.

The year’s rally was fueled partly by the Fed’s monumental stimulus program, known as quantitative easing.

The central bank announced this month that it would begin gradually scaling back its $85 billion in monthly bond purchases that have kept interest rates low but have sent investors clamoring for returns in riskier vehicles such as stocks.

“We’ve had a government shutdown and debt-ceiling debate that brought us to the edge of default and the stock market didn’t care,” said Jack Ablin, chief investment officer at BMO Private Bank. “For the most part, Wall Street shrugged it off."

ALSO:

Consumer confidence rebounds strongly in December

Home price increases slow in October, key gauge says

Stocks post early gains on last trading day of huge year