Money is pouring into the U.S. economy and in turn helping provide support for the otherwise struggling stock market. If current conditions persist, corporations are likely this year to inject more than $2.5 trillion into what UBS strategists term "flow" — the combination of share buybacks, dividends, and mergers and acquisitions activity. The development comes as companies find themselves awash in cash, thanks primarily to years of stashing away profits plus the benefits of a $1.5 trillion tax break this year that slashed corporate rates and encouraged firms to bring back money idling overseas. Companies have nearly $2.5 trillion in cash parked domestically, according to the Federal Reserve, and as much as $3.5 trillion overseas, various estimates have shown.

When all is said and done for 2018, UBS expects dividend issuance to top $500 billion, buybacks to range from $700 billion to $800 billion, and M&A to constitute about $1.3 trillion. If the numbers pan out, they would equate to about 10 percent of the 's market cap and 12.5 percent of GDP. "Assuming improving growth and stable rates, we expect the positive positioning/flow backdrop to support US equities, which is important as the daily corporate flow slows from mid-June to mid-July," UBS strategist Keith Parker said in a note. Parker pointed out that the firm has overweight positions in both tech and health care as the two sectors are leading the buyback boom.

Buybacks specifically have been on a torrid pace and are helping provide a floor to a market that for much of 2018 had looked tired and volatile after a 20 percent S&P 500 gain the year before. Repurchases are up 83 percent year to date, far ahead of the 9 percent gain in dividends, while M&A activity involving U.S. companies has surged 130 percent, according to UBS. The Nasdaq, which is heavily weighted to tech, is up about 9.5 percent year to date, easily topping the other major averages. Led by Apple's $100 billion, announced buybacks have jumped $160 billion in 2018, an increase of more than 200 percent from 2017. Health-care shares, however, have lagged and are up less than 1 percent year to date. Tracing corporate flow Source: CompuStat, FactSet, Bloomberg, Dealogic, UBS UBS estimates that the combination of buybacks, dividends and demand flows account for some 40 percent in performance this year. The S&P 500 has nudged 2.6 percent higher and the Dow industrials are just ahead of breakeven. The market, however, is coming off its best month since January and the best May since 2009, according to Bank of America Merrill Lynch. The gains came amid a big liquidity surge and improving economic fundamentals. Barclays researchers last week said recent economic performance is indicating "the arrival of fiscal stimulus" through the tax cuts and increased spending. In addition to skewing toward tech, buybacks also have been heavily tilted toward growth stocks, which have seen $280 billion in activity, compared with value's $90 billion. That is "providing further fuel for potential outperformance as the growth/value debate heats up," Parker said. Large-cap growth stocks are up 7.4 percent year to date while value has fallen 3.2 percent, according to FactSet. In addition, the biggest companies were the biggest repurchasers, with the top 20 percent of firms by market cap accounting for 72 percent of buybacks in the first quarter. The patterns have been big determinants in market action, Parker wrote. "The largest and most profitable firms have continued to repurchase shares, which investors have used to cover shorts and further increase exposure to momentum and growth, particularly those firms with positive sales growth/revisions," the strategist said. May was a particularly active month for repurchases, with a record $171.3 billion in announcements, spurred by Apple, according to market data firm TrimTabs. — CNBC's John Schoen contributed.

WATCH: Trump tax cut lifts dividends to new record