If you've been investing the past couple of years, you don't need to be told that risk matters now more than ever. After all, in 2007, 28,322 businesses filed for bankruptcy, while 14,319 filed in the first quarter of 2009 alone.

That's one reason you need to be cautious when investing these days. It's not enough to look at the income a company's generating. You have to consider the viability of the business and the factors that could cause it to fail.

It burns! It burns!
The most obvious way a company can collapse is by consistently burning more cash than it brings in -- and that can happen even when it's reporting profits. A company may book income today, but only convert that asset into cash years down the road.

For instance, before the credit markets locked up, First Marblehead's (NYSE:FMD) business was securitizing student loans. The company would bundle loans into asset-backed security tranches, then sell most of them while keeping a portion for itself. It would book its tranche immediately as income -- as it was required to do by accounting rules -- even though it wouldn't receive cash from the tranche for years. 

A company could also burn cash while reporting profits by making capital expenditures significantly in excess of the amount that it books for depreciation. Since only depreciation shows up on the income statement, a company's income could look fine, even with the company bleeding cash.

To avoid these snares, carefully examine the company's cash flow statement so that you can truly see how much cash the business is generating. Investors who followed this strategy could have avoided investing in WorldCom before it collapsed.

A stick and a fulcrum
Another cause of dramatic collapses is leverage. Leverage can be great at magnifying the upside, but it can equally magnify the downside.

It probably isn't a coincidence that Bear Stearns and Lehman Brothers, which had survived and prospered for decades, died a few years after they were allowed to increase their leverage from 10-to-1 to more than 30-to-1.

At 30-to-1 leverage, a company only needs its assets to go down by 3.5% to completely wipe out its equity.

So pay particular attention to leverage. That's not to say that you should only buy businesses with no debt. Banking, for instance, only makes sense as a business because banks are able to leverage their equity to turn slim interest rate spreads into reasonable profits.

Rather, compare the business to others in its industry and to simple common sense. Though Morgan Stanley (NYSE:MS) and Merrill Lynch survived leveraging themselves close to 30-to-1, it should be obvious to anyone but an investment banker that that sort of leverage is extremely risky.

Risky business
Even outside of industries that rely on leverage, risky business models can lead to bankruptcy. Take AIG (NYSE:AIG), once considered among the biggest and safest insurers. AIG's business model involves assessing the risk of bad events happening, pricing insurance based on those risks and ensuring that single or multiple big events cannot destroy the business.

But AIG made one little mistake -- it didn't recognize when it sold credit default swaps that credit defaults can be highly correlated in an over-leveraged, collapsing economy. The result is that AIG is now essentially owned by the government.

You could argue that this was one bad decision by AIG, simple bad luck instead of a risky business model. But its business model didn't sufficiently prevent its taking on gobs of extra risk, which strikes me as a problem of the model.

Some companies and industries are inherently risky -- think new technology or development-stage biotech businesses. But even a company with significant revenue can be vulnerable if it has only one product.

QLT (NASDAQ:QLTI), for example, was doing well when its primary drug, Visudyne, was considered the best treatment for macular degeneration, but struggled greatly when competing medications entered the market.

The Foolish bottom line
Generally, outstanding businesses generate large amounts of cash, don't need to employ high leverage to achieve excellent returns, and cannot be struck down by a single adverse event.

Microsoft (NASDAQ:MSFT), for instance, has been profitably growing for decades with minimal debt, despite battling IBM (NYSE:IBM), Oracle (NASDAQ:ORCL), and even the U.S. Department of Justice. Not only is it unlikely to go bust, it's the sort of business in which you should consider investing.

Of course, during more usual market environments, it can be difficult to find these sorts of excellent businesses at reasonable prices, but thanks to the recent market volatility, you can. There's no need to buy risky companies that have any chance of failure when there are so many amazing companies trading cheaply today.

If you're interested in ideas, our Motley Fool Inside Value team has recently identified the eight stocks that we think should comprise the core of a value portfolio. You can read about them with a free trial. Just click here to get started.

Already subscribe to Inside Value? Log in at the top of this page.

Fool contributor Richard Gibbons has been accused of burning cash in the back yard by the light of a full moon. Microsoft is a Motley Fool Inside Value recommendation. The Fool's disclosure policy is good friends with the photocopier.