A breakdown of the S&P 500's sectors in 2015
Health care stocks rose thanks to gains in drug companies, such as the eye drug maker Regeneron, and wheeling and dealing from Allergan.
Video game makers Activision Blizzard and Electronic Arts surged, while Google parent Alphabet and chip designer Nvidia also made significant gains.
Even though shares of Wal-Mart had their worst year in four decades, consumer staple stocks edged higher on gains from Spam maker Hormel, Monster Beverage and Corona distributor Constellation Brands.
Shares of Frontier Communications and CenturyLink tumbled this year, countering a small gain from telecom giant AT&T and a 10-percent jump for Level 3 Communications.
Financial stocks slipped as losses from Goldman Sachs, Berkshire Hathaway and student loan processor Navient canceled out gains from data center operator Equinix and storage company Public Storage.
Engine maker Cummins, railroad operator Union Pacific, machinery maker Caterpillar and truck maker Paccar all pulled the sector lower.
With worldwide oil supplies building up and demand slumping, the price of oil hit its lowest levels since early 2009 and natural gas fell to its lowest prices since 1999.