After a nasty selloff in the market, in order for stocks to move higher they will need to have cash to fuel a rally. Jim Cramer has seen that sometimes that fuel can come from retail investors who have been waiting on the sidelines and ready to put that cash to work, and sometimes it comes from a scary stock rotation.
"When money is flowing into stocks, with the mutual funds buying in endless waves and the hedge funds desperate to won stocks rather than shorting them, then you're in the land of the thousand bull dances and you don't have to worry about where the fuel for a rally is going to come from," Cramer said.
However with no money flowing into the market, Cramer has seen that powerful moves in stocks and sectors can occur. This is because when investors are reluctant to invest, money will be pulled out of the least exciting groups of stocks, and rotates into sexier names with more lift.
But here is the problem with rotations: without new money flowing in, gains often become zero-sum and will run out of fuel. The leaders will run out of steam with nothing to drive them higher, and that's when the worst possible rally can occur—a rally in the wrong stocks.
Cramer often sees that stocks that signal a slowdown or recession — such as the food and drug names — become the market's new leaders.
"You never really want to see any of the consumer staples roaring higher in a sustained advance because it means people think the economy's going to either get worse or simply stay in awful shape for a long time to come," Cramer said.
That is why Cramer considers one of the most horrifying things to see on the stock market is a stock like Altria, PepsiCo or General Mills spark a powerful rally. Often that can cause an immense amount of damage, unless there are vast sums of money coming in from the sidelines.
Read more from Mad Money with Jim Cramer
He also recommended exercising caution when you see defensive food and drug names rallying as well. Often just taking note of sector leadership will give you a strong read to determine if it is a sustainable rally.
In the meantime, Cramer recommended looking for opportunities to buy high-quality names where the stocks — not companies — are broken.