Traders work in the Goldman Sachs booth at the New York Stock Exchange (NYSE) in New York.

The stock market sell-off over the past month has gotten "overdone" and will be offset in part as companies return to buying back their own shares, according to a Goldman Sachs analysis that sees the market gaining close to 6 percent over the next two months.

While acknowledging some economic headwinds in the coming years, the bank's equity strategists see fundamentals still underpinning values.

"The recent sell-off has priced too sharp of a near-term growth slowdown," David Kostin, Goldman's chief U.S. equity strategist, said in a note to clients. "We expect continued economic and earnings growth will support a rebound in the S&P 500."

Concerns over rising interest rates, a weakening global economy and pockets of worries expressed during earnings calls have helped rattle markets in recent weeks. Although stocks were set for a rise Monday, the is down about 9.3 percent from its peak, while the Nasdaq tech barometer has fallen into correction territory, defined as a drop of more than 10 percent.

To be sure, Kostin's forecast of 2850 for the S&P 500 is exactly where he predicted the benchmark to end this year in his 2018 outlook piece published a year ago.

That's come amid a mostly solid backdrop. Third-quarter GDP rose 3.5 percent, according to a preliminary reading Friday.