Chapel Hill, N.C. (MarketWatch) — Worried that higher interest rates will decimate your bond holdings?

You may be worried for nothing.

Just take bonds’ performance during what is widely thought to be the worst sustained period for bonds in U.S. history. I am referring, of course, to the period from 1965 through 1982, during which Treasury yields almost tripled.

Believe it or not, intermediate-term bonds held their own over this period: A portfolio of intermediate-term U.S. Treasurys, constructed to have a constant maturity of five years, gained 5.8% annualized from 1965 through 1982, according to data from Ibbotson (a division of Morningstar).

That’s almost as good as the S&P 500’s SPX, -1.11% 5.9% annualized dividend-adjusted return over the same period.

How can that be? Don’t higher rates lead inexorably to a decline in bonds’ face value?

Of course.

Greg Ip: Aging labor force spells long-term trouble

But what many investors overlook is that this bond portfolio also benefited from higher rates between 1965 and 1982: As its bonds matured, the portfolio reinvested in newly issued bonds with much higher yields. These two offsetting effects largely cancelled each other out.

Claude Erb, a former commodities and fixed-income manager at mutual-fund firm TCW Group, told me that this offset is true generally for constant-maturity bond portfolios — not just for this particular portfolio over this particular period of American history.

Erb referred me to a study that appeared last year in the Financial Analysts Journal. The authors — Martin Leibowitz and Anthony Bova, managing director and executive director at Morgan Stanley, respectively, and Stanley Kogelman, a principal at New York-based investment-advisory firm Advanced Portfolio Management — found that, for constant-maturity bond portfolios, “the greater yield earned during a rising-rate environment offsets the declining bond prices those rates cause.”

Take the Vanguard Intermediate Term Investment Grade Fund VFICX, , whose average duration is just over five years. Its current yield is 2.3%. You can bet with a high degree of confidence that its total return over the next several years will be close to this, regardless of how interest rates behave along the way.

To be sure, the fund’s return after inflation will be less. Yet you still might find the fund attractive for a portion of your retirement portfolio, especially if you think there is a not-insignificant probability of a severe bear market in stocks at some point over the next several years.

In other words, investors are not being irrational when they both expect interest rates to rise and they continue to allocate a chunk of their portfolios to bonds.

Click here to inquire about subscriptions to the Hulbert Sentiment Indexes.