Between February and October of 1945, the Dow Jones Industrial Average advanced 21.3%. Must have been a time of prosperity or a bubble, right?

Nope. Would you believe that this performance occurred during a recession? With the "recession" buzzword floating around these days, it's worth reflecting on what that uncharacteristic behavior can teach us.

A recent BusinessWeek article (note: you'll need to view the slideshow to see the interactive chart) reveals the stock market performance both during and one year following several American recessions.

Recessions aren't "bad"
Contrary to popular media opinion, not every single recession is bad for the investor. In the 1945, 1953-1954, and 1980 recessions, stock market returns behaved as if they were in a period of prosperity. As mentioned, during the recession of February to October 1945, the market actually jumped 21.3%.

Investors who are quick to head for the exits simply because there is a recession looming are forgetting one very important fact: The principal goal of an investor is to focus on acquiring strong businesses selling at attractive prices -- regardless of the market environment.

While you might experience a little volatility or find yourself waiting a period of months before any capital appreciation, that's the nature of the markets. Markets go up, markets go down, and markets go nowhere.

Market timing is useless
Before researching this article, I was not aware of the strong performance that occurred during some of these recessionary periods. Of course, the advancing markets were outnumbered by declining ones, but the notion that recessions simply destroy returns is not necessarily the case.

Sure, some companies behind consumer luxuries may be squeezed. If the economy is tough, penny-pinching consumers might cut back on their Starbucks (Nasdaq: SBUX) trips, or they may delay buying an iPod or iPhone from Apple (Nasdaq: AAPL). Indeed, that's part of the reason why these stocks have been hurt over the past few months.

The economy, though, still needs to function at some level. People will still need to eat, do laundry, brush their teeth, buy medicines, etc. This bodes well for dividend-paying consumer-staples powerhouses such as Procter & Gamble (NYSE: PG), Johnson & Johnson (NYSE: JNJ), and Kraft Foods (NYSE: KFT). Even Wal-Mart (NYSE: WMT) is a candidate to weather a recession; with consumers paying closer attention to their pocketbooks, the retailer's "everyday low prices" give it a leg up.

Recessions develop over time. There is no set formula that reveals to us when a recession begins and when it ends. By some accounts, we are currently in a recession. Others are predicting an upcoming recession. Waiting for the "end" will often lead to waiting until it's too late and missing out on a great buying opportunity. So the key, again, is to buy quality issues for cheap and be patient.

Invest in the company first, not the market cycle.

It's not the end of the world
What's most important about recessions is at some point, they cease and things pick up. You'd never guess that during a recession -- there's too much noise pronouncing doom and gloom.

But the facts speak for themselves. Not only do they end, but investors who exhibit patience are rewarded in the following year. Those who wait it out on the sidelines -- until the headlines provide a cheery consensus -- later come to realize that they joined the party shortly before midnight.

If you're ready to buy quality on the cheap -- and then to be patient -- and need a few ideas, consider a free trial of our Motley Fool Inside Value investing service. We specialize in identifying cheap, durable, out-of favor stocks that Wall Street simply isn't willing to look at. You can take a look at our lineup of recommendations (which are beating the market) with a no-obligation 30-day trial. Click here for more information.

Fool contributor Sham Gad is the managing partner of the Gad Partners Fund, a newly launched value-focused investment partnership modeled after the 1950s Buffett Partnerships. Starbucks is a Motley Fool Stock Advisor recommendation. Johnson & Johnson and Kraft are Income Investor selections. Wal-Mart is an Inside Value pick. The Fool has a disclosure policy.