Warren Buffett once said, “If you don’t feel comfortable owning something for 10 years, then don’t own it for 10 minutes.”

In the wake of the worst market crisis since the Great Depression, many investors have strayed from Buffett’s simple advice. Although some investors hoarded their money away, crippled with the fear of losing a retirement fund or their children’s college savings, others tried to offset their losses by making short-term bets on questionable stocks.

An emotional roller coaster
The volatility of the last year and half caused even the best of us to become extremely shortsighted. From September to mid-October of 2008, somewhere close to $100 billion in stock funds left the market. Where did it all go?

Many investors fled to money market funds, short-term CDs, or just plain old vanilla cash. Other investors, who wanted more than the 1%-2% that Treasuries offered, looked toward junk bonds for higher yields. And many investors speculated on beaten-down financial stocks like Citigroup (NYSE: C) or Bank of America (NYSE: BAC).

These strategies didn’t always fail. ETFs like SPDR Barclay’s Capital High Yield Bond (JNK), which holds debt from companies such as Chesapeake Energy (NYSE: CHK) and Sprint Nextel (NYSE: S), have experienced returns of over 60% year over year. Bank of America, on the other hand, is down 8% year over year.

However, tactics like these are for the short term only -- and by definition, they aren't going to keep your portfolio afloat for the long haul.

Heading for the exit?
It’s true that by taking profits every so often, you can protect yourself from the downside of unexpected disasters in the marketplace. If you held on to shares of General Motors or Lehman Brothers no matter what, you most likely lost everything you had.

However, the majority of the time, selling based only on price -- whether in fear that the market will drop further, or to lock in gains -- does more to hurt you than it does to help. If you’ve held a stock for less than one year, you’ll be subject to higher capital gains taxes. In addition, you incur transaction costs with your broker every time you decide to cash out or buy new stocks.

But most importantly, selling stocks based only on price leaves you in a precarious position -- especially now. What, after all, do you do with your earnings? Do you reinvest in other stocks, place the gains on the sidelines and try to time the market, or simply take your profits and then reinvest in the same stocks?

To illustrate the downfall of taking premature gains, I looked at what you’d have missed out on if you had fearfully sold these five stocks during the tech bust of 2000-2002 (with a standing investment of $1,000 in each stock). In the subsequent seven years, these stocks performed incredibly well. Had you sold them out of fear or to lock in profits and time the market’s upswing, you would have missed out on these tremendous gains.

Stock

7-Year CAGR*

Final Value

Apple

58.7%

$25,353.53

Priceline.com (Nasdaq: PCLN)

56.2%

$22,686.48

Akamai Technologies

46.3%

$14,345.32

Amazon.com (Nasdaq: AMZN)

29.5%

$6,107.85

GigaMedia

30.3%

$6,376.92

*2002-2009 compounded annual growth rate.

Yes, there were lots of other companies that didn't survive the aftermath of the tech crash. Staying in too long may have lost you your investment -- but even then, the most you could have lost is $1,000. The gains you miss out on by getting out too soon are potentially infinite.

Learn the right lesson
Vanguard issued a warning on its website recently, essentially telling investors that the current rally should be approached with caution. Vanguard knows how far the market has come in such a short period of time, and how unusual it is for blue chips like General Electric and Procter & Gamble (NYSE: PG) to gain 20% in six months.

But just because this rally may not be sustainable doesn't mean you shouldn't hold on -- so long as you're invested in stocks you would be willing to hold for 10 years. It isn’t nearly as exciting as trading in and out of stocks every few months, but if you try to time the market by taking profits, you’re eventually going to find yourself on the wrong side of a market cycle.

The best thing you can do -- no matter what the market is doing -- is to continue investing in the stock of solid, profitable companies, maintain a diversified portfolio, and try to avoid buying stocks that you wouldn’t be happy holding for the next 10 years.

If you’re having a difficult time figuring out where to invest next, or which sectors you think are going to be safe moving forward, our Motley Fool Stock Advisor newsletter is a great place to start. David and Tom Gardner, the Fool’s co-founders, offer two stock picks every month they'd be happy to own for years, and there are currently 10 stocks they think you should buy right now.

In such a difficult environment, David and Tom don’t hit one out of the park on every attempt, but since 2002 they’re beating the S&P 500 by about 48 percentage points -- that’s pretty impressive! If you’re interested in getting back on track with your investing strategy and need some help getting back in the game, please click here for more information. We’re currently offering a 30-day free trial.

Already a member of Stock Advisor? Log in at the top of the page.

Jordan DiPietro owns shares of General Electric. Amazon.com, Apple, and Priceline.com are Motley Fool Stock Advisor recommendations. Akamai Technologies is a Rule Breakers pick. Chesapeake Energy and Sprint Nextel are Inside Value picks. Procter & Gamble is an Income Investor selection. The Fool owns shares of Chesapeake Energy and Procter & Gamble. The Fool’s disclosure policy is here for the long run.