While markets are nowhere near the same position that they were in leading up to the October 1987 crash, TheStreet's Jim Cramer says he sold some stocks ahead of this month's big selloff thanks to lessons he learned back then.

"I was a firm believer [back in 1987] in the theory that: 'Bulls make money, bears make money and hogs get slaughtered.' Going into the first week of February [2018], I thought: 'Enough is enough, OK? This could be 1987-like, so let's take some winners off the table,'" Cramer said during a private conference call with members of his Action Alerts PLUS club for investors.

So, the stockpicker cut positions in some of his charitable trust's best-performing equities on Jan. 30, just as the market's big selloff was starting to warm up. He sold some Nvidia (NVDA)  -- which later dropped more than 5% -- and also reduced his trust's stake in Activision Blizzard (ATVI)  , which eventually fell by as much as 11% at its lowest point. Cramer also sold off some Alphabet (GOOGL) and Facebook (FB) , which had long been cornerstones of his charity's portfolio.

Jim Cramer sold some stocks in his charitable trust just prior to the market's recent selloff because he saw similarities between 2018 and the days leading up to the October 1987 crash.
Jim Cramer sold some stocks in his charitable trust just prior to the market's recent selloff because he saw similarities between 2018 and the days leading up to the October 1987 crash.

"Lots of you have asked how I knew to [sell stocks]," the expert said. "All I can say is that I learned when the circumstances warranted it. Now, I didn't think and don't think that we are in a 1987 year, but I felt the froth and I had to take action. ... The market has left behind the metric that mattered -- the biggest earnings beats -- and it's now trading off of two other concerns: inflation, [and] therefore the bond market."

Nonetheless, Cramer said that in spite of the increased volatility, the market's fundamentals still look good. For example, he said that unlike 1987's typical price-to-earnings multiple of 29, the average P/E is more like 17 or 18 today. He added that interest rates are a fraction of what they were back in 1987.

Want to join in on Jim's monthly conference calls? Click here for a free 14-day trial subscription to Action Alerts PLUS and hear all of the latest call, plus get e-mails before Jim makes any trade and enjoy lots of other exclusive material.

More from Markets

Dow Rises for First Time in 9 Days, Oil Jumps as OPEC Agrees to Boost Output

Dow Rises for First Time in 9 Days, Oil Jumps as OPEC Agrees to Boost Output

German Automakers Slump After Trump Tweets New Tariff Threat

German Automakers Slump After Trump Tweets New Tariff Threat

Chipotle Rises After Wedbush Lifts Price Target

Chipotle Rises After Wedbush Lifts Price Target

Crude Rises on OPEC Deal That Doesn't Specify Output Boost

Crude Rises on OPEC Deal That Doesn't Specify Output Boost

Video: Stock Investors Shouldn't Fret About Oil Prices in the $60s

Video: Stock Investors Shouldn't Fret About Oil Prices in the $60s