The first-quarter earnings season is almost over, and it's one most investors would like to forget. But by far the most notable feature: The energy sector has recorded its first year-over-year quarterly loss in the 17 years that Standard and Poor's has tracked data for the sector.

Overall, S&P energy companies have reported an average decline of 35 cents per share, down nearly 107 percent from the same quarter last year, according to S&P Global Market Intelligence. 

Remove energy stocks from the equation, and the season is still in negative territory, with an average decline in growth of 1.24 percent thanks to high single-digit and low double-digit slowdowns in basic materials, which includes things like metals, chemicals and paper products; and financial services, which have been harmed by record-low borrowing rates.

The main cause of the red ink on company earnings has been a brutal combination of a global slowdown in emerging markets, an ongoing glut in commodities prices, sluggishness in China and a strong U.S. dollar that eats into corporate profits earned in other currencies. The strength of consumer discretionary spending — and the companies that cater to it — has been a major reason why earnings aren’t even worse this season. In short, the American consumers’ purchases of clothing, homes, cars, gadgets and other discretionary goods are the main thing lifting corporate earnings right now. 

Nine out of 10 S&P 500 companies reported their first-quarter earnings as of Tuesday; and so far, earnings growth has shrunk by nearly 6 percent overall to an average of $26.81 per share for all 500 companies. Only consumer discretionary stocks — which includes everything from auto parts to movie tickets — healthcare companies and telecoms are showing growth compared to the last quarter in 2015.

The first-quarter corporate earnings season has been largely characterized as a season of low expectations, with companies across sectors having reduced their earnings forecasts for 2016 toward the end of last year in order to wow Wall Street. With more than one-fourth of S&P 500 companies having lowered their share count in the first quarter by at least 4 percent amid a record level of buybacks, some of the earnings growth this year isn’t growth at all.