A divergence in the summer rally may be a warning sign for the stock market, according to Ned Davis Research. Institutional investors met the rally with skepticism, focusing on downward earnings revisions, geopolitical risks and the Federal Reserve 's continued hawkishness, said Ed Clissold, the firm's chief U.S. strategist. Retail investors, on the other hand, "embraced" the upswing. "The breadth of the rally likely gave them more confidence," Clissold wrote in a note Wednesday. According to CFTC data, large speculators — mostly hedge funds — have been heavily short, he said. At the same time, the S & P 500 rallied sharply. "Investor sentiment is about people and their emotions, and it applies to retail and institutional investors alike," Clissold said. While retail investors have shown more skepticism since the 2016 bear market bottom, there has been a spike in optimism in recent weeks — one of the sharpest in years, according to the American Association of Individual Investors. "Market returns have been flat when retail traders have gotten optimistic so quickly," Clissold wrote. "Regardless of investors being classified as retail or institutional, sentiment extremes have been a warning of changes in market direction." — CNBC's Michael Bloom contributed reporting.