If you missed the best week to buy stocks, you might be kicking yourself. I know I am. The market is, after all, up 32% from its March 9 low.

But just as it was unwise to panic-sell when everyone around us was losing their heads, it's equally unwise to panic-buy now that the market is in rally mode.

The sudden switch in investor sentiment -- from stocking up on gold, potatoes, and ammunition in early March to "everything's going to be OK" just four months later -- is reason enough to be skeptical of this rally.

The key to investing success, as always, is being patient and continuing to buy quality companies trading at good values. This rally, however, has largely been led by inferior companies that had been heavily shorted and left on death's doorstep.

Trying to hitch a ride on them now may be tempting, but proceed with caution.

Garbage pail kids
Following a string of notable bankruptcies, from retailers like Circuit City to once-vaunted financial institutions like Lehman Brothers, investors rightly began to wonder who would be the next to fall.

Indeed, the futures of a number of well-known but heavily indebted American institutions were in serious doubt. International Paper (NYSE:IP) and MGM Mirage (NYSE:MGM), for example, were at one point trading at $4 and $2, respectively. Both companies have naturally been under tremendous pressure to shore up capital and responded by selling assets, refinancing existing debt, and -- in the case of International Paper -- slicing the dividend by 90%.

Since March 9, International Paper shares have gained 237% and MGM Mirage 154%. These are just two examples of the recent "dash to trash" in this market rally. Consider the profile of the 340 US-based companies with current market caps over $300 million that have gained more than 100% since March 9:

 

Debt-to-Equity

Net Income (LTM)

Return on Capital

Median

90%

($47.9 million)

4.1%

Source: Capital IQ, as of July 6, 2009.

Put simply, this rally's been largely led by weak hands. While it may be tempting to jump on this bandwagon now, these are the worst stocks to buy today, especially since we're not completely out of the economic woods just yet. If things take a turn for the worse again, chasing these stocks could be a very costly mistake.

Instead, investors (as opposed to speculators) should focus on profitable companies that generate free cash flow, that have a track record of rewarding shareholders with efficient use of capital, and that have strong balance sheets.

These are the types of companies that will emerge from macroeconomic turmoil even stronger than before.

Names, please
Despite the recent rally, there are still many quality companies trading at reasonable valuations that are worth further research, including the following.

Company

Price to Free Cash Flow

Return on Equity

Cisco Systems (NASDAQ:CSCO)

10.4

20.1%

Procter & Gamble (NYSE:PG)

13.6

18.5%

Hewlett-Packard (NYSE:HPQ)

9.6

19.6%

Oracle (NASDAQ:ORCL)

13.4

23.2%

Adobe (NASDAQ:ADBE)

13.1

16.3%

Source: Capital IQ.

Given their size, you shouldn't expect any of these companies to become a six-bagger in a matter of weeks the way Ruby Tuesday did recently, but you can sleep a little better at night knowing your management team isn't slashing dividends or selling assets just to pay the bills. In fact, Oracle just announced its first regular dividend, and in April, Procter & Gamble marked its 53rd consecutive year of increased dividend payouts by boosting its payout 10%.

Foolish bottom line
After sustaining significant losses over the past year, it may be tempting to chase after struggling companies that have had huge run-ups in this rally, but do your best to not lead yourself into that temptation. If buying distressed stocks was a gamble in early March, it's an even bigger gamble now that many have soared in price. Another downturn in the market and they could be going from heroes back to zeroes -- literally.

The market's still a volatile place, so remember to stay patient and focused on buying the companies that actually turn a profit, have strong balance sheets, and are led by top-notch management. Begin by building a watchlist of stocks you'd love to own if they fall another 10% to 20%. This way, you're ready to strike when the market gives you the opportunity.

Want to get started? You could do worse than to start your research with Costco Wholesale, one of Fool co-founder Tom Gardner's recommended core holdings for Motley Fool Stock Advisor. It's a consistent free cash flow generator and is led by one of the country's top CEOs in Jim Senegal, who also co-founded the company.

If you'd like to learn about the other stocks we're recommending at Stock Advisor, a free 30-day trial of the service is yours. Just click here to get started.

Already a Stock Advisor subscriber? Log in at the top of this page.

Todd Wenning hopes you're having a pleasant day. He owns shares of Procter & Gamble, which is a Motley Fool Income Investor selection. Costco is a Stock Advisor and Inside Value choice. The Fool owns shares of Procter & Gamble and Costco. The Fool's disclosure policy takes out the trash.