Investors hate stocks so much that Mr. Market is losing ground to the Mega Millions as a viable retirement plan. According to an old and oft-quoted study by Primerica, close to a third of Americans already believe that the lottery is a better way to earn a retirement nest egg than investing in the stock market. But now, more and more investors with long-term time horizons are losing faith in stocks too. Research done by MFS Investment Management says that 40% of people ages 18 to 30 admit that they will “never feel comfortable investing in the stock market.”

That’s not a comforting statistic for people who already own stocks.

Today, stock holdings as a percentage of all the assets held by mutual funds are lower than they’ve ever been. And investors continue to pull cash out of equity funds by the fistful.

The most damning evidence that investors hate stocks right now doesn’t come from what folks are doing about their stocks, it comes from what they’re not doing: buying them.

And it’s largely because investors have no clue about what’s actually going on in the market. According to a survey from Franklin Templeton, 66% of investors thought that the S&P 500 declined in 2009; the big index actually climbed 26.5% on the year. 48% of people thought that the S&P dropped in 2010, when it really jumped 15.1% higher. More than half of investors still think that stocks dropped in 2011, when they actually just churned sideways.

And as I’ve been harping on this year, even though S&P has climbed around 13% since the first trading day in January, investors are more anxious about stocks than ever before.

But all of that hate mail investors are sending to stocks is actually a good thing. So contrarian investors should be taking note of what’s going on all around.

Harnessing the Boom and Bust Cycle

For starters, we’ve seen this before. Just about every forty years, in fact.

Sir John Templeton is credited with saying that the four most expensive words in the English language are, “this time it’s different.” The two most expensive words of the 21st century may end up being “new normal.”

Turn back the history book pages, and it’s clear that we’re not exactly in uncharted territory. Market technicians have been studying the 34-year boom and bust cycle for years, and sure enough Mr. Market looks like he’s following a 34-to-40-year cycle pretty squarely right now.

Stocks fell out of favor back in the mid-to-late 1930s after the 1929 market crash scared investors away from stocks and the Great Depression put the country into the worst economic crisis of all time. The discount rate, incidentally, dropped to near where it is now in the years that followed, and stocks quadrupled in the decade after that. In the late 1970s, stocks fell out of favor again, prompting BusinessWeek’s infamous “Death of Equities” cover in 1979. Stocks more than doubled by the decade after that, and more than tripled by the mid-1990s.

And now again, investors have been calling for the end of stock investing since the late 2000s -- even some really smart ones (though “new normal” espouser Bill Gross does admit to some “memory problems” in his October letter to investors). If history is any indication of what we should expect in stock performance over the next decade, Dow 55,000 isn’t unrealistic, even if it seems far away.

Fundamentals Support More Upside

More important than the historical evidence alone, the market’s current fundamentals support that sort of substantial rally too.

Right now, the Dow’s average price-to-earnings ratio is 15.7. It was 16.2 in the last five years of the 1930s and just over 10 in the last five years of the 1970s. (For comparison, the high inflation of the 1970s warrants that P/E discount vs. the 1930s and now.) Corporate profits are sitting at all-time highs, corporate holdings of cash are sitting at all-time highs, and value is being returned to shareholders more quickly than in the last two decades.

The dividend yield of the S&P 500, for instance, is higher post-2008 than it’s been since 1991.

Since the market crash of 2008, stock prices have been pushing higher, but earnings have been moving even faster over that same period. Ultimately, that means that there are still some bargains to be had for investors willing to search them out.

An Action to Take for Dow 55,000

The big question you’re probably wondering by now is: When, already?

In the past examples of “death of equities rallies,” the returns were slow going, measured in decades rather than months or years. But this month marks the four-year mark since the floor fell out of the stock market in October 2008. We’re entering the territory where some of the biggest gains have historically been made.

For that to happen, a good earnings season this quarter is only part of the battle. The other part is getting investors to think in terms of return on capital again, instead of return of capital. For that, it’s just a matter of time.

