Corporate America's earnings season was ugly.

In the last three months of 2015, earnings declined 4% at the largest 500 publicly-traded companies compared to a year ago. It was the largest drop since 2009, according to Bank of America Merrill Lynch research.

Energy companies accounted for much of the decline as oil prices have continued to fall. Earnings growth for energy firms slowed by 75% in the fourth quarter. Excluding energy, earnings increased a tiny bit, 1.7%.

Sales didn't fare much better. Sales at S&P 500 companies fell 2.5% on the year.

Related: Market mayhem: central banks may be fueling the fire

Still, the low growth outside of energy reflects how much America's biggest companies, such as Apple (AAPL), are hurt by weak global demand and the strong dollar. When the dollar gains in value, it makes companies' products, more expensive, and less attractive, to foreign buyers.

The decline in earnings growth doesn't mean companies aren't making a pretty penny. Apple still posted a record profit in its fourth quarter. But CEO Tim Cook warned that iPhone sales could start to decline this year, hurt by its sales from overseas.

Those weak earnings hurt stocks in recent weeks while volatility and fear gripped markets too. The Nasdaq is down about 10% so far this year while the Dow and S&P 500 have each lost more than 5.5% over the same time.