Businessman counting $100 bills © levent songur, Getty Images

Some of the biggest buyers of U.S. stocks in the past few years have been U.S. companies themselves as they pick up their own shares at bargain prices.

Over the past 12 months, 431 of the 500 companies in the Standard & Poor's 500 Index ($INX) have repurchased their own shares, retiring $448 billion in equity.

The buyback binge has enriched shareholders both directly and indirectly. Dividing corporate profits by fewer shares gives investors a bigger share of corporate assets; think of it as owning a bigger stake in a company without having to buy more stock. And although per-share earnings and share prices don't rise in lock step, they're closely correlated, which has helped to keep the stock market rally going even in a slow-growth environment.

Expect buyback activity to remain brisk, at least through the first half of 2014, says Lowell Yura, investment strategist for UBS Global Asset Management. For now, low interest rates and still-tepid economic growth leave com­panies with few better ways to invest their cash.

But market conditions are changing in ways that may make buybacks less attractive later in the year. Shareholders reap the most rewards from buybacks when a company retires shares on the cheap. That's made the past few years an ideal time for the strategy, as stocks were selling at historically low price-to-earnings ratios, and interest rates and economic growth rates were near zero.

Now, stocks are selling for prices that, on average, equate to about 15 times estimated 2014 earnings -- close to the historical average, says investment strategist David Lafferty, at Natixis Global Asset Management. Stocks aren't expensive, but they aren't as cheap as they were when the buyback trend got rolling two years ago. As the market continues to rise, many firms may find their shares too dear to retire.

Moreover, the economy is gaining steam. That means an increasing number of companies may need more of their cash to build up inventories and invest in research, new plants and equipment. Those investments accommodate future sales growth, which, in turn, fuels earnings. "That's a good sign for stocks in the long run," Lafferty says.

You needn't avoid com­panies that continue to engage in buybacks. But investors will have to look more carefully at a com­pany's motivation for repurchasing stock. Some firms use buybacks to fuel compensation plans that give generous stock grants to executives, for example, with little or no net share shrinkage as a result.

Joseph Becker, investment strategist at PowerShares, which manages the PowerShares Buyback Achievers (PKW) portfolio, says his fund buys shares only in companies that retire at least 5 percent of their shares as part of the buyback. That ensures the money used for the buyback will boost earnings per share. IBM (IBM), for example, bought back $11 billion worth of stock in the 12 months that ended Sept. 30, boosting per-share operating earnings 17 cents.

Listen to what managers say about why they're buying shares. Executives who believe their company's shares are unjustly cheap could be flagging a stock market bargain. Companies that say adverse industry conditions leave them with few better uses of corporate cash, by contrast, are throwing in the towel.

Click here to become a fan of MSN Money on Facebook

More from Kiplinger