Today, let’s have some fun with numbers. The kind that investors rely on. Which turn out to be the kind that can be skewed by their start or end dates, and that can skewer your investment portfolio if you follow them blindly.

Let’s start with a key number, the five-year return for stocks. For the five years that ended in 2012, the Standard & Poor’s 500-stock index produced a return, including reinvested dividends, of a crummy 1.66 percent annually. That’s not exactly the kind of record that would encourage you to buy stocks, is it? But 2013 turned out to be a great year for stocks. As a result, the S&P’s five-year annual return through the end of last year jumped almost 1,000 percent — no, that’s not a typo — to 17.94 percent.

This math, courtesy of AJO, a Philadelphia money-management firm whose numbers I’m using throughout this column, shows how random even long-term performance figures can be. The five-year number increased dramatically from its 2012 level because it no longer included the dreadful 2008 (when the S&P posted a 37 percent loss) and did include 2013, when the S&P returned a nifty 32.4 percent.

Now, let’s say that as last year opened, you knew that for the 20 years ended in 2012, long-term Treasury securities had outperformed stocks, returning 8.5 percent a year (including reinvested interest) vs. 8.22 percent for the S&P. Bonds outperforming stocks over such a long period is the investment equivalent of the sun rising in the west: a repudiation of the natural order. Stocks are riskier than Treasury securities, which can’t default absent total idiocy in our nation’s capital. Therefore, financial theory says that stocks are expected to carry what economists call an “equity premium” above what bonds produce.

Oops. If you decided last year to learn from history and bought long Treasurys rather than stocks, you got clocked. You would have lost 12.7 percent of your money (as measured by Barclays index of long-term Treasurys) in one of the worst bond years ever and missed out on the aforementioned 32.4 percent S&P gain. Because of bonds’ horrible 2013 and stocks’ good one, the 20-year record is now back in favor of stocks, 9.22 percent to 6.92 percent.

Bonds had been in a huge bull market because the Federal Reserve was holding down interest rates to stimulate the economy. But last year, long rates rose despite the Fed’s efforts to hold them down. (I’m not sure if the increase had to do with “bond vigilantes” overpowering the Fed; all I know is what happened.) When long-term rates rise, the market value of existing long-term bonds declines, hence bonds’ dreadful 2013. For example, the rise in the 30-year Treasury rate to 4 percent at year-end from 3 percent as the year opened knocked 17 percent off the market price of a 3 percent, 30-year bond.

“We all want to look back and compare, but that won’t make you a penny,” says Ted Aronson, one of AJO’s founding partners. “You have to look forward.” Aronson points out that at the end of 1999, a period he calls “the mother of all speculative bubbles,” the S&P five-year return was 28.6 percent. Five years later, post-bubble, the five-year return was minus-2.3 percent. Buying stocks right after the five great years lost you money. Buying after five horrible years worked out very well.

It’s tempting to say that stocks will keep running up because of momentum and the improving economy, and that bonds will keep tanking because the Fed has signaled plans to “taper” its efforts to hold rates down. But life is rarely that simple. With stocks having risen so sharply last year, they’re riskier than they were. With long Treasurys having fallen so sharply, they’re less risky than they were (though still quite risky).

I’ve inflicted all these numbers on you to show how a single year in which stocks did great and bonds did terribly can skew long-term numbers. The same thing happened — in reverse — in 2008, when long Treasurys had a great year, returning 16.6 percent, while stocks lost 37 percent. That shifted the results in favor of bonds. So even historical performance figures aren’t set in stone. Trying to figure out what will happen this year? Me too. Have fun. 

Sloan is Fortune magazine’s senior editor at large.