The market has teetered in recent weeks. And the volatility has caused some investors to head for the sidelines. They are almost certainly making a mistake.

To time the market correctly, you have to make not one great call but two. And the consequences of getting either wrong can be grave.

Let’s consider how things could go awry…

In example A, you bail out of the market – intending, of course, to buy back in at lower levels – but the market doesn’t cooperate. It bumps up and down and then resumes its upward trend.

Now what do you do? Do you buy back in having missed part of the rally and risk being in for the next correction? Or do you sit and wait for the market to come back down only to potentially find that it just keeps heading higher, as it has for the past five years? It’s a situation many investors never seriously contemplate until they have to, when they get bored and frustrated earning nothing in cash or next to nothing in bonds.

In example B, you bail out of the market and it goes significantly lower. Congratulations, you made a good call. Good, that is, if you are able to buy back in and do more than just cover your commissions, bid-ask spreads and capital gains taxes.

Trading Costs Are Steep

The commissions and bid-ask spreads are no longer the hurdle they once were.

Twenty or 30 years ago, large stocks might have a spread of an eighth of a point and smaller, more illiquid stocks a quarter of a point. Commissions were routinely a couple hundred bucks (or several hundred if you were making large trades).

Today, of course, the spread is usually pennies (or a single penny) – thanks, in part, to the rapid-fire techno traders we’re supposed to detest. And commissions, if you’re using a deep-discount broker, are only a few dollars.

But capital gains taxes are something else altogether. Take profits in less than 12 months and you will be hit with a short-term capital gains tax equal to your marginal tax bracket, which may be as much as 39.6% thanks to President Obama’s “battle” against economic inequality.

A stock has to drop an awful lot to cover a nearly 40% capital gains tax.

And, even if it’s a long-term gain, your tax may be as much as 20% of your profit. So please don’t imagine you can buy back in after a stock (or the market) drops 5% to 10% and come out much ahead, if at all.

If you’re trading in a qualified retirement plan, of course, the commissions and spreads are a consideration but not any capital gains taxes.

On the other hand, if you make mistakes in these accounts, the losses are not tax-deductible. And, for the record, market-timers make a lot of mistakes. As Vanguard founder John Bogle once put it, “Not only do I not know anyone who has timed the market successfully, I don’t know anyone who knows anyone who’s done it.”

Why This Doesn’t Work

Of course, it’s possible that you could sell stocks now and buy back in at a significantly lower level, covering all spreads, commissions and taxes.

But here’s a heads-up. You probably won’t. Because here’s what happens…

You sell out before the market really hits the skids – as it does from time to time – and you feel awfully good about it, especially when you hear your friends, relatives and colleagues grumbling about how much their stocks are down or when forecasters start predicting how much further the market still has to fall.

You start feeling so smart, in fact, that you decide you’re going to wait until the market clearly bottoms to buy back in.

A neat trick, if you can do it. Yet almost no one does. Stocks often rally sharply and suddenly off a bottom (only visible with hindsight) even though the consensus is generally that the new move up is just “a dead cat bounce” or “a bear market trap.” I’ve seen this happen a dozen times over the last 30 years.

Eventually, the market goes so high that you have to make a decision: buy in and risk suffering through the next leg down (even though you missed the rally) or stay out and risk stocks going even higher without you on board.

I know plenty of investors – you probably do too – who got out at some point during the recent financial crisis and never got back in. They didn’t buy anything while it was cheap. They didn’t even hold on and reinvest their dividends at lower levels. And now everything is more expensive. In short, in example B you end up facing the very same conundrum as in example A.

But let’s not be overly pessimistic. Consider example C. Let’s say you sell high and buy low and cover all spreads, commissions and taxes.

Congratulations. There is a word for people like you. It’s “lucky.” And if you keep trying this stunt your rabbit’s foot will eventually morph into The Monkey’s Paw. (Sorry for the obscure literary reference.)

When I was a stockbroker in 1987, I had a client who switched his entire portfolio into cash a week before the stock market crash. He got fully invested again the week after.

“This guy is a genius,” I thought to myself, being a tad wet behind the ears at the time.

Unfortunately, this same gentleman switched in and out of the market so frequently – and so poorly – over the next few years that he gave back everything he gained and more. A lot more.

Benjamin Graham, the father of value investing and mentor of Warren Buffett, recognized this tendency many decades ago. He said, “The investor’s chief problem – and even his worst enemy – is likely to be himself.”