S&P 500 companies are on track to be more profitable than they have been in over a decade, boosted by layoffs, lower commodity prices and continued pricing power.

The index’s average net income margin is projected to surpass 13% in the second half of the year, according to analyst estimates compiled by Bloomberg Intelligence, and then continue to rise into next year to almost the best on record since 2009.

“For a while now, people have been making calls that profit margins will get squeezed and we haven’t seen that,” said Greg Taylor, chief investment officer at Purpose Investments, which has over $15 billion of assets under management. “The consumer has stayed healthy and they were able to push through price increases,” he added.

Firms have largely opted not to pass on savings from falling commodity costs. To further lower expenses, many are also cutting their workforce and turning to artificial intelligence.

“We’re still at early innings of AI, and AI increasing productivity,” said UBS private wealth management managing director Rod von Lipsey.

Tech companies have outstripped the broader index in terms of profitability — the so-called Magnificent Seven companies enjoyed an average profit margin of 24% in the first quarter, double the S&P 500’s 12% average. Apple Inc. and Amazon.com Inc. have undertaken significant headcount reductions in recent months, reversing years of aggressive hiring.

The sector’s margin bonanza has spurred the likes of Alphabet Inc. and Meta Platforms Inc. to issue their first dividend payouts.

Now that Big Tech has shown it can run lean and reap fatter margins, other companies may be pressured to follow suit, Ned Davis Research Chief US Strategist Ed Clissold said.

Aggressive cost cutting has already resulted in more firms reporting profitability above expectations than any time in at least the last two years. Among 481 S&P 500 companies that have reported this quarter, 72% posted net income margins that came in above analyst estimates.

The extra cash is being redeployed to buying back shares. S&P 500 firms have announced stock repurchases at the highest rate in almost two years, according to data compiled by Bloomberg. Completed buybacks are up 16% in the first quarter from the same period a year ago, according to Birinyi Associates Inc.

Shareholders have responded by piling trillions into US equities, sending the S&P 500 about 28% higher since its late-October low.

Still, expectations of continued margin strength may be too optimistic, particularly for companies that are more exposed to price fluctuations in raw materials. The Bloomberg Commodity Index, which aggregates prices of commodities such as grains and industrial metal, has been creeping up since mid February.

Consumers could also pull back on spending as they fret over inflation and a softening jobs market.

“You might say we’ve seen the peak for margins and the next few cycles will be tougher. Now lower-end consumers are starting to feel the pain of higher interest rates and more layoffs,” Purpose Investments’ Taylor said.

This article was provided by Bloomberg News.