The fundamentally cheapest stocks are usually the ones with the most perceived problems in the marketplace. Many hard-core value investors will completely ignore the short-term outlook so that they can find the best values in the market. Philosophically I agree with this strategy, but the market has reminded me many times that a stock can still fall -- sometimes significantly -- even if it appears fundamentally cheap and has a bright long-term outlook.

I've lost a chunk of money over the past two months in Dell (NASDAQ:DELL) stock. Reflecting on the situation, some statistics were telling me that there was a higher-than-normal chance that the stock would continue falling, even though it appeared attractively priced relative to my evaluation of its prospects two to five years hence.

Dell popped up on my radar as possibly being interesting after it had fallen from $42 last July to $30 earlier this year. Although the stock's valuation looked attractive on a price/sales and relative price/earnings basis, trends seemed bad enough that the stock could dip a little more. The company was the clear leader in the personal computer market, with a great worldwide infrastructure, strong management, an excellent balance sheet, and a phenomenal business model. Nonetheless, competition was intensifying and a major catalyst (computer upgrades tied to the launch of Windows Vista) was likely at least a year away.

When the stock broke down to around $26 in April, however, I dipped my toes in the water. I continued to build the position as the stock dropped into the lower twenties and drifted about. As I kept learning more about the situation, my enthusiasm for the long-term prospects of the company continued to increase. With the stock price down a bit further and my long-term confidence up, I increased Dell modestly above a 5% standard weighting in my portfolio.

As most of you know, the stock closed below $20 per share when it announced that earnings per share for its second quarter were going to be $0.21-$0.23 instead of the expected $0.32, well below the prior year's $0.38. The company is continuing to suffer from sluggish market share growth, intensified pricing competition, poor customer service, and a slowdown in market growth.

I still have high hopes for the stock and think it will ultimately work out well. In addition to a likely demand increase from Vista within two to three years, I think the product disadvantage from exclusively offering Intel (NASDAQ:INTC) chips will soon dissipate. Intel is in the midst of launching a series of new products that are more competitive than what they've offered in the recent past. Dell has also announced they will soon incorporate AMD (NYSE:AMD) chips in high-end servers. Management will most likely include AMD chips in a wider range of products, if necessary, to remain competitive.

Despite my enthusiasm, Dell should have been a smaller weighting in my portfolio. If I had pulled myself away from the long-term perspective, I would have seen several metrics that are warning flags that things could get worse before they get better. They are somewhat related, but when they're all present, the risk of additional bad news and a lower short-term stock price is higher than normal.

Short-term warning flags
1. Meaningful deterioration in year-over-year profit margins
In Dell's fiscal quarter that ended in May, operating margins fell to 6.7% from 8.8% in the prior year. In the most recent quarter, operating margin dropped to 4.3%. Looking at fiscal '07 estimates compared to fiscal '06, Value Line projected that operating margins would fall from 9.3% to 8%. Such a serious deterioration in margins indicates serious short-term company or industry challenges. These problems can be harder than normal to resolve, which increase the likelihood that additional negative news will emerge, driving the stock price lower.

2. Reduced year-over-year earnings per share
In the first quarter, Dell earned $0.33 per share, less than the $0.37 per share earned in the first quarter last year. More telling was that before the revised estimates, analysts were projecting that Dell's fiscal year earnings would also be down -- $1.38 per share versus the prior year's $1.56. Earnings incorporates more factors than operating margins, since it also captures the impact of sales and non-operating items like taxes and capital structure changes. Earnings and earnings growth, key components of metrics like price/earnings and PEG ratios, are primary valuation tools for stocks. Deterioration in them causes many investors to avoid a stock, while existing holders may consider selling -- particularly if additional bad news emerges.

3. Persistent negative earnings estimate revisions
Dell's earnings estimate revisions, which I pulled from Yahoo! (NASDAQ:YHOO) Finance before they were marked down, also flashed a warning sign, as they were down for every period listed. The August quarter earnings estimate dropped from $0.39 to $0.32, while the estimate for next quarter dropped to $0.25 from $0.35. The estimates for this year dropped from $1.38 to $1.11 seven days ago (down from $1.39 ninety days ago). Earnings estimates revisions provide insight into the direction company performance is headed. If trends are broadly and consistently negative, there's a higher-than-normal chance that conditions will continue to worsen.

Using the warning flags
Many investors (particularly professional money managers) have noticed these flags and won't invest in a company that exhibits any of the above characteristics. I don't think that's the best move; you'll miss some of the marketplace's best values, which result from bad current conditions and investor fear. Nonetheless, these metrics can help determine how much of an attractively valued stock you want to buy.

Even though a "normal" position in my portfolio is a 5% weighting, I typically have several "starter" positions of 1%-4%, and my most compelling idea may be as high as 15%. Barring unusual situations, it doesn't make sense to bring a holding above a 5% weighting if it exhibits all three warning flags. Even with a compelling valuation, the probability of an additional meaningful short-term price drop is too great. If the warning flags start to disappear and the valuation remains compelling, a stock becomes an excellent candidate to consider for building into an over-weighted position.

If I had taken off my long-term blinders and noticed that Dell exhibited all these warning flags, I would have capped my exposure at 5% (and possibly lower) before last month's warning. With a smaller position, I might have had money available to build the stock back up at the current, more attractive valuation. Since all of the warning flags are still present, however, I wouldn't have built the stock above a 5% weighting. That move needs to wait until at least one of the flags dissipates (typically the first to drop away will be lower earnings estimate revisions).

My instinctive response as a contrarian is to not follow the advice in the column. I want to build huge positions in stocks when they are most attractively priced. From a rational and intelligent portfolio perspective, however, it's important to remember that a key component of long-term investing success is controlling losses. By limiting exposure to situations with an abnormally high risk of meaningful short-term losses without forgoing too much upside potential, you'll likely enhance long-term returns.

Dell is a Motley Fool Inside Value and Motley Fool Stock Advisor pick. Intel is an Inside Value recommendation. Yahoo! is a Stock Advisor selection.

Fool contributor Warren Gump owns shares of Dell. The Fool has a disclosure policy.