If you missed the best week to buy stocks, you might be kicking yourself. I know I am. The market is, after all, up 51% 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 six 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. Hertz Global (NYSE: HTZ) and Macy's (NYSE: M), for example, were at one point in March trading below $2 and $7, respectively.

Both companies have naturally been under tremendous pressure to shore up capital: Hertz responded by selling more equity, both companies cut jobs, and Macy's sliced its dividend by 63%.

Since March 9, Hertz shares have gained 363% and Macy's 120%. These are just two examples of the recent "dash to trash" in this market rally.

Consider the profile of the 497 U.S.-based companies with current market caps of more than $500 million whose shares have gained more than 100% since March 9:

 

Debt-to-Equity

Net Income (LTM)

Return on Capital

Median

68%

($15.6 million)

4.4%

Source: Capital IQ, as of Sept. 4.

Put simply, this rally has 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 because 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

Johnson & Johnson (NYSE: JNJ)

13.7

27.5%

3M (NYSE: MMM)

15.8

24.2%

Coach (NYSE: COH)

16.6

39.1%

Amgen (Nasdaq: AMGN)

12.7

22.5%

Medtronic (NYSE: MDT)

13.5

22.5%

Source: Capital IQ.

Given their size, you shouldn't expect any of these companies to become a seven-bagger in a matter of six months the way Ruby Tuesday has, but you can sleep a little better at night knowing that your management team isn't slashing dividends or selling assets just to pay the bills.

In fact, in the past year, Johnson & Johnson, 3M, and Medtronic raised their dividend payouts and Coach announced its first-ever dividend. Amgen doesn't pay a dividend, but returns value to shareholders by repurchasing shares each year.

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.

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 watch list of stocks that 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 Netflix, 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 Reed Hastings, who is also the founder of 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.

This article was first published on July 7, 2009. It has been updated.

Todd Wenning hopes you're having a pleasant day. He does not own shares of any company mentioned. Coach is a Motley Fool Stock Advisor pick. 3M is an Inside Value pick. Johnson & Johnson is an Income Investor selection. The Fool owns shares of Medtronic. The Fool's disclosure policy takes out the trash.