Trader William McInerney, center, works at the New York Stock...

Trader William McInerney, center, works at the New York Stock Exchange, Wednesday, Dec. 27, 2017. Credit: AP / Mark Lennihan

Wall Street capped 2017 with a loss, weighed down by a broad slide in light trading ahead of the New Year’s holiday.

Technology companies, banks and health care stocks accounted for much of the market’s decline. Energy stocks also fell, even as the price of U.S. crude oil surged to its highest level in more than two years.

Despite the downbeat end to the week, the U.S. stock market finished 2017 with its strongest year since 2013.

The Standard & Poor’s 500 index, the broadest measure of the stock market, gained 19.4 percent for the year, more than double its gain in 2016. Including dividends, the total return was 22.5 percent, as of late Thursday.

The Dow Jones industrial average ended the year with a 25.1 percent gain, setting 71 all-time highs along the way. The Nasdaq composite notched the biggest gain, an increase of 28.2 percent, while the Russell 2000 index of smaller-company stocks closed out 2017 with a gain of 13.1 percent.

“It’s been the year that surprised everybody,” said J.J. Kinahan, chief market strategist at TD Ameritrade. “It was truly buy-on-the-dip, and that paid off better than anyone possibly expected.”

Friday’s slide pulled the market lower for the week.

The S&P 500 ended the day down 13.93 points, or 0.5 percent, to 2,673.61. The Dow dropped 118.29 points, or 0.5 percent, to 24,719.22. The Nasdaq fell 46.77 points, or 0.7 percent, to 6,903.39.

Latest Videos

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME