You knew that once everyone stopped panicking, the market would turn on a dime. And turn it did yesterday, with record point gains for the Dow and S&P 500. That, along with the bank capital infusions announced yesterday, convinced at least some people that the worst is finally behind us.

So as investors turn their minds back from fear to greed, you probably want to know which stocks are best poised to rebound from their losses. The most important factor involved in answering that question comes from one simple statement: If the market's drop was irrational, then stocks that have suffered the most will now likely bounce the highest.

Measuring rationality
Of course, not everyone's convinced that the market's drop really was irrational. Threats of the wholesale destruction of the financial system may have found promising solutions, thanks to coordinated action from governments around the world. But many analysts are still looking for a global slowdown that could limit gains for stocks. Moreover, some sectors -- financials, most notably -- may find themselves transformed permanently, in ways that will make companies less profitable and therefore keep stock prices down.

Nevertheless, from Monday's rebound, it's pretty clear that many of the most beaten-down stocks in recent days were among the top contributors to the Monday's record gains:

Stock

Loss 10/3 - 10/10

Gain 10/13

Reliant Energy (NYSE:RRI)

(45.1%)

89.6%

Morgan Stanley (NYSE:MS)

(59.5%)

87%

Mechel OAO (NYSE:MTL)

(44.9%)

44.9%

Dryships (NASDAQ:DRYS)

(42.8%)

26%

General Motors (NYSE:GM)

(45.7%)

33.1%

Petroleo Brasileiro (NYSE:PBR)

(28.9%)

30.3%

UnitedHealth Group (NYSE:UNH)

(28%)

34.8%

Source: Yahoo! Finance.

Although these companies represent different industries, different stock sizes, and even different locations around the globe, there's definitely a pattern. A close look at all of yesterday's top-gaining stocks shows a concentration in the financial, energy, and materials sectors. Yet just as the smackdown in stocks has spared nearly no one from losses, you can see gains from the inevitable bounce in nearly every market niche.

The real question, though: Can it last?

One day doesn't make a bull market
Personally, I don't think the market's in the clear yet. Although markets have been happy to buy based solely on the announcements of pending actions to unclog the financial system, the actions themselves will take time to work. And as a reality check, bear in mind that yesterday's record-breaking performance gained back only about half of what the markets lost in just last week -- let alone the huge losses in the past year.

When the market pushes stocks down sharply across the board, you can expect to see indiscriminate gains in a relief rally. If the credit markets stabilize, and global government action produces results, all stocks should benefit for a while.

Get an edge
But while the recovery honeymoon for the markets may last for a few weeks, some companies will emerge with larger competitive advantages than they had before the crisis. Smart investors will realize this and start scoping out the best of the bunch as targets for their buying. Just as individual investors will succeed in buying stocks at bargain-basement prices, cash-rich companies with an eye toward acquiring competitors or strategic partners on the cheap will find some amazing opportunities.

In contrast, companies with large amounts of debt will find themselves without the unlimited flexibility they had when credit was easy. And many financial firms will continue to struggle, especially if the exact terms for future capital infusions prove onerous.

For now, though, the market's trashing of nearly all stocks is an irrational response to the stresses in the financial system. The best strategy for beating that irrational market is to identify superior companies with outstanding prospects, and let falling stock prices bring shares to your portfolio at bargain prices. It's true that you may not get another opportunity like you had last week. But even if you don't, the market's still off one-third from its highs -- and there are plenty of deals left for investors to take advantage of.

More on the market's recent ups and downs:

If you prefer to pick up great companies when their share prices are low, you'll want to read the latest issue of Motley Fool Inside Value. Each month, you get in-depth analysis of great value stocks, along with tips on how to avoid value traps. Best of all, the newsletter itself is a value -- absolutely free with a 30-day trial.

Fool contributor Dan Caplinger uses every trick in the book to try to value stocks -- not always successfully. He doesn't own shares of the companies mentioned in this article. Petroleo Brasileiro is a Income Investor recommendation. The Fool owns shares of UnitedHealth Group, which got the nod from both Stock Advisor pick and Inside Value. Try any of our Foolish newsletter services free for 30 days. The Fool's disclosure policy is a great value.