Companies buying back their own shares is the only thing keeping the stock market afloat right now

  • Companies set a record for share buybacks in the second quarter, while investors set their own record for selling stock-based funds in June.
  • On the corporate side, officials are finding that repurchases are the best use for investor cash now, while individual investors are fearful that a trade war could offset strong economic momentum this year.
  • All in all, the corporate buying has won out, keeping the S&P 500 slightly positive for the year.

Stocks right now are hanging by a thread, boosted by a bonanza of corporate buying unrivaled in market history and held back by a burst in investor selling that also has set a new record.

Both sides are motivated by fear, as corporations find little else to do with their $2.1 trillion in cash than buy back their own shares or make deals, while individual investors head to the sidelines amid fears that a global trade war could thwart the substantial momentum the U.S. economy has seen this year.

"Corporate cash is going to find a home, and it's either going to be in buybacks, dividends or M&A activity. What it's not going to be is in capex," said Art Hogan, chief market strategist at B. Riley FBR. "Individuals are looking at the turbulence we've seen this year that we had not seen last year. That creates its own sort of exit sign for investors who don't want to deal with that."

The numbers showing where each side put their cash in the second quarter are striking.

Companies announced $433.6 billion in share repurchases during the period, nearly doubling the previous record of $242.1 billion in the first quarter, according to market research firm TrimTabs.

Dow components Nike and Walgreens Boots Alliance led the most recent surge in buybacks, with $15 billion and $10 billion, respectively, last week. In all, 31 companies announced buybacks in excess of $1 billion during June.

At the same time, investors dumped $23.7 billion in stock market-focused funds in June, also a new record. For the full quarter, the brutal June brought global net equity outflows to $20.2 billion, the worst performance since the third quarter of 2016, just before the presidential election. The selling is particularly acute in mutual funds, which saw $52.9 billion in outflows during the quarter and are typically more the purview of the retail side.

So far, the market has managed to survive, with a 1.6 percent S&P 500 decline in the first quarter offset by a 3 percent gain in the second quarter, leaving the index up about 1.4 percent for the year.

Getty Images

To be sure, there's a bright side to the pessimism. TrimTabs, in its model portfolio, uses extreme periods of investor sentiment as opportunities to move in the opposite direction, and the firm said it is 100 percent long the S&P 500 now. That comes as bearish sentiment in the American Association of Individual Investors survey hit 40.8 percent last week, a 14.6 percentage point surge and only the second time this year it has eclipsed 40 percent.

Hogan said investors can't be blamed for an unwillingness to take on more risk even as the economy is turning up. After a typically lackluster 2 percent growth rate in the first quarter, GDP is likely to accelerate by 3.8 percent in the second quarter, according to CNBC's Rapid Update tracker of economic forecasts.

"What's happening is you get an environment where trade policy becomes an economic negative in the second half of this year," he said. "Certainly if your risk tolerance is lower, then hitting the exit is probably the right thing to do."

Corporate behavior is helping offset that fear, but that has a catch.

The 2017 tax cuts that lowered the nominal rate most companies pay from 35 percent to 21 percent also provided incentives to bring back profits stored overseas and gave breaks for companies investing in capital. However, a big chunk of corporate cash appears headed to shareholders.

In addition to the buyback surge, companies issued a record $111.6 billion in dividends during the second quarter, bringing the 2018 total to $220.8 billion, a 7.8 percent increase over the same period a year ago, according to Howard Silverblatt, senior index analyst at S&P Dow Jones indices. M&A activity also is surging, with dollar volume for the three months ending May 31 at $726.3 billion, more than doubling the same period in 2018, FactSet reported.

Capital spending, though, is expected to rise at more modest pace — 6.6 percent in 2018 and 5 percent in 2019, according to mid-June estimates from The Conference Board.

So while companies are likely to continue to prop up the market by returning cash to shareholders, it comes against a backdrop of concern that there simply may be no better place to put money amid the trade uncertainty.

"It just doesn't appear that we're close to an end on the trade issue," Hogan said. "That's going to present a significant headwind to this market until it doesn't."

WATCH: Companies prepare to pour $2.5 trillion into buybacks, dividends, M&A