In hindsight, it’s easy to see that you should have sold a stock in a crisis. But in the midst of a financial debacle, it’s not so clear. Here’s how to figure out what to do, writes MoneyShow’s Jim Jubak, also of Jubak’s Picks.

Don’t throw out the baby with the bath water.

The adage is useful in wide swaths of life. It has certainly helped me more than once in raising two children.

But as investing advice, it’s often just plain wrong. The truth is that some of the time, you would do well to throw out the baby with the bath water.

Take Spanish bank stocks. No doubt about it, you would have been better off getting rid of them all in your portfolio back when the Euro debt crisis hit.

For example, Banco Santander (STD), my favorite Spanish bank stock even now, sold in New York as an American depositary receipt for $16.56 on January 15, 2010. At that time, you could have sold all Spanish bank stocks just when a new Greek government had revealed that the Greek budget deficit for 2009 was 12.7% instead of 3.7%, thanks to some deceptive accounting.

You could have sold at $11.70 on November 15, 2010. That month, the European Union decided to bail out Ireland.

On April 18, 2012, Banco Santander traded at $6.34.

Or take solar stocks. You would have been better off selling everything in that sector back in December 2011, when it became clear that all the cash-strapped governments of Europe—and the Germans, too—were going to cut solar subsidies in 2012. First Solar (FSLR), for example, sold for $47.99 a share on December 7, but closed on April 18 at $21.36.

One more recent example—shares of natural gas producers. You would have been better off selling off the entire sector sometime after natural gas prices peaked in the summer of 2009. Shares of Chesapeake Energy (CHK) traded at $28.59 on September 28, 2009. They closed at $18.06 on April 18.

By better off, I mean simply that in these instances an investor would have lost a lot less money by throwing out the baby with the bath water and selling everything, rather than either holding on in the belief that the carnage would soon be over, or that some stocks in the sector would manage to escape the general bloodletting.

Why don’t we get this call right? Why, for example, am I sitting on shares of Banco Santander and solar cell producer Yingli Green Energy (YGE), for example, in my Dividend Income and Jubak’s Picks portfolios, respectively?

Because sometimes it’s hard to correctly identify the bath water. And because sometimes it’s hard to know exactly how deep the bath water will get. And sometimes because we want to make sure that we’ll be able to find the baby again.

Testing the Bath Water
Let’s see if recent history can teach us anything about doing a better—by which I mean more profitable—job with those babies and that bath water. I think I’ve found five baby-and-bath-water rules worth considering for the next market crisis.

Let’s start with the basic problem: Sometimes it’s hard to see the tub filling, and it’s almost always tough to know precisely where the water level will wind up.

Consider a more detailed visit to the chronology of the European debt crisis. Knowing what we know now, it’s easy to say that an investor should have tossed everything out the window in January 2010, when the extent of the Greek budget deficit deception became public.

Remember, however, that in the summer, Eurozone leaders came up with a fix, the first Greek bailout package. It was hard then to see that this would be a crisis that consumed not just Greece, but also Ireland, Portugal, Italy, and Spain.

Maybe the time to toss the bath water came in November 2010, with the Irish bailout package. I think that was certainly a big warning sign, since the Irish crisis was essentially set off by a real-estate boom and bust in an otherwise globally competitive economy. It would not have been a big stretch then to think that this crisis could spread to Spain, which had a real-estate boom and bust that resembled Ireland’s.

The market didn’t conclude that. In the case of my Spanish benchmark for this crisis, the ADRs of Banco Santander plunged to $8.77 on June 7, 2010, but rebounded to $13.46 by October 18. They would dip and then recover again, to $12.02 on February 11, 2011.

Here are my first two baby-and-bath-water lessons:

NEXT: The 5 Lessons

|pagebreak|

Lesson No. 1: One way to tell if any seeming crisis is a real one that deserves chucking the baby out the window—as opposed to a short-term panic where the sound strategy is to not only protect the baby but to buy shares—is that the market will show repeated dips and recoveries.

The crucial time in that cycle to be asking hard questions isn’t the dip—that’s the time to fend off mindless panic. The hard-question time is at the recovery.

And the question then is, "Has anything really been done to change the crisis?" If the answer is "no"—and I think that would have been a reasonable conclusion to draw in November—then the recovery isn’t real and it’s time to sell.

Lesson No. 2: Like bear markets, crises are punctuated by periods when the market swings toward unwarranted optimism. That means that even if you miss the first exit, you get other chances—if you’re not too stubborn to use them.

The worst thing you can do is hold on because you are determined to get back to even. Suffering a loss as Banco Santander goes from $14 to $10.80 is painful. Holding on just because you want to get back to $14 only multiplies the pain.

A crisis is a time of extreme stock price volatility. Sure, the overall trend is downward in a crisis, but the rallies inside that downtrend can be rather spectacular.

On January 6, 2012, the ADR of Banco Santander traded at $6.91. But on what turned out to be false hopes that the €1 trillion in three-year loans from the European Central Bank had fixed the problem, the ADRs moved up to $8.76 by February 9. That’s a 26.8% gain in a month. Not bad for a rally in a downtrend.

Of course, by April 13, the ADRs were back down to $6.40. Rallies don’t last long in a crisis. When fear, rightly in this case, reasserts itself, the gains evaporate. But that leads me to my third baby-with-the-bath-water rule.

Lesson No. 3: Use what you have learned about your stocks to make shorter-term trades during the crisis. If you don’t curl into a fetal ball because of the shame and pain of your losses, and if you don’t get hung up on getting back to even, you can make a profitable trade or two out of the extreme volatility of any crisis.

