Cramer's key to maintaining the perfect portfolio: Stay flexible

  • Being willing to change your strategy on a dime is critical to maintaining the perfect portfolio, CNBC's Jim Cramer says.
  • Investors can't afford to fall in love with stocks, the "Mad Money" host says.

CNBC's Jim Cramer always tells investors that they need to be able to do two things before putting together their ideal portfolio: do the homework and defend your stock picks.

For the "Mad Money" host, doing the homework means knowing your stocks — and the underlying companies — like the back of your hand. Know how the company makes its money, how much money it makes, what its management says on the quarterly conference calls and what Wall Street thinks about the stock.

Once you've done the homework, Cramer recommends developing a thesis for each stock and explaining it to another human being. It doesn't have to be a professional; as long as you can explain why you own what you own, he said.

Only then can you start putting together your portfolio. Ideally, Cramer likes to see a diversified portfolio with five to 10 individual stocks — how many you have should directly correlate with how much time you can spend doing the homework on each one, he said.

"What’s the most important thing for you to keep in mind? Above and beyond everything else, you need to know that your perfect portfolio won’t stay perfect for long," Cramer said. "Those five to 10 stocks you thought were winners? Yeah, unless you’re absurdly lucky, not all of them will stay winners."

The former broker and hedge fund manager knows all too well that the investing game is "full of heartbreak," which is why he adheres to one cardinal rule when it comes to stock-picking: always try to stay flexible.

Why stay flexible? Because markets change. Industries get disrupted. Well-run companies flounder. Unforeseen events rattle entire sectors.

There's no way to predict what unexpected circumstance can suddenly destroy your holdings. The only way to get around the pain is to stay on your toes and be willing to sell even your favorite stocks when things get rough, Cramer said.

"That may sound straightforward, but for decades so-called experts have peddled the idea that when you buy a stock, you need to be prepared to hold onto it until the death of the universe. How many times have you heard someone say buy and hold?" the "Mad Money" host asked. "Well, I’ve got to tell you that’s nonsense."

Instead of "buy and hold," Cramer preaches "buy and homework" — that way, investors can stay agile while having conviction in the stocks they know are working.

"You can’t afford to fall in love with a stock," he told investors. "When you buy shares in a publicly traded company, you’re not joining that stock in holy matrimony. You don’t swear to stick with it in sickness and in health, for richer or poorer. You don’t need to go to a judge to get a divorce. It’s just a piece of paper."

So when something changes and your stocks start going down for real reasons, don't start looking for new reasons to hold onto them, the "Mad Money" host recommended.

"Just get out of there," he said. "When something goes wrong with a company you own, be ready to stop hoping and start selling."

WATCH: Cramer's cardinal rules for managing your holdings

Questions for Cramer?
Call Cramer: 1-800-743-CNBC

Want to take a deep dive into Cramer's world? Hit him up!
Mad Money Twitter - Jim Cramer Twitter - Facebook - Instagram - Vine

Questions, comments, suggestions for the "Mad Money" website? madcap@cnbc.com