Goldman Sachs strategists aren't buying into all the optimism surrounding the stock market in 2017.

In fact, they believe investors are reaching "the point of maximum optimism" that will lead later in the year to a pullback.

Despite a rally that has sent the S&P 500 up a gaudy 5 percent in just the first seven weeks or so of trading, Goldman is sticking to its fairly pessimistic call for the full year. The firm believes the large-cap index will gain about another 2 percent before hitting a wall and fall 4 percent from there to finish 2017 at 2,300, or about 2 percent below its current level.

Investors have grown too confident that tax cuts and other initiatives from President Donald Trump's administration will have a major impact on business, Goldman told clients this week. Once investors realize that policy changes won't be felt quickly, the strategists said, markets will have to adjust.

"Financial market reconciliation lies ahead," said David Kostin, Goldman's chief U.S. equity strategist. "We are approaching the point of maximum optimism and the S&P 500 will give back recent gains as investors embrace the reality that tax reform is likely to provide a smaller, later tail wind to corporate earnings than originally expected."

Getty Images

Kostin believes corporate earnings could provide another problem for the market.

The market's 'cognitive dissonance'

In addition to pushing up stock indexes, investors also are pouring cash into the market. Funds focused on U.S. stocks have taken in a net $52.2 billion this year, according to Bank of America Merrill Lynch, and money even has been moving into mutual funds lately.

Sentiment indicators are showing strong results as well, particularly among professional investors. The most recent Investors Intelligence survey showed the bulls at 61.8 percent, near a 13-year high.

Kostin sees a dichotomy between investor hopes and the reality on the ground, and says it's indicative of "cognitive dissonance" in the market.

As that reality sets in, the market will have to reduce its expectations for the effect that lower taxes will have on corporate earnings.

"We recommend investors focus on stocks with high secular growth prospects rather than 'winners' and 'losers' from potential tax reform," Kostin said.

Indeed, there are multiple headwinds that could come along to thwart a rally that seems priced for perfection.

Mohamed El-Erian, chief economic advisor at Allianz, warned Tuesday that rising interest rates ahead will pressure the U.S. dollar higher, which also could hamper market values. He also warned about the possible fallout should tax reform efforts in Washington come up short of expectations.

"First, I think you'll see lower markets. Second, you'll see very different sector performances," El-Erian told CNBC. "You would see quite a few movements within the market and overall."