Editors' pick: Originally published Dec. 30.

Despite stocks moving mostly lower on the last day of the year, the Dow closed with a double-digit annual increase, its best in three years. All three indices closed 2016 with gains.

The S&P 500 was down 0.46%, the Dow Jones Industrial Average was 0.29% lower, and the Nasdaq was 0.90% lower.

For the year the Dow closed up 13.5%, a double-digit percentage gain which has happened only four times in the last 10 years and is the highest increase since 2013. The Dow was on track earlier in December to hit the 20,000 milestone but retreated after hitting a record high of 19,988 on Dec. 20.

The S&P 500 closed with a gain of 9.4% for the year, moving away the double-digit percentage gain, which would have been the sixth in the last decade. The Nasdaq finished the year with a gain of 7.5%.

Although, trading volumes are light, the information technology sector was dragging markets down, falling 1% on Friday. Goldman Sachs (GS) led the Dow, adding 0.4%, while Apple (AAPL) , Microsoft (MSFT) and Intel (INTC)  all fell, dragging it lower.

Of the 11 S&P 500 sectors, the top gainer for the year was energy, up 23.4%. Financials jumped 19.1% and telecommunications services increased 17.1%. The health care sector was down 4.2% and the real estate sector fell almost 1%.

"U.S. equities are ending 2016 in a reasonably good position," Terry Sandven, chief equity strategist at U.S. Bank Wealth Management, wrote in an email. "Prices have been remarkably resilient throughout the year, overcoming early-year weakness and ongoing uncertainty to end the year near all-time highs; the U.S. economy appears to be in a Goldilocks zone; and earnings are on the cusp of increasing."

If you liked this article you might like

Kraft Heinz's New CFO Is Just 29

China's Banks Halt Business With North Korea Per United Nations Sanctions

Why Hurricanes Won't Force the Fed to Ditch a December Rate Hike

Fed Pares $4.5 Trillion Balance Sheet But Easy-Money Era Isn't Over

Bank Stocks Move Higher as Fed Decides to Start Unwinding Balance Sheet