Goldman Sachs thinks the good times may be over for stocks for a little while.
July was great for the market, with the S&P 500 rising nearly 4% and setting seven record closing highs. Fears about Brexit faded, allowing more than 90% of investors to make money last month, according to data shared exclusively with CNNMoney by Openfolio.
But Goldman Sachs is warning that stocks "remain expensive and earnings growth is poor." The influential investment bank downgraded stocks to "underweight" over the next three months.
"Until the growth situation improves, we are not that constructive on equities, particularly after this type of rally," Goldman strategists wrote in a report Sunday.
Growth concerns were magnified on Friday, when investors learned that the U.S. economy grew at sluggish 1.2% pace between April and June. That sobering GDP report dashed hopes for a spring rebound from the first quarter's anemic 0.8% growth pace.
Related: U.S. emerges as safe haven amid chaotic world
Stocks may be more vulnerable to disappointing news because of how far they've climbed lately. The Dow is currently sitting at 18,400, or roughly 3,000 points above its mid-February low. That's a huge move.
Goldman isn't going out on a limb by warning of possible turmoil in the next few months. History shows the August/September period can be rough for stocks. Those two months are the worst for the S&P 500 in terms of monthly price increases since World War II, according to S&P Global Market Intelligence.
The challenges may be greater this time around. Not only does growth remain elusive for much of the globe, but there is a lot of uncertainty about policy. Goldman cited the Brexit negotiations in Europe, China's attempt to manage its slowdown and the looming presidential election in the U.S.
The other problem is that stocks look pricey. The S&P 500 is trading at 17.87 times its projected earnings over the next 12 months, the loftiest multiple since June 2004, according to S&P.
Related: Stocks can predict the election winner
The bulls are hoping that earnings, the real driver of stock prices, will catch up to the market. While tech companies like Facebook (FB) and Amazon (AMZN) have reported blockbuster profits, the S&P 500 is still on track to report its fourth consecutive quarter of shrinking earnings.
Even if profits don't rebound, the markets have been supported by extremely low bond yields that make stocks look cheaper by comparison. But many worry that bonds are in the middle of a massive bubble that will eventually reverse.
All of this explains why Goldman Sachs is advising clients to put money into cash. Some investors are doing just that. The average Openfolio portfolio in July held 10.3% in cash, up from 8.2% in May.
But Goldman isn't telling people to keep their money under the mattress. The firm remains neutral on stocks over the next 12 months and told investors to "look for opportunities to re-enter upon pullback in equities."