Forget everything you've learned about investing for a minute. Just looking at the past 40 years, would you know which type of investments would have produced the best returns?

If you cheated and relied on your years of investing experience, you probably said stocks. But at least according to one source, over the past 40 years, you'd be absolutely wrong.

A recent paper from the research firm Research Affiliates LLC compared returns of long-term Treasury bonds against a buy-and-hold stock strategy. The findings shattered a long-held investment philosophy: that over the long haul, stock investors earn better returns to compensate for the increased risk they bear. Instead, the research found that investing in bonds has actually earned more money for investors since 1969.

Many may conclude that these findings confirm that stock investing no longer works. But I find it interesting for a completely different reason: It's just one example of how nearly every assertion you make about the financial markets will occasionally come true.

Perfect timing
To understand the ramifications of bonds' outperformance of stocks over the past 40 years, you need some background on what the investing climate was like back in 1969. “Nifty 50” stocks like Eastman Kodak (NYSE:EK) and Xerox (NYSE:XRX) were just beginning to come into their heyday. The S&P 500 had broken through the 100 level in mid-1968 and was catching its breath before what would be one of the market's most difficult decades.

Meanwhile, bond yields were at historically high levels. After decades of low rates, both short- and long-term Treasury yields hovered between 6% and 7% in 1969. The bear market in bonds that would eventually culminate in the inflation-inspired panic of the early 1980s was already under way.

In other words, 1969 was a great time for stocks and an awful time for bonds. Remember that starting point as we move forward in time.

Then and now
Now, of course, things are just about the opposite. Kodak and Xerox have gone nowhere in the past 40 years, and even more successful components of the old Nifty 50 have seen much of their gains evaporate in just the past two years. Here are just a few of the best-known names:

Stock

Return 1989 to 2007

Return 2007 to 2009

American Express (NYSE:AXP)

840%

(72.0%)

General Electric (NYSE:GE)

1,335%

(66.3%)

Merck (NYSE:MRK)

609%

(37.4%)

Schlumberger (NYSE:SLB)

1,052%

(38.8%)

Texas Instruments (NYSE:TXN)

1,627%

(45.2%)

Source: Yahoo! Finance. Returns based on prices as of April 7.

Meanwhile, ever since the bond market hit bottom in the early 1980s, bond prices have soared and yields have come crashing down. After long-term Treasuries hit highs near 14% in 1981, interest rates have fallen steadily, making total returns on bonds extremely attractive. Now, even 30-year bonds pay less than 4%, and maturities as long as two years have yields less than 1%.

In other words, 2009 is a great time for bonds and an absolutely miserable time for stocks.

Now let me ask you: Is that a good basis for comparing long-term returns?

The real point
Not if you're trying to draw a universal statement that bonds are better than stocks. But what is useful to realize is that every once in a while, a perfect alignment of financial markets will turn the typical rules upside down -- and smart investors will take advantage.

As Wharton professor Jeremy Siegel points out, even if stocks don't have as strong an advantage over bonds as many believe, that doesn't mean that now is a bad time to invest in stocks. In fact, with the S&P having lost nearly 50% of its value in just the past year and a half, historical trends are on the side of stocks going forward.

You'll hear plenty more criticism of stocks over the next several years, as backward comparisons make it incredibly obvious how much better you might have done just dumping all your money in a risk-free CD. Just remember: Hindsight is 20-20, but foresight requires going against the crowd. Luckily, foresight also rewards those who have the courage to make their own decisions.

For more on what investments are best for right now, read:

Start investing the Foolish way with the Motley Fool Stock Advisor newsletter. See what Fool co-founders Tom and David Gardner are recommending now with a free 30-day trial.

Frustrated with your 401(k)? Even if your employer's plan isn't the greatest, you don't have to give up your dreams of a happy retirement.  Get the tips you need to turn your retirement savings around in our special report, "How to Make the Most of Your 401(k)" -- just click here for instant free access.

Fool contributor Dan Caplinger likes bonds, but only in moderation. He owns shares of General Electric. American Express is a Motley Fool Inside Value selection. The Fool owns shares of American Express. Try any of our Foolish newsletters today, free for 30 days. The Fool's disclosure policy gives you its all.