On a day when the market gets crushed, Jim Cramer likes to take a look at some of his lessons learned over his years of managing portfolios on Wall Street.

So, he did some research to analyze the trades and see what worked—and what did not—in the past. After all, what better way to gain insight on the future than to evaluate your success and failures from the past?

While digging through years of research, the "Mad Money" host discovered a very strange trend: Sometimes, the best time to buy a stock is when the analysts cut the company's earnings estimates.

At first glance, the thesis may seem misguided, if not backward. After all, lower estimates are a sign that a company's profits may not be as robust as previously expected. But that's not the case, in Cramer's eyes.

Yes, that's right, sometimes when a stock hits bottom—that is a great investing opportunity.

"Calling bottoms yourself can be a dangerous activity, fraught with peril if you come in too early, as so often happens. But sometimes the market will pretty much call the bottom for you," Cramer added.

To get the most reliable sign that a stock is hitting bottom, just wait for a moment when the estimates are so low that they can finally be beaten.

According to conventional wisdom, a secondary offering is bad for existing shareholders. When a company makes a secondary offering, it's issuing more stock for sale, and that will bring down the price of the stock.

That's bad news, right? Not necessarily, said Jim Cramer.

Although the "Mad Money" host concedes that this logic of a secondary as bad news does make sense, he thinks it is an old fashioned way of viewing the market.

With interest rates at or near historic lows, "Companies have been issuing equity to either pay down debt or to refinance it with cheaper debt that carries a lower interest rate," Cramer said.

"The money saved on those interest payments falls straight to the bottom line improving the health of the balance sheet. In turn shares rally."

Believe it or not, some of the best advice that Cramer ever received was from Kenny Rogers. That is, of course, referring to his lyrics from "The Gambler," suggesting that an investor needs to know when to hold 'em, when to fold 'em and when to walk away.

So, after spending a significant amount of time researching his trades from the past, Cramer has devised a set of rules to know when to call it quits.

"When it comes to picking a stock, cash is not always king. In fact, if you buy a stock just because it's sitting on a mountain of cash, you could get crushed," the "Mad Money" host said.

Another runaway red flag for a stock is when a company blames its customers for its own poor performance.

Cramer saw it first hand when he owned Juniper in 2011. The maker of networking and communications equipment began to fall when the stock was in the low $40s. It had the audacity to blame lack of orders from Japanese customers for its own poor performance.

The "Mad Money" host learned this lesson the hard way; he stuck with it as the stock got crushed at $20. He finally figured out that the blame-the-customer excuse was lame, as Cisco was taking market share the whole time and simply kicking Juniper's butt.

A huge part of success in picking stocks is determining where they are headed. Likewise, to appropriately anticipate direction, proper homework is key.

It is common knowledge that most of the time, stocks trade on its earnings-per-share number. However, Cramer warned against watching only that figure.

"You need to be aware that for some industries, earnings are not the most important metric, and if the only thing you're watching is the earnings per share, you could end up getting clobbered or missing some fabulous opportunities," he said.

For example, when dealing with an oil company, production growth is important. With a tech company, the average selling price of a product is a telling sign of a healthy stock. In these two sectors, both of these metrics have significantly more weight than anything relating to earnings estimates.

The final tip that Cramer gleaned from all of his research is to know when to hang on to a core holding, a high-quality stock with terrific prospects that will come to fruition in the long term.

Cramer recommended to hang on to this kind of stock, and don't just sell it at the first gain that comes along or the first time it gets a little shaky.

"If you really have conviction in a stock, you need to let it ride," he said.

Investors who own a stock and think it could go up in the next few years, make it your franchise stock. Or better yet, stick a "nontrade" label on it. The "Mad Money" host is willing to bet that you won't regret it, as long as the fundamentals stay positive.

Of course, if the business starts to fall apart then it is time to sell. That is the only time a core holding should be sold. Otherwise, hang on to it for the long haul so that you can rack up enormous amounts of money and climb with the stock, rather without it.