I’ve taken a lot of heat in the comments to my posts on my recent recommendation that you hold on to Banco Santander, trading at $6.34 on April 18 with a target price of $8.85. Many readers rightly noted that even if the stock got back to $8.85, it would still be well under the $10.20 price on May 28, 2010, when I added the ADRs to my Dividend Income Portfolio.

I won’t pretend that the almost 38% drop in the share price since then is anything other than painful. But it’s also irrelevant to the chance to make almost 40% now, if the current extreme fear is overstated and a rally, like the one in January, takes the price to $8.85—even if only temporarily.

You either agree or disagree with my argument for that price. If you agree, you shouldn’t let the drop from the May 2010 price stand in your way.

The European debt crisis and the market reaction to it also demonstrate that the bath water isn’t equally deep every place that’s touched by the crisis. Even a conservatively run, overcapitalized bank like Sweden’s Svenska Handelsbanken (SVNLF), which trades as SHBA.SS in Stockholm, takes a hit when fears rise that Spain might need a bailout.

From April 26 to September 8, 2011, for example, Svenska Handelsbanken shares fell 24.8%. But recently, while Spanish banks were getting killed, Svenska Handelsbanken barely budged. From March 14 through April 18, shares dropped 4.6%. That’s hardly a scratch on the 32.5% gain the shares recorded from November 24 through March 14.

Lesson No. 4: Your decision on whether to toss everything with the bath water should change as a crisis ages.

I’d argue that what has happened to Svenska Handelsbanken is typical of a long-lived crisis. In the initial stages, everybody sells everything, because the dimensions of the crisis and the mechanics of how the crisis impinges on a specific stock are relatively unknown.

Selling everything actually makes sense at this point; it allows you to sort out the nature of the crisis from the safety of cash. But as the crisis moves along, investors start to understand what makes a stock vulnerable and what qualities shelter it from some of the worst aspects of the crisis.

Right now, the big debate in Sweden isn’t over bad debts on bank balance sheets, or how banks are going to get access to the financial markets, but rather whether Swedish banks are raising too much capital.

Regulators have decided that Swedish banks need to target a 10% core Tier 1 risk-weighted capital ratio from January 2012, even though the new Basel III rules call for only a 7% capital ratio, and even though the European Banking Authority has set a 9% ratio for the most systemically important banks.

That has left Swedish banks such as Nordea (NRBAY), which trades as NDA.SS in Stockholm and is the largest Nordic lender, fuming that regulators are placing a huge handicap on the country’s banks.

Of course, Nordea is making those complaints while sporting an 11.2% capital ratio at the end of 2011. You don’t have to follow the ins and outs of the Euro debt crisis in great detail to know that Nordea and its Swedish competitors aren’t your typical Eurozone banks, and to go from that to treating them differently when fear rises across the sector.

My fifth baby-and-the-bath-water rule falls logically out of Rule No. 4.

Lesson No. 5: At some point in the aging of a crisis—past the stage when investors are discriminating between the exposure of individual stocks to the crisis—the "safer" stocks like Svenska Handelsbanken are no longer the best bets for big gains. Riskier stocks that have had more exposure to the crisis are likely to outperform going forward.

I think you can see this in the US banking sector, where US Bancorp (USB), one of the banks least damaged by the global financial crisis, clearly outperformed Wells Fargo (WFC), which took some hard hits back in August through December 2011.

Since the middle of February, however, and especially since mid-March, Wells Fargo has outperformed. The bank stock that took the harder hit in the crisis has become the outperformer as the crisis has faded.

You can see a similar pattern if you compare the performance of Wells Fargo with that of Bank of America (BAC), which was among the banks hardest hit by the crisis. From November 2011 through February 2012, Wells Fargo outgained Bank of America. Beginning in February, however, Bank of America has clearly been the faster horse in this race.

Putting These Rules to Work
How would I apply these five rules to some of the current stock market crises?

I’d say the solar crisis is still at such an early stage that throwing out the baby with the bath water makes sense. I wish I’d sold Yingli Green Energy while the crisis was still unfolding; I made the mistake of thinking that the Chinese government would boost demand for solar cells enough to keep Chinese companies reasonably safe from the global crisis. It didn’t happen that way.

Even though Chinese manufacturers such as Yingli are the likely winners in the crisis, I think the crisis is still getting worse, and the turn is very far away. The crisis is so deep that the sector isn’t likely to see a rally.

A spike like that of February 9 might be the best investors can expect. I’d sell on the next one of these and wait for the crisis to age.

The crisis among US natural gas producers is not quite as grim, and is somewhat more advanced. I’d still avoid the natural gas producers; they are simply too risky. This year is likely to see even more turmoil in the sector, because companies haven’t been able to protect themselves against low prices with hedges in the way that they did in 2011.

But the crisis is far enough along so that I think 2012 will bring gains to some of the oil-service stocks that have been hurt by the slowdown in North American drilling activity. Activity is shifting to North American oil drilling: In the short term, that hurts service-company profits.

But once the transition is further along, say, midyear, North American revenue should revive. Schlumberger (SLB) would be my pick as the stock that should lead the rebound with riskier oil-service company stocks to follow.

As for the Eurozone debt crisis, I think it remains a trading crisis in which you should focus on a few of the strongest but most volatile stocks. I think those babies are worth playing with in rallies, but don’t get too attached.

Full disclosure: I don’t own shares of any of the companies mentioned in this post in my personal portfolio. The mutual fund I manage, Jubak Global Equity Fund, may or may not now own positions in any stock mentioned in this post. The fund did own shares of Polypore International as of the end of September. For a full list of the stocks in the fund as of the end of September see the fund’s portfolio here.