An understatement: We are living through a time of considerable market and economic turmoil. Since we stand to see trillions of dollars' worth of assets vaporize in the ensuing mess, we ought to take a look at history to see how we got into it, and how investors can get out.

Half a decade ago, the entire nation was shocked when award-winning "innovator" Enron turned out to be little more than a cash-shredding pyramid scheme. The crucial failing for investors was Enron's use of opaque, "mark-to-market" accounting. The problem comes when the market is batty (or doesn't exist), so you instead mark your assets to a model, especially one that's wrong, either because you made an error or because you based it on exceedingly generous assumptions.

In the end, we learned that Enron's accounting was pretty much mark-to-fairy-tale, with the company booking enormous gains from assumed future profits on schemes (like bandwidth trading) that sounded great, but had little chance of producing anything besides headlines.

Andy Fastow, meet Fred and Ethel
You might think we'd learned our lessons about fantasy accounting after Enron, but you would be wrong. Things actually got worse. The infection moved to the comfy-sounding "homeownership" market. Against a star-spangled, feel-good backdrop touting the "American Dream," our recent mark-to-model mania tripped up a lot more than one big company. In fact, it swept through the entire banking world. (Lehman Brothers (NYSE: LEH) and Bank of America (NYSE: BAC) were not the first to choke on the bones in those poorly modeled mortgage-backed securities, and I'll eat a Miami condo if they're the last.)

But more dangerous yet was the way this mania also infected millions of aspiring real-estate moguls. The most widespread mark-to-model fantasies were actually committed not by some easy-to-blame Wall Street suit, but by Fred and Ethel down the street.

It was flawed models (and the habit of booking earnings on these models) that enabled financial companies to concoct the elaborate securities that funded the bubble. And yes, the bank CEOs who paid themselves handsome bonuses ahead of the hurricane deserve a public flogging. But they weren't the only ones making out like bandits. While Wall Street was booking fantasy profits on bad assumptions about real estate, Fred and Ethel down the street were operating under their own mark-to-model dreams.

Really ...
In their model, house prices always go up. In their model, you can pay any price for a home, so long as you can make the monthlies with a teaser-rate ARM, never mind the upcoming adjustment to 9%. In their model, you avoid that via a refinance down the line with an equity cash-out to boot. In their model, it's OK to buy on a less-than-forthcoming, Alt-A "liar's loan," because there's no real punishment for lying on a mortgage application -- particularly if everyone's doing it. With this model, it makes sense to buy three other homes, in order to flip them later. And it makes sense to extract HELOC cash from the home, based on fantasies about continually increasing "equity."

This is not so different from what Enron was doing. Fred and Ethel were marking up the value of their assets (the home) to a model (their belief that real estate prices always go up) and then spending the "income" immediately, on iPods, Hummers, $250 jeans, and fancy vacations. This happened all over the country, and millions of people behaved the same way. In fact, the American Fantasy of owning a home (for no money down) that would provide leveraged, 10% annual returns for a decade, is precisely what enabled those Wall Street suits to do what they did. It takes two to tango, folks. And this was the biggest dance party in economic history.

Last year's model got ugly
Alas, this dream's "income" wasn't actually matched by real cash flows, just bank loans -- precisely the problem at Enron. The "income" was all hot air. And now that the "income" from home appreciation has turned negative, it must be supported by cash mortgage payments. But many people can't pay those bills, the mortgages are defaulting in huge numbers, and now we are all paying a price, even those of us who didn't throw our money into a flimsy, overpriced McMansion.

Stocks have been creamed. The losses at those companies most directly victimized by their own housing-bubble ineptitude -- Bear Stearns, Thornburg Mortgage (NYSE: TMA), and Merrill Lynch (NYSE: MER) -- are easy to understand. But, of course, the losses have extended much further than that. Even once-proud Crocs and Lululemon Athletica (Nasdaq: LULU) have dropped like rocks, as investors wonder how foam clogs and pricey yoga shirts can be sold to the denizens of Foreclosureville, U.S.A.

And if they can't afford their beloved pricey clothing, what will they buy? That's the thinking that has crushed other trendy togs-sellers like American Eagle Outfitters (NYSE: AEO) and pummeled the companies behind big-ticket items, such as hotel operators like Marriott International (NYSE: MAR). Consumers are spending less, and we appear to be headed directly into a recession.

So ugly it's cute?
By now, it ought to be clear that I have been, and remain, one of the most vocal econo-bears you will find on these pages. I am certain that systemic failure has steered us into a terrifying run at the ditch, to be followed by a painful, protracted rough patch. It was all spawned by greed gone amok on Wall Street and Main Street. Yet I believe history will prove this to be one of the best times to have invested in stocks, especially attractive-priced small caps. Here's why:

  • The market is in panic mode, and when markets panic, no one's thinking.
  • Small caps have been crushed more than the rest of the market, as investors seek "safe" large caps.
  • Over time, value-priced small caps produce some of the most amazing returns in the market. Really.
  • There are loads of small caps out there poised for years, if not decades, of fantastic growth, but the market is pricing them as if they are dead and buried.

The not-so dead and buried
Take oven-maker extraordinaire Middleby, down nearly 20% so far this year, despite amazing returns on equity and capital, and its leading position in a megatrend -- the global move toward dining out. Or consider the abovementioned American Eagle, which has a strong and growing brand, a solid balance sheet, yet is priced for a decade of subpar growth. Yes, the uncertainty ahead means a rough ride, and some of the small caps out there won't survive, which is why, at Motley Fool Hidden Gems, we advise opportunistic buying of cash-strong companies, long-term holds, and, above all, a steady temperament.

At Gems, we're on the dig, 24-7, for solid small caps with the capital to survive the downturn, and the superior businesses destined for major growth once things turn -- and they always do. In the next issue, we'll be reviewing the recommendations and finding the best bargains for new money.

If you'd like to take advantage of the market's panic and lay the groundwork for some great future gains, a free trial is just a click away.

This article was first published March 20, 2008. It has been updated.

Seth Jayson, a top-20 CAPS player, is also co-advisor at Motley Fool Hidden Gems. At the time of publication, he owned shares of American Eagle Outfitters, but had no positions in any other company mentioned here. View his stock holdings and Fool profile here. Middleby is a Hidden Gems recommendation. Bank of America is an Income Investor recommendation. The Motley Fool owns shares of American Eagle, which is a recommendation of Motley Fool Stock Advisor. Fool rules are here.