U.S. stock market gains over the past decade look good on paper, but they mask an underlying trend that's been driving stocks behind the scenes: buybacks. That trend is now making a U-turn.

According to Bank of America strategists, last quarter, stock buybacks among U.S. companies fell by 3%, and they had already dropped by 26% in the previous three months.

Buybacks have historically been one of the biggest drivers of U.S. stock valuations. If they're on the way out, stocks could be in for a bumpy ride, experts say.

In fact, the S&P 500 Buyback Index—which measures the performance of companies that buy back their own stock—has been underperforming the broader stock market by 10% this year, the worst in a long time.

Stock buybacks are attractive to investors despite criticism

A stock buyback occurs when a publicly traded company uses its cash reserves to purchase its shares from the open market. It's one of the ways to distribute excess capital to shareholders.

Although politicians and academics criticize this practice, suggesting that the money should be invested to promote long-term growth, buybacks remain appealing to investors.

When the company buys back its shares, it pulls them from the market, reducing the total number of outstanding shares. That improves financial metrics, such as earnings per share, and makes the stock more valuable.

In his recent annual letter to shareholders, Warren Buffett wrote: “When you are told that all repurchases are harmful to shareholders or to the country, or particularly beneficial to CEOs, you are listening to either an economic illiterate or a silver-tongued demagogue (characters that are not mutually exclusive).”

The free money era is over

Last year, companies in the S&P 500 spent a record $923 billion on buying their own shares, continuing a trend that kicked off in 2008 when interest rates plunged after the Great Recession.

Not only that, a large part of those buybacks were bought using debt.

“Buybacks were a post-GFC [Great Recession] phenomenon, with companies taking advantage of cheap financing costs to repurchase their own stocks,” said BofA strategists led by Savita Subramanian.

With interest rates at 5.5%, this approach is no longer feasible as borrowing costs make it unsustainable.

According to BofA, the limited debt issuance suggests that buybacks will likely remain subdued in the future. For instance, Citigroup has signaled its intention to engage in modest buybacks in the fourth quarter.

A potential rebound in 2024?

Although buyback volumes are forecast to plunge by up to 15% this year, companies aren’t entirely giving up on them.

According to Goldman Sachs strategist David Kostin, spending on stock buybacks is expected to go up by about 4% next year. Although he admits that predicting stock buybacks is akin to reading tea leaves

“Buybacks are one of the most volatile uses of cash as firms adjust repurchase activity depending on the operating environment,” he said.

He expects that next year, as the economy improves, the Fed stops raising interest rates, and company profits grow, we may see a small increase in buyback activity.

And if history is any indication, that’ll probably be good for stocks.