If you're tempted to listen to investing experts on TV when they recommend getting in or out of the market, think twice.

Many financial prognosticators like to predict when the market will surge and when it will crash. Unfortunately, they're often wrong. No one can consistently and accurately know what the market will do in the short term. In the long term, though, the trend is clear: The market tends to rise.

Shedding some very useful light on the question is a study conducted by University of Michigan finance professor H. Nejat Seyhun for Towneley Capital Management. Here are some of his findings:

If you invested in the stock market from 1963 through 1993, it would have yielded an average annual return of 11.83%. That should seem pretty good.

But, here's the amazing part. The period of 1963 through 1993 includes 7,802 days. If you were out of the market (not invested in it) for the 10 days when the market rose the most, your average annual return would only be 10.17%. If you sat out the 30 best days, your return would plunge to 8%. Up that to the 90 best days, and you're down to a mere 3.28%.

Most of the market's gains seem to occur on just a few days. This means anyone who tries to time the market is at risk of missing out on substantial gains. While some will suggest that there are dangerous times to be in the market, it's probably more dangerous to be out of it.

The most dangerous time to be invested in stocks is when you don't really understand the companies you're invested in and don't have a good handle on factors such as how they make their money, their prospects and competitive position, and their financial health and debt load.

In 1995, the market (as measured by the S&P 500) advanced a whopping 37.5%. Some prognosticators suggested that 1996 would give back some of that gain. Had you sat out 1996, you'd have missed out on a rise of just under 23%. In 1997, the S&P advanced 33%. Considering that the market's historical average return is 11%, those were heady years. Many predicted that we were surely due for a crash. Yet 1998 offered a jump of 28.6%.

Look at the year just passed. Our economy has been sputtering in many ways, employment isn't robust, and for a long time many experts were pessimistic about 2003's stock market prospects. Yet over 2003, the Dow gained 25%, the Nasdaq advanced a whopping 50%, and the S&P 500 jumped an extremely solid 26%. You just never know.

The lesson is clear: If you hang on for the long term, you'll be in the market on days when it counts -- and able to ride out the downturns.

You can learn more about investing in our highly regarded How-to Guides and online seminars. And if you'd like to receive several promising stock ideas, check out our suite of stock newsletters.