Search Jim Cramer's "Mad Money" trading recommendations using our exclusive "Mad Money" Stock Screener.

Today, out of nowhere, people are suddenly feeling better about the stock market, Jim Cramer announced to his Mad Money viewers Thursday after the first strong rally in what seems like forever. What changed in 24 hours? Cramer noted a few key changes.

First, Cramer said investor sentiment has gotten worse, something that needs to happen before a bottom can be formed. From front page stories talking about the market's woes to the voracious selling in Cramer's FANG group of high-growth tech stocks, you can almost feel investors giving up.

Next, there was relief from China, which managed to end its day on an up note, and from oil, which also continued to distance itself from its sub-$30 lows.

Then there were strong earnings from JPMorgan Chase(JPM) - Get Report , which sent shares up 1.5%.

But most important to Cramer was the final positive, a Federal Reserve governor, St. Louis Fed chief James Bullard, giving an interview where he indicated the Fed is not living in a vacuum and won't continue to raise interest rates with commodities, and most of the world, in turmoil.

We're not out of the woods, however. Which is why Cramer said to use any strength to sell the laggards in your portfolio before the next downswing is upon us.

When Cheap Isn't

Investors looking to pick up some "cheap" stocks with low price to earnings multiples need to think again, Cramer told viewers. Sometimes a an ultra low P/E is a big red flag.

They're called value traps, Cramer explained, and they're companies that look cheap but really aren't because the earnings estimates that make up the "E" in P/E come into question.

Case in point: offshore driller Ensco (ESV) , the $11 stock that trades at just 4.9 times its earnings estimates of $2.27 a share. The stock may look cheap down 80% over the past two years, especially in a market where the average stock trades for 16 times earnings. But in reality the earnings estimates for Ensco are too high.

Its business is eroding daily from $30-a-barrel oil that makes pricey offshore drilling rigs completely uneconomical. Cramer noted Ensco also seemed cheap in 2014, when shares traded at just eight times earnings. Back then, shares were $50.

IBM(IBM) - Get Report is another company with a dangerous P/E. The company continues to shed business and may not be able to meet even its lowered earnings forecasts.

Other value traps include Freeport-McMoRan(FCX) - Get ReportU.S. Steel(X) - Get Report  and even the airlines, which while benefiting from lower fuel costs are suffering from increased competition and an overall global economic slowdown.

Stay Disciplined

Don't let your emotions cloud your judgment, Cramer reminded viewers. Discipline must always trump conviction.

It may seem counter-intuitive, but the time to buy is when everyone else is selling. It's not like a bell goes off at the bottom to let you know "it's time to buy," Cramer said.

That's why Cramer said he did some buying Wednesday for his charitable trust, Action Alerts PLUS. It was, admittedly, a horrible day to pull the trigger and do some buying, he said, but ultimately, as it often is, yesterday was the perfect time to buy as everyone else had given up.

Executive Decision: Dr. Randall Schatzman

For his "Executive Decision" segment, Cramer spoke with Dr. Randall Schatzman, president and CEO of Alder BioPharmaceuticals(ALDR) - Get Report , a stock that rallied over 11% in today's session but still remains 48% from its 2015 highs.

Schatzman said while it's been a wild week on Wall Street, the biopharmaceutical space has never been stronger. There is more innovation and more drugs being approved than ever.

When asked about his company's migraine treatment, which is currently in Phase III testing, Schatzman said the company believes it has identified and neutralized one of the primary factors that trigger migraines. So far, patients are responding well in the study. He said Alder has been successful using social media to spread the word to the 36 million migraine sufferers out there.

Schatzman was also upbeat on his company's arthritis drug, which will be entering Phase III trials soon.

Cramer said the best time to buy these stocks is when they're hated, not when they're loved.

Lightning Round

In the Lightning Round, Cramer was bullish on CVS Health(CVS) - Get Report , Walgreens Boots Alliance(WBA) - Get Report and JPMorgan Chase.

Cramer was bearish on Sunoco(SUN) - Get Report , ConocoPhillips(COP) - Get Report , Annaly Capital(NLY) - Get Report and LendingClub(LC) - Get Report .

Am I Diversified?

In the "Am I Diversified?" segment, Cramer spoke with callers and responded to tweets sent via Twitter to @JimCramer to see if investors' portfolios have what it takes for today's markets.

The first portfolio included BlackRock(BLK) - Get Report , Cardinal Health(CAH) - Get Report , Walt Disney(DIS) - Get Report , Harman (HAR) and Equinix(EQIX) - Get Report .

Cramer said this portfolio had perfect diversification.

The second portfolio's top holdings included Nike(NKE) - Get Report , Celgene(CELG) - Get Report , Berkshire Hathaway(BRK.B) - Get Report , Alphabet(GOOGL) - Get Report and Dexcom(DXCM) - Get Report .

Cramer said this portfolio cannot have both Celgene and Dexcom and advised selling Dexcom and adding an industrial like General Electric(GE) - Get Report .

The third portfolio had Apple(AAPL) - Get Report , Walt Disney(DIS) - Get Report , Nike(NKE) - Get Report , AT&T(T) - Get Report and Bank of America(BAC) - Get Report as its top five stocks.

Cramer also blessed this portfolio as diversified.

To watch replays of Cramer's video segments, visit the Mad Money page on CNBC.

To sign up for Jim Cramer's free Booyah! newsletter with all of his latest articles and videos please click here.

At the time of publication, Cramer's Action Alerts PLUS had a position in AAPL, BAC, GOOGL and WBA.