How many times have you read or heard someone predict that such-and-such retail company is on the verge of bankruptcy? And how many times did that not actually happen? My guess is many. Maybe you've even thought or said something along these lines yourself. I certainly have.

During the last few years, one after another brick-and-mortar retailer has fallen victim to the e-commerce juggernaut Amazon.com. The first wave of failures, catalyzed by the financial crisis, claimed the lives of Borders, Circuit City, and Linens 'n Things. Now, a second wave is gathering strength in the distance. In its path are Barnes & Noble, Best Buy, and RadioShack. Indeed, even Wal-Mart's domestic division seems stuck in a downward spiral of negative same-store sales.

If you're an investor, this begs an important question: Is it possible to distinguish an existential crisis at a retail chain from one that's serious, but temporary, and therefore survivable? If you can do so, not only could you sidestep a horrible investment, but you could also profit from an eventual drop or rebound in the underlying company's stock.

Why it's hard to forecast failure

One of the reasons it's hard to predict if and when a company will go under is because bankruptcy isn't simply a matter of solvency -- that is, of having more assets than liabilities. If this were the case, even a novice investor would be able to forecast the downfall of the most complex publicly traded corporation. All it would take is a cursory glance at the shareholders' equity portion of the balance sheet.

This doesn't mean solvency isn't important; because it is. But it's nevertheless rarely the precipitating cause of failure. The downfall of former electronics giant Circuit City provides a textbook case. When it filed for bankruptcy at the end of 2008, it was the nation's second-largest electronics retailer, with more than 700 superstores located in retail shopping centers across the country. And more to the point, its final balance sheet listed $3.4 billion in assets versus $2.3 billion in liabilities. Thus, not only was Circuit City solvent, its book value exceeded $1 billion.

If solvency isn't the issue, what is? The answer is liquidity. When a company is in its final throes, the most acute problem it faces is the inability to convert assets into cash, which can then be used to buy inventory and satisfy expenses like rent and wages. This happens when creditors lose faith in a company and stop accepting its assets as collateral for lines of credit. It's this, in turn, which triggers the actual demise.

Take this announcement from Circuit City a week before it went bankrupt:

Following the company's second-quarter results, the company's liquidity position and the sharply worsened overall economic environment led some of Circuit City's vendors to take restrictive actions with respect to payment terms and the credit they make available to the company...including in some cases not providing customary increases in credit lines for holiday purchases.

And the same was true at Linens 'n Things, which was solvent to the tune of $323 million at the time of its failure in May 2008. Here's what it said two weeks before doing so:

The rapidly increasing financial storm outside the company, together with our operating results, has accelerated credit and insurance problems for our vendors, causing them to recently begin imposing significantly more restrictive payment terms. These factors have had a dramatic effect on our liquidity outlook for the remainder of the year. We have made the decision to postpone today's interest payment as we continue to work with our constituencies to explore a number of alternatives to strengthen our balance sheet and improve liquidity.

Finally, while former-bookseller Borders Group was technically insolvent when it sought bankruptcy protection at the beginning of 2011, it, too, acknowledged that illiquidity was the final straw:

During the third quarter, our borrowing capacity under our revolving credit facility was reduced as a result of a third party valuation that lowered the estimated liquidation value of our inventory. Due to this and other factors, including our lower than projected sales, we are taking several actions to improve our liquidity. At the present time, we are in detailed discussions with potential lenders for replacement financing that we believe will provide sufficient liquidity through at least the beginning of 2012.

It probably goes without saying that Borders was unsuccessful in its efforts to secure replacement financing. Two weeks later, it announced the decision to "delay payments to certain parties -- vendors, landlords, and others." And less than a month after that, it went kaput.

A framework for assessing liquidity

The fact that illiquidity is typically the cause of a retail company's failure presents a problem for the average investor. This is because it's far harder to compute than solvency.

The conventional approach is to compare a company's current assets -- such as cash, inventory, and accounts receivable -- to current liabilities -- namely, debts and obligations that will come due within a year. But this measure, known as the current ratio, can be misleading because it includes inventory and receivables, which often can't be converted into cash at face value on sufficiently short notice, and because it ignores cash flow, which is the very essence of liquidity.

On top of this, there's a subjective element to liquidity that can't be captured in financial statements. This follows from the fact that a company's liquidity depends on its creditors. And its creditors are less interested in shorthand measures of fiscal health like the current ratio, and much more concerned with beating competing creditors to the punch, thereby securing repayment before it's too late.

It's for these reasons that a retail company's chances of suffering a fatal liquidity crisis can best be gauged with two questions. First, does the company have a history of sustained and accelerating quarterly losses? This matters because losses erode book value, which is a proxy for a company's ability to borrow. And second, are the company's operations burning through more cash than they're generating? If so, then the company has a serious problem on its hands because its cash coffers aren't being replenished -- a fact that won't go unnoticed by creditors.

The recent experience of RadioShack offers an instructive example. During the last few years, its net income has fallen precipitously, culminating in an ongoing streak of nine consecutive quarterly losses. This trend has wreaked havoc on RadioShack's book value, reducing it by a staggering 91% during the last 12 quarters. Its latest estimate pegs the figure at a mere $73 million. Meanwhile, the electronic retailer's free cash flow is also in a perilous state. In the last two quarters alone, its operations burned through $200 million more in cash than they generated. Things have gotten so bad recently that the New York Stock Exchange is threatening to delist RadioShack's stock.

A similar story is unfolding at J.C. Penney -- though the concern, while great, is not as acute as it is in RadioShack's case. Following a bungled rebranding attempt initiated by a former CEO, the department store chain has lost a total of $2.9 billion during the last three years. This has driven its book value down by 42%, and leaves it with a net worth of only $2.8 billion. And even more disturbing than this is the speed at which J.C. Penney is burning through cash. At its current run rate, its operations are consuming an average of $307 million more in free cash flow each quarter than they generate.

By contrast, if you use this framework to assess the fiscal health of Walmart, it becomes clear that predictions of the discount retailer's impending demise are greatly exaggerated. Despite an uncharacteristic and problematic series of negative same-store sales in its U.S. division, the Arkansas-based company continues to be both extremely profitable and liquid. It typically earns between $3.5 billion and $4.5 billion each quarter, and generates billions of dollars in free cash flow. The net result is that Wal-Mart's book value continues to grow, albeit at a slower rate than it did during the first few decades of the retail giant's existence.

The bottom line on predicting failure

The point here is that identifying companies on the verge of failure is both harder and easier than it's often made out to be. It's harder because the analysis calls for more than a simple assessment of solvency. But it's easier because there are two alternative questions that investors can use to gauge whether a company is facing an existential crisis like RadioShack, or rather one that's serious, but temporary, and survivable like Walmart.

This is an important lesson for investors looking to profit from stocks in companies that are flirting with disaster. If you guess right, the returns can be extraordinary. But if you guess wrong, then you could lose your entire investment. It's for the latter reason, in turn, that speculating like this should only be undertaken by the most experienced and risk-averse investors.