The new year couldn't come soon enough for many investors.

U.S. markets finished 2015 mostly in the red: The Dow was down 2.2%. The S&P 500 ended the year down 0.7%. It was the worst year for those two indexes since markets collapsed in 2008.

The Nasdaq finished 2015 up 5.7%. However, it had double digit gains in the three years prior.

Volatility thrashed investors left and right in 2015. The three big concerns this year were falling oil prices, China's economic slowdown and the seemingly never ending speculation about when the Federal Reserve would raise interest rates.

Greece's debt crisis, the European Central Bank's stimulus plan and fears of a broader slowdown in emerging markets kept investors on their toes too.

It was a good year for investors on opposite sides of the spectrum. Investors who put extra cash on the sidelines avoided all the negative returns in stocks and bonds. Bank of America declared that "cash is king" in 2015 in a research note in September.

But investors who were bullish on certain tech stocks are ending the year way up. Stocks for Amazon (AMZN) and Netflix (NFLX) both soared over 115%. Google (GOOG) and Expedia (EXPE) each finished 2015 up over 45%. Facebook gained 34%.

The best performing sector was consumer discretionary stocks, which consist of companies like Starbucks (SBUX) and Home Depot (HD). Both of those companies had strong years.

Related: 70% of investors lost money in 2015

Outside of a select few though, many stocks tumbled. Energy stocks got crushed the worst. The biggest losers were Chesapeake Energy (CHK), CONSOL Energy (CNX) and Southwestern Energy (SWN). Each fell about 75%.

Utility companies, building material firms and big banks also will finish the year down.

Oil prices fell at a faster pace in 2014 but continued to decline in 2015. Oil hit a seven-year low in December, falling below $35 a barrel due to a global oversupply. Its unclear when supply will stop overflowing. Members of the oil cartel OPEC haven't agreed on production levels and Saudi Arabia refuses to ease up on pumping oil.

If oil's crash didn't make investors fret, the Federal Reserve did. All year, the market speculated when the Fed would finally raise its key interest rate. Higher interest rates sometimes hurt stocks because they raise the cost of borrowing money.

Speculation built up heading into the Fed's meetings in June, September and December. Finally, the Fed did an expected yet small rate hike, 25 basis points (0.25%), on December 16. It was the first rate increase in nearly a decade.

One thing holding back the Fed all year was the slowdown in China's economy and its ripple effect sent across emerging markets. China is on pace to grow 6.8% this year, its slowest pace since the financial crisis. That's a far cry from its 10% growth in 2010.

Those major headwinds are expected to abate a bit in 2016. But if this year taught investors anything, it's that markets continue to be unpredictable.