Corporate America has a profit problem. U.S company earnings are falling for the first time since 2009, when the economy was still reeling from the Great Recession.

The main culprit is the plunging price of oil, which has decimated earnings at big energy companies like Exxon Mobil and Chevron. Mining companies have also taken a beating because of tumbling prices for gold, silver and copper.

Earnings at energy companies dropped a staggering 59 percent in the third quarter, enough to drag overall profits for companies in the Standard & Poor's 500 index down 1.5 percent, according to estimates by S&P Capital IQ. That marks the first quarterly decline in six years. Without the drag of energy companies, overall earnings would be up 6.2 percent.

To be sure, earnings are still high by historical standards, and the U.S. economy is continuing to slowly improve. But with stock indexes near record highs, the weak earnings make many stocks vulnerable to declines. And energy companies aren't the only ones having trouble earning money, as several thorny problems continue to nettle Corporate America.

The strong dollar makes it much harder for U.S. companies to compete in overseas markets; slowing growth in other countries, especially China, means weaker exports; and in the last week several big retailers like Macy's and Best Buy have reported weak sales and poor outlooks for the holiday shopping season.

This has a contributed to a trend that concerns some even more than feeble profits: Revenue for S&P 500 companies has shrunk in all three quarters so far this year.

In the past, U.S. companies have been able push their earnings per share higher even with lower revenue by slashing costs, cutting jobs, and spending huge amounts of money, often borrowed at cheap rates, to buy back their own stock. It stopped working this quarter.

"We're at the point where we can't get any more blood out of the stone," says Kristina Hooper, U.S. investment strategist for Allianz Global Investors.

As a result, investors are going to need to be a lot more selective about what stocks they buy and not just assume that a recovering economy will mean equally good results for all good U.S. companies. For example, $1,000 invested in an index of S&P 500 energy stocks at the beginning of the year would be worth about $866 today, while the same amount in the S&P 500 index would be worth $1,015.

That's not to say, with results now in from 473 of the companies on the S&P 500 index, that the earnings news is all bad. Big profit gains at Alphabet, Google's parent company, the video game maker Activision, health care companies and consumer giants like Netflix and Amazon are helping to make up for the losses at energy and mining companies. This quarter, earnings per share for consumer discretionary companies rose 16 percent and profits for telecommunications and health care companies grew 15 percent, according to S&P Capital IQ.

But the skid in profits and sales helps explain why U.S. companies have been buying each other up at such a fast pace. Many companies have been growing by making acquisitions rather than investing in their own businesses. That has helped put corporate deals at more than $3 trillion so far this year, according to Dealogic. That's already a record for an entire year, with six weeks left to go in 2015.

The barrage of deals has helped to lift stock prices, but once the merger frenzy abates, so too could the positive effect on the stock market.

Earnings are expected to start growing again next year, partly because they won't have to soar to look better than they do this year. And analysts think the improving U.S. economy will, at some point, even help companies increase revenue.

"It ultimately should translate," Hooper said. "It's taking longer this time around."

Marley Jay can be reached at http://twitter.com/MarleyJayAP . His work can be found at http://bigstory.ap.org/journalist/marley-jay .