Cramer's single most important investing rule

(The video above was first made available on Aug 5, 2013. Click for a searchable transcript of this Mad Money segment)

With stocks trading at or near all time highs, how can you protect your profits while still riding a wave that may have a great deal of energy left?

Of course, it's never a mistake to ring the register, but Jim Cramer would not stay out of the market for long. He believes there's more upside ahead. That is, unless the next shoe drops which is always a possibility. How do you navigate all that?

The "Mad Money" host believes the key to success in this market involves discipline. And he believes no discipline is more important than diversification.

"This is the single most important concept in investing," he said. "It's the key to avoiding enormous losses and making sure you can weather a storm."

The idea behind diversification is critical whether you own 5 stocks or 500. That is, diversification spreads out risk and therefore helps shareholders mitigate all kinds of developments, especially unexpected and negative developments.

"When you get too concentrated in one area, should something bad happen, you're going to want to throw yourself off a bridge because the losses will be enormous," Cramer said.

"However, if your portfolio is properly diversified, then you can handle just about any setback. You can even come back from financial disaster," he added.

Read More from Mad Money with Jim Cramer:
Are you making too much money?
During rallies, don't make this mistake
Approach rally with caution

Achieving diversification involves following a rule; one that's simple but sometimes also painful. That is, to be properly diversified, you must only ever keep 20 percent of your portfolio in stocks of the same sector.

No matter how tempting it may be to make a big bet on banks as the economy turns or jump on retailers as back to school nears, you must exercise restraint. Only ever allocate a fifth or less of your portfolio to a single thesis, no matter how sure-fire you think it is.

"That means if you own 5 stocks, only one of them can be a tech stock, only one can be a health care stock, only one can be a financial, only one can be an energy company, only one can be an industrial," Cramer explained..

And if you're not sure, Cramer says err on the side of caution; diversification is that important.

Call Cramer: 1-800-743-CNBC

Questions for Cramer?

Questions, comments, suggestions for the "Mad Money" website?