3 reasons why the rally in stocks may have peaked

7 stocks that rise
guvendemir | Getty Images

As U.S. stocks churn near all-time highs, several factors indicate the rally may have run out of legs for now.

"We've lost the upside momentum we've had," said Bruce Bittles, chief investment strategist at Baird. "The trend is positive but the momentum is neutral."

All three major indexes hit record highs last Thursday for the first time since 1999 and ended at all-time highs again on Monday. That marked the 10th record high for the S&P 500 since it broke out of a more than 12-month trading range to hit an all-time high in July.

The recent gains came amid the latest earnings season, which many analysts expect to mark the turning point after four straight quarters of decline in earnings. Expectation of future growth has helped support historically high stock market valuations, several analysts said.

"Over the medium term, the number one factor helping the market move higher is going to be earnings season, but we're not going to get earnings until October," said Brian Nick, chief investment strategist at TIAA Investments. The stock market is "devoid of a clear upward catalyst for the market over the next two months."

Meanwhile, three bullish indicators are turning less supportive for stocks.

As stocks rose to record levels in the last few weeks, the advance-decline line of stocks on the New York Stock Exchange has risen to its highest in more than 12 months. However, the last few days of sideways trading have turned the line flat to a touch lower, indicating the momentum behind stock gains is petering out.

Second, investors are becoming more optimistic, typically seen as a contrarian indicator of a market top. Both the latest AAII Investor Sentiment Survey and U.S. Investors Intelligence survey showed bullishness rose in the last week, to 35.6 percent and 56.2 percent, respectively.

The Investors Intelligence newsletter's co-editor John Gray said the above-55 percent level of bullishness "is considered the danger level" for the stock market.

Another discouraging trend in a bullish signal is a measure of market breadth. For sustainable gains in stocks, analysts look for all or many parts to rise together. All 10 S&P 500 sectors finally turned positive year-to-date this summer amid the latest earnings season, but a broader measure of breadth has declined.

On July 15, 95 percent of the sub-industries in the S&P Composite 1500 were trading above their 50-day moving averages, according to S&P Global Market Intelligence's Sam Stovall. For more than 20 years, that 95 percent mark for the S&P 1500 was followed by an average gain of 3.3 percent in the next nine weeks.

However, that breadth indicator moderated last Friday to 80 percent of the sub-industries and 76 percent Tuesday on a weekly basis, Stovall said. "Unless we see a move back higher in terms of participation, there could be an implication that this advance is getting tired and may require a correction in either time or price."

Against the backdrop of those three indicators and in the lull before the next earnings season, traders remain focused on macro events, particularly policy hints from the U.S. Federal Reserve. All ears are tuned to Fed Chair Janet Yellen's speech scheduled for August 26 at the annual central bank conference in Jackson Hole, Wyoming.

One of the key indications on market sentiment over the timing of the next hike is the U.S. dollar. The currency index has rallied with expectations of Fed tightening and generally weakened as expectations on the timing of the next rate hike have been pushed out. The dollar is now more than 4 percent lower year to date, while the S&P 500 has gained more than 6.5 percent over that time.

"Really the market has been going up as the dollar has been flat to down," said Vadim Zlotnikov, chief market strategist at AllianceBernstein.

While the latest Fed commentary has leaned dovish, most economists still expect the Federal Reserve to raise rates by the end of the year. The Fed's July meeting minutes released Wednesday indicated some policymakers expected a rate hike would be needed soon, but they generally agreed more data is needed before raising rates.

That economic picture is mixed. The labor market remains strong, but Friday's retail sales report came in unexpectedly unchanged for July.

"There seems to be a lot of optimism recently, but I'm not so sure the economic data supports this recent optimism," said Robert Pavlik, chief market strategist at Boston Private Wealth, who noted the overall bullish sentiment in stocks "is giving me a bit of a pause."

And any hints the Fed might move before markets believe the economy is strong enough to support a rate hike could also keep stocks under pressure.

To be sure, as global bond yields remain low and the United States sees relatively better economic growth than the rest of the world, investors continue to buy U.S. stocks despite concerns about historically high valuations.

"To me it feels toppy, but it's tough to sell this market. Every time it looks like the market looks like it's stretched, it just rallies to new highs," said Peter Coleman, head trader at Convergex. You're "not going to leave your money in cash."

CNBC's Jeff Cox contributed to this report.

Correction: This story has been updated to correct Bittles' quote. He said, "The trend is positive but the momentum is neutral."