Jim Cramer traced Thursday's rally back to the big industrials. To be able to spot the move, an investor had to understand the concepts of rotations, short-squeezes and under-ownership.
And the rally might not be over.
On Thursday morning, Caterpillar dramatically slashed its first-quarter guidance. Wall Street wanted Caterpillar to earn 95-cents, but it announced it could only do 65 to 70 cents for the quarter because of weak energy, transportation and resource orders.
When the market opened, Caterpillar's stock fell less than $1 and then began to soar. It was one of the most startling reversals Cramer had ever seen.
What really happened was behind the scenes. On Wednesday, the Federal Reserve confirmed it was no longer planning to raise interest rates four times in 2016 as it said it would in December. When the Fed raises interest rates, investors like to hold dollars because the value will go up versus the euro, giving them a better return.
When the Fed changed directions, it shocked investors who were holding the dollar. Suddenly, they dumped the dollar and bought into the euro and yen.
Read more from Mad Money with Jim Cramer
Caterpillar has a large business overseas, and it competes against companies that sell in weaker currencies. So, when the dollar peaked, the tables turned.
When Caterpillar lowered its first-quarter forecast, Cramer interpreted this as the low in the cycle of the weaker dollar and stronger commodity prices that could breed stronger orders down the road.
But what really made the stock rally were the hedge funds that were short Caterpillar stock, because they assumed the quarter would be terrible. So, when Caterpillar announced a cut in guidance and the stock didn't go down, the short-sellers scrambled to cover their positions.
"Institutions reach for it at the same time as the shorts try to cover their positions, which required them to buy stock. Put it all together, and you get a massive rally, seemingly out of nowhere," Cramer said.
Cramer saw the rally coming; there were huge signs everywhere. Another gigantic industrial Dover preannounced hideous numbers. The stock dipped the next day, and then rallied back above to when it preannounced the crummy quarter.
"Remember, we are in both rolling bear market territory and rolling bull market territory," Cramer said.
That means one hand will wash the other. Banks and pharmaceuticals are selling off, while the industrials are rallying. Money is simply flowing from one bearish sector into the bullish ones with shocking velocity.
Cramer does not know how long the money rotation will last. It could merely be a short-covering rally, or it could last awhile. The key is to watch the dollar and decide if it has peaked.