Investors, it seems, are getting antsy. They're starting to realize that true bargains in stocks are very hard to come by -- a fact highlighted in Warren Buffett's recent letter to shareholders of Berkshire Hathaway. If the reigning king of successful investors can't find a bargain out there, Fool readers are asking, does this mean it's time to sell?

To which I reply with a question of my own: "Um, time to sell what?"

Could you be more specific?
Both are important questions, of course. But my question is better. Because when investors ask, "Is it time to sell?" they're making the unspoken assumption that all stocks are created equal -- if "The Market" is overpriced, they figure, then it doesn't really matter whether you own ChipMOS Technologies (NASDAQ:IMOS), Apollo Group (NASDAQ:APOL), or Advanced Micro Devices (NYSE:AMD). If the market's overpriced, you oughta sell 'em all.

Nonsense. It's entirely possible for the market as a whole to be overvalued yet include stocks that are grossly overvalued, fairly priced, and, yes, undervalued, too. To illustrate, let's take a look at one of the most widely used methods for determining fair value: the PEG ratio. A PEG is a company's price-to-earnings ratio (P/E) divided by its growth rate (G). When a company's PEG equals 1.0, it's probably close to fairly valued. The higher the PEG, the pricier; the lower the PEG, the cheaper.

Currently, the S&P 500, which we can use as a proxy for the market at large, has a PEG of 1.5. So Buffett is right in arguing that the market is expensive. (Big surprise. The guy is a genius, after all.) But among companies that make up the S&P 500, valuations vary widely. For example, at a PEG of 3.0, AMD is twice as "overvalued" as the average American company, while Apollo Group, at a PEG of 1.1, is pretty close to fairly valued. And ChipMOS? At a PEG of 0.4, that one might even be a bargain -- an underpriced stock in an overpriced market. Who'd have thought?

Us, that's who
As small-cap value investors, our team here at Motley Fool Hidden Gems knows that there's value to be found in even the most overpriced of markets. We actively seek out the best values in small companies, and to date, our members have been well rewarded for the effort: We're trouncing the S&P's return by nearly 4-to-1.

Perversely, that's created a bit of a dilemma for many of our members. They've seen their stakes in companies such as FARO Technologies (NASDAQ:FARO), Transkaryotic Therapies, Middleby, and Saucony all more than double in value over the course of a few months. And some are beginning to wonder whether it's time to take some winnings off the table. To perhaps invest that money in a few of our other recommendations. Or to just stash it away until the market in general becomes cheaper.

Easy question first
First things first. No, I do not believe you should sell stocks that have performed well and put that money in a mason jar buried in the backyard or in a savings account -- a near equivalent at today's interest rates -- in hopes that the market turns south so that you can buy back into it.

Do you remember when it was that Fed Chairman Alan Greenspan first decried "irrational exuberance?" 1996. Greenspan was right, sure. But the market proceeded to climb for another four years before heading south. If Alan Greenspan, a man whose body is approximately 92% brain, can't time the market accurately, there's scant chance that you or I can. Don't even try.

Now it gets harder
But let's say you've bought into a cheap stock. You've seen it rise impressively over the past few months, and now you want to buy something that hasn't yet made its own climb to the heights. That's a dilemma I personally face right now with Marvel Enterprises (NYSE:MVL), a stock that I bought "on sale" several months ago and is now up more than 30%. I don't intend to sell it any time soon, and here's why.

The market ain't your momma
The market doesn't know you. It doesn't know how much you paid for a stock. It doesn't care how much you've made or lost. The market just tries to value companies based on their intrinsic worth and future prospects. Your objective as an investor should be to emulate the market's dispassion, to avoid getting emotionally attached to your stocks.

What I mean is this: Whenever you are tempted to sell a stock, you should, to the best of your ability, attempt to forget how much you paid for it originally. If you bought Apple Computer (NASDAQ:AAPL) six months ago at $21, and it's now selling for twice that, this does not necessarily mean you should sell quickly, before the stock collapses. The law of gravity doesn't apply to the stock market. Not all things that go up must come down.

Neither does gravity affect stocks in reverse. If you bought Nortel (NYSE:NT) last year at $6, and today it's selling for $2 and change, your decision to hold on to the stock, to sell it, or to buy more should have absolutely nothing to do with whether you think you will "get back to breakeven." This is important enough that I want to repeat it: The market does not care how much you paid for Nortel. There is no guarantee that just because it once sold for $6 it will ever fetch that much again.

Valuation is everything
The right time to sell a winner is, as investing guru Philip Fisher famously wrote, "almost never." If you've done your research beforehand and determined that the stock you want to buy is a promising long-term investment, you should not want to sell it. Ever. Trust your instincts. And, more importantly, trust the research and effort you put into buying a stock in the first place. Don't throw that away for a gain of a couple of percentage points.

That said, when you're looking at not just a couple of percentage points, but a double- or triple-digit gain over the course of a few short months -- as many of our members are -- I understand that the temptation to lock in that gain can be immense. But don't succumb. Remember that a business resembles an individual, in that it's dynamic and always changing. But as Fisher pointed out, "There is no limitation to corporate growth such as the life span places upon the individual." A business can easily be undervalued today -- and still undervalued next year, despite a rise in its stock price.

Consider: Company A earns $1 during Year 1 and has a price of $10 and a resulting P/E of 10. Now assume that in Year 2, Company A earns $1.50 while its price has increased to $14. That's a 40% gain in price -- enough to make most investors want to take a bit of money off the table.

But hold on a sec. The company's P/E has actually fallen to 9.3 over the past year. (And I won't even talk about its PEG.) Company A is therefore a better deal at the end of Year 2 than it was at the end of Year 1. This would be a perfect example of the kind of company you'd be foolish (small "f") to sell just to capture some profits.

It's also a good example of what I'd suggest you do any time you're tempted to sell a winner. You know why you bought the company in the first place. You know what calculations you used for determining that it was worth buying. So before selling, do it again. Run the numbers. Give the stock another chance to prove to you that it's worth owning. If the company fails the test, if you simply cannot convince yourself, no matter how hard you try, that the company is still worth owning, then fine -- sell it. But if the company proves itself to you, don't cut your profits off at the knees. Hold on to that little winner. Let it live. Let it grow. Let it continue to generate profits for you and your descendants for as long as you all may live.

Does the stress of knowing when to sell a winner keep you up at night? Or are you having trouble finding winners at all? For a very modest fee, Motley Fool Hidden Gems author Tom Gardner will do the worrying -- and the research -- for you. Is he any good? I wouldn't be inundated with email from readers wanting to know whether they should sell their winners if Tom hadn't found those winners for them in the first place! But don't take my word for it. Sign up for afree trial, and take a full month to decide whetherHidden Gemsis right for you.

This article was originally published on March 18, 2005. It has been updated.

Fool contributor Rich Smith owns shares of Marvel but of no other company mentioned in this article. The Motley Fool's disclosure policy is always a "buy," never a "sell."