This is the second post in a 3-part series that began with “How To Time The Market Like Warren Buffett.”

‘Be fearful when others are greedy and be greedy only when others are fearful.’ -Warren Buffett, 1986 Berkshire Hathaway Chairman’s Letter

This has to be Warren Buffett’s most famous quote. For investors, however, of all of his copious advice it has to be the most difficult to put into practice.

How, exactly, do we know when ‘others are greedy or fearful’? And how, exactly, should we be ‘fearful or greedy’ in response?

In my recent post, “How To Time The Market Like Warren Buffett,” I tried to get at how Buffett uses fundamentals, or valuations, to determine whether he should be fearful or greedy. Essentially, he just buys whatever offers the better prospective return. When it’s stocks, that’s what he buys. When, on rare occasion, bonds offer a better return he buys them instead. This is one way he has managed to generate market-beating returns over long periods of time.

But, surprisingly enough, fundamentals aren’t the best way to judge the prospective returns of stocks. Investor sentiment is actually much more predictive than even Buffett’s favorite measure of valuations (total market capitalization-to-GNP).

Philosophical Economics ran a post back in December titled, “The Single Greatest Predictor Of Future Stock Market Returns,” in which they found that household allocation to equities was correlated to future returns in the stock market by greater than 90%. I ran the same correlation and found that while market cap-to-GDP had an 83% negative correlation to 10-year returns in the stock market, this measure had a 94% negative correlation.

Ultimately, what investors are actually doing with their money – acting out of fear or greed – is a much better predictor of future returns than even the best measure of value. But how do we use this information as a contrary indicator? How do we put it into practice?

It’s simple: we do just what we did with the fundamental measure. We create a forecasting model that suggests what stocks are likely to return over coming decade based upon investors’ allocation to stocks. Then we compare that to the yield on the 10-year Treasury bond. Whichever offers the better prospective return should be bought.

Screen Shot 2014-08-18 at 9.54.17 AMSo I went back once again and looked at what would have happened if an investor had followed this model only looking at it once a year at year end, starting back in 1950. (Again, I know this is cheating; our investor obviously didn’t have access to all of this then future data back in 1950. Still, it’s a fun exercise so get over yourself.)

Screen Shot 2014-08-18 at 9.38.40 AMLike the valuation timing model, this one also significantly outperformed a simply buy-and-hold approach. Yet it didn’t differ much from the valuation model. It ourperformed during the internet bubble because it kept our hypothetical investor in stocks for two years longer than the valuation model. But it underperformed during the financial crisis because it didn’t get our investor out of stocks while the valuation model did.

Another major difference between the two is that our valuation model got our hypothetical investor out of stocks at the end of 2012 and so she missed last year’s huge gains. The sentiment model kept her in stocks and that’s really the main difference between the performance of the two up to this point.

The bottom line is both of these models, due to their exceptional predictive ability, allow an investor to determine not only when but how to be fearful and greedy: simply own stocks when they offer the better prospective return, otherwise own bonds.

I should emphasize again that this model is merely for educational purposes. It doesn’t factor in transaction costs or taxes (which could be huge) so it’s not in any way a recommendation for you to use with your investments. But it’s definitely something to consider when evaluating investment opportunities on a broad basis or deciding where to put new money to work.

There’s one more way to dramatically enhance even these terrific results and in part three of this series I’ll reveal how. I’ll also soon put up a page on this site that regularly updates these models and compares their prospective returns to the yield on the 10-year treasury so we can keep tabs on it. Stay tuned.