Watch the market get highly volatile. Then watch some investors, as they always do, start talking about market timing.

The Wall Street Journal quoted a Davos attendee last week as saying that “the trade now is to hold as much cash as possible.” In other words, dump everything and move to cash.

Last week, Michael Batnick posted on his "The Irrelevant Investor" blog an examination of the impact on investors of missing the 25 worst days in the market annually, or missing the 25 best days -- or even missing both sets of days. As Batnick noted, the post was just a thought experiment and he said that he wasn't "suggesting it’s easy or even possible to achieve" the superior results snared when getting that timing right.

Market timing is intuitively appealing. When declining markets bring on the blues, an obvious remedy is to take your money and go home. The problem is that timing your re-entry is famously difficult, and there is considerable evidence that investors chronically mistime markets to their profound detriment.

Dalbar, Inc. (publisher of the oft-cited "Quantitative Analysis of Investor Behavior" ) says that its annual reports “consistently show that the average investor earns less -- in many cases, much less -- than mutual fund performance reports would suggest” as a result of poorly timed buy-and-sell decisions into and out of mutual funds.

So is there any merit to market timing? The question is fraught with confusion. For starters, market timing often refers to two very different strategies. One is binary, all-in-all-out moves around markets. The other is the use of portfolio tilts to temporarily increase or decrease exposure to one or more assets within a portfolio.

There is also some doublespeak in the market timing debate.  On the one hand, conventional wisdom says that timing markets is dicey. On the other hand, financial professionals routinely calculate expected returns for use in mean-variance optimization and other asset allocation methods and they presumably have confidence in the predictive value of those expected returns. Why then couldn’t those same expected returns be used to make timing decisions?  

I went snooping in the data for answers.

Using Robert Shiller’s well-known cyclically adjusted price-to-earnings ratios (CAPE) for U.S. stocks, and returns for the S&P 500 Index and five-year U.S. treasuries since 1926, I devised two “market timing” portfolios and one "buy-and-hold" portfolio (all with similar historical standard deviations in order to compare apples-to-apples-to-apples).

One portfolio makes binary bets by investing 100 percent in bonds when the CAPE is above its long term average, and 100 percent in stocks when the CAPE is below its long term average. A second portfolio allocates 65 percent to stocks and 35 percent to bonds, but tilts to 85 percent stock when the CAPE is one or more standard deviations below its long term average or 45 percent stock when the CAPE is two or more standard deviations above its long term average (historical CAPEs skew high). The third portfolio is buy-and-hold with a static 65 percent stock and 35 percent bond allocation. 

Guess what? All three portfolios would have returned 8.9 percent annually to investors since 1926. On that basis, the buy-and-hold portfolio is preferable because it requires the least work and results in the lowest transaction costs and taxes.

Few investors, however, have a 90-year investment period. So let's compress the time period.

When analyzed over rolling ten-year periods, the binary portfolio beats the buy-and-hold portfolio 47 percent of the time by an average margin of 1.9 percent, and loses by an average margin of negative 1.6 percent. The 47 percent success rate of the all-in-all-out portfolio reinforces the widely held belief that that version of market timing is, more often than not, a losing bet. When it fails, investors get slammed with severely subpar returns because the binary portfolio has all its eggs in the losing basket.

The tilt portfolio, on the other hand, beats the buy-and- hold portfolio 72 percent of the time by an average margin of 0.3 percent, and loses by an average margin of negative 0.1 percent. The 72 percent success rate of the tilt portfolio implies that there is predictive power in the CAPE – and presumably in other indicators of expected return – that can be used to enhance returns through modest changes to asset allocation over time. The payoff may be even higher in small cap stocks and in emerging markets where market dislocations are more frequent and severe. Even so, the CAPE’s crystal ball is far from perfect. Assuming that the strategy is dutifully executed, one must still be prepared to lose nearly a third of the time.

My takeaway from all of this is that market timing shouldn’t be so casually dismissed by buy-and-hold investors. Market timing may pay off if modestly used and consistently applied, and patient portfolio tilts are made to reflect changes in expected returns over time.

But that is no small "if." How much time do you want to spend -- and how much money are you willing to risk -- to capture the potential payoff?

This column does not necessarily reflect the opinion of Bloomberg LP and its owners.