Right now, investors are overweight in flight to quality investments like treasuries. But those investments are atrophying away under the low-rate, higher interest rate environment that we’re currently knee-deep in. It doesn’t take hyperinflation to create a toxic environment for low-risk assets, and the current conditions prove it.

Stocks may not be perfect, but when treasury investors can’t take the pain anymore, they’re going to have to turn to stocks again. When that happens, the flow of funds will send the stock rally moving in earnest.

As contrarian investors know, though, those “risk-off” investors will necessarily miss out on the lion’s share of the gains. So how can you make sure you get in early? Focusing your portfolio on a few places now, while stocks are still out of favor, helps.

The old adage goes that everyone looks like a genius during a bull market. That means that index ETFs such as the SPDR S&P 500 ETF (SPY) and the PowerShares QQQ Trust (QQQ) do really well in this scenario. But get a little more selective, and you’ll boost that investment IQ. Here are two of areas to focus on.

1. Buy Fundamentally Strong Dividend Payers

Firms that generate high-quality earnings and throw off enough cash to return value to investors in the form of a dividend are a good option. Yes, they’ll obviously benefit from a stock rally, but the dividends (particularly if reinvested) should help to offset the negative effects of inflation while you wait it out.

AT&T (T) is a good example of this sort of stock. The firm is a communications juggernaut that’s effectively the biggest mobile phone carrier in the U.S. Even though Verizon’s (VZ) network is a bit bigger, AT&T owns its network in toto. I like that. One result of that is huge cash generation. AT&T uses that cash to pay an enormous 5% dividend yield right now, and it also has been slowly paying down its debt load (telecom is a very capital intense industry, after all). The firm’s landline business is underrated, but it generates a nice quiet cash flow as well that should help finance the crown jewel wireless business for free.

While they may not fit that mold perfectly, Apple (AAPL) and MasterCard (MA) are two other names that are skewed towards smaller dividends. Look, I understand that Apple is scary at around $620. But I’ve talked at length about why this stock is in fact cheap right now in spite of that price tag. It’s got mountains of cash (which offsets its valuation), high-quality earnings and enviable momentum. Few firms can offer that combination.

Payment network MasterCard is attractive for similar reasons. Again, we’ve got a firm with high-quality earnings and momentum, not to mention the huge tailwind in the world’s transition from cash to electronic payments methods. While smaller than Visa (V), the stock is cheaper, and it’s quietly grabbing a bigger chunk of the industry’s revenues: The firm’s market share increased by 10.9% in the last year.

2. The Names Everyone Else Hates

When all else fails, focus on the big names that everyone else hates -- the perennial short candidates. Heavily shorted stocks have the potential for a short squeeze as sentiment turns, and that’s more than just an old wives’ tale; my research shows that buying heavily shorted large and mid-cap stocks (the top two quartiles of all shortable stocks by market capitalization) and rebalancing monthly over the last decade would have beaten the S&P 500 by 9.28% each and every year. That’s some material outperformance during a decade when decent returns were very hard to come by.

Garmin (GRMN) is one name that immediately springs to mind. The GPS maker currently sports a short interest ratio of 20.7, which means that it would take more than a month of buying pressure at current volume levels just for shorts to exit their bets. Couple that with the fact that Garmin has a debt-free balance sheet, has staged a post-crash revenue turnaround in the last year, and pays out a 4.5% dividend yield, and this stock looks overly hated.

That means it should benefit more than most from a broad rally in stocks.

There’s no question that we’re still in a challenging market right now, but with a little perspective from the past, the anti-stock sentiment points to a rally of significant proportions over the longer-term. To see these names in action, check out the Dow 55,000 Portfolio on Stockpickr.

At the time of publication, author had no positions in stocks mentioned.

Jonas Elmerraji, based out of Baltimore, is the editor and portfolio manager of the Rhino Stock Report, a free investment advisory that returned 15% in 2008. He is a contributor to numerous financial outlets, including Forbes and Investopedia, and has been featured in Investor's Business Daily, in Consumer's Digest and on MSNBC.com.