Market slumps (a bear market is defined as a 20% fall from a recent peak) can be awfully disheartening, leading many investors to simply throw in the towel and avoid the stock market altogether.

That's a bad move.

Many studies show that stocks deliver better returns than bonds and cash -- on a multi-decade time-frame -- and to avoid the stock market completely makes it that much harder to build a substantial retirement nest egg.

Instead of simply avoiding stocks, it's better to just avoid the stocks that present the greatest risk.

Lower-risk stocks allow you to sleep better at night while still delivering robust long-term gains.

These relatively safe stocks come in many forms, but they share a few key traits.

Here's what you need to look for.

Safe Stock Trait #1: Stable and Rising Dividends

Companies that pay dividends tend to be quite mature. They've been around a long time and they know their industries fairly well. Whether it's a local electric utility such as Con Edison (NYSE: ED) or a food giant like Kraft (NYSE: KFT), you're buying a proven track record, and really don't need to worry that a weak economy will derail business.

More important, those dividend yields are like a magnet for fearful investors in trying times. If a dividend paying stock falls in price, its dividend yield rises, which simply brings in fresh buying support and a rebounding stock price. Companies like the ones mentioned above generally pay 3% to 4%.

[Certain companies are experts at surviving and even thriving in tough markets. We've selected a group of stocks that have a history of paying solid (and growing) dividend payments in our list of '10 Best Stocks to Hold Forever.' One of the stocks has made 89 consecutive payments... and has grown its dividends by 28.9% since 2004. Visit this page to hear more about our list of stocks to hold 'forever.']

Safe Stock Trait #2: A History of Rising Sales and Profits

A wide range of companies manage to boost sales and profits in all kinds of economic environments. For example, hospital supplier Abbott Labs (NYSE: ABT) has boosted sales every year for the last 20 years. Recession or not, sales are likely to hold up in 2012 as well.

That's not something most companies can be sure of. While most companies don't see increasing sales revenues every year, some -- like Apple (NYSE: AAPL) -- do. Start looking at income statements to find further examples of great companies with strong revenue growth.

Safe Stock Trait #3: Strong and Steady Free Cash Flow

If there was a silver lining to the troubles of 2008 and 2009, it's that we got to see what companies are really made of when the going gets tough.

As I mentioned in a previous article, 'Making the Most of Today's Volatile Market', free cash flow (FCF) works as an even better success indicator than net income, because it shows how much cash a company has to reduce its debt, develop new products, build its savings or expand.

A number of companies still managed to generate a considerable amount of free cash flow (which is defined as operating profit minus capital expenditures) during those tough times, which means they'll likely keep doing so even if the economy slips back into recession.

As an example, technology firm Dell (Nasdaq: DELL) typically earns more than $3 billion in free cash flow every year. Fiscal (January) 2009 was a real challenge: Sales fell 13% and free cash flow slipped to $1.5 billion. That's still an impressive take, and explains how Dell has managed to pump more than $17 billion in cash onto its current balance sheet. Healthy free cash flows like these allow a company to build a cash buffer and/or respond quickly to changing market conditions.

Safe Stock Trait #4: Bullet-Proof Balance Sheets

The balance sheet should always be your focus when the economy hits a rough stretch. Companies with lots of cash and little debt can ride out tough times without flinching and may even be able to aggressively take market share if financially weaker rivals need to retrench during a downturn.

Look at memory chip maker Micron Technology (NYSE: MU) as an example. The company's stock is under pressure right now as prices for memory chips fall. The good news: Micron's three main rivals -- all headquartered in Asia -- carry a lot of debt and really can't afford to lose more money, so they'll have to cut back production of these chips.

Because Micron is sitting on more than $2 billion in cash, the company is able to make heavy investments in new products, which will allow them to grow unlike its beleaguered rivals that are struggling to simply avoid burning any more cash.

Safe Stock Trait #5: Defensive Positions

Finally, you can focus on companies that actually see rising demand in a weakening economy. For example, when consumers are cutting back, they tend to hold on to their cars longer. As a result, retailers that sell auto parts or repair vehicles are a defensive play.

Auto repair chain Monro Muffler (Nasdaq: MNRO) saw sales rise only 5% in fiscal (March) 2008 as sales of new cars in previous years had been robust. Yet as the economy slowed, and cars grew older, Monro's sales climbed by a cumulative 33% over the next two years. Other defensive stocks include discount stores like Family Dollar (NYSE: FD) and value-oriented dining chains like McDonalds (NYSE: MCD).

[Learn more about defensive stocks: Where to Find Recession-Proof Stocks in Today's Market]

The Investing Answer: The outlook for the economy, the stock market and many individual stocks may remains bleak in the quarters ahead. But a wide range of companies are still quite appealing, whether they sport strong balance sheets, consistently generate solid cash flow, or simply offer an impressive and sustainable dividend yield. These are the safest ships on the stormy seas.