Amid the fanfare of Apple reaching $1 trillion in market valuation, investors may be missing another more important milestone of the same dollar level.

Namely, U.S. companies appear poised to eclipse the $1 trillion mark in share buybacks this year, a pivotal record that will keep the stock market going even as many retail investors are beginning to fear equities, according to a Goldman Sachs analysis for clients.

Wall Street already had been expecting a potentially history-making year for repurchases, but Goldman anticipates that the corporate appetite will be even stronger than anticipated particularly with August being the biggest month traditionally for buybacks.

"Corporate repurchases remain the largest source of demand for shares," wrote David Kostin, chief U.S. equity strategist at Goldman.

Kostin also noted that the year already has seen a wealth of buyback announcements, with companies authorizing $754 billion worth. History shows that there's typically an 85 percent follow-through rate, so that would add up to $640.9 billion worth with 20 percent of companies yet to report second-quarter earnings.

Moreover, technology has accounted for 40 percent of those authorizations. That could be critical in the days ahead, as tech companies have provided the most market volatility this summer. Netflix and Facebook have been two of the shakier stocks as both face challenges in terms of users and public perception.

Apple, meanwhile, has helped alleviate some of that stress with another quarter of blockbuster earnings and its shattering last week of the trillion-dollar market cap milestone.

"Significant potential demand remains for shares as firms complete their existing programs," Kostin said. "Buybacks represent the critical source of demand for shares given most other ownership categories are net sellers of stocks (households, mutual funds, pension funds)."

Indeed, retail investors have pulled a net $57.1 billion out of mutual funds in 2018, according to Bank of America Merrill Lynch, even though the U.S. market has been the best performer among developed nations.

Goldman doesn't expect a lot of upside for the domestic market. Its S&P 500 price target is just 2,850 for the full year, a less than 1 percent gain from the current level. That comes even though Kostin noted that "fundamentals remain extremely positive" as GDP is growing at a healthy pace, unemployment remains low and consumer confidence is strong.

There's also the tail wind of last year's tax cut.

"Part of the uplift [in buybacks] is a direct result of tax reform, but strong cash flow growth has also been essential," Kostin said. "Investors take note: August is the most popular month for repurchase executions, accounting for 13% of annual activity."

However, he said that the swelling U.S. budget deficit presents an obstacle for investors, particularly if it causes government bond yields and interest rates otherwise to rise, putting pressure on market valuation. The S&P 500 is currently trading around 16.7 time forward earnings, which is below the recent high of 18 times but also ahead of historical valuation levels.