Warren Buffett isn’t a fan of bonds. But they may be good for you.

Warren Buffett
Bennett Raglin | WireImage | Getty Images

It was a rough first quarter for bonds, which fell in value amid fears that inflation, the archnemesis of fixed-income investors, was coming back into the picture.

The Vanguard Total Bond Market Index fund and the iShares Core U.S. Aggregate Bond fund each lost 1.5 percent in the quarter. Much of the loss occurred at exactly the wrong time.

Instead of rallying when stocks were falling — typically the case for the last three decades — bonds merely managed to lose less than stocks. When the Standard & Poor's 500-stock index lost 10 percent from late January to early February, the Bloomberg Barclays Aggregate U.S. Bond index fell more than 1 percent.

More from The New York Times:

For Bond Investors, Low Expectations in a Low-Yield World
Emerging Market Bonds Are on a Roll. But How High Is the Risk?
Buffett's Annual Letter: Berkshire Records $29 Billion Gain From Tax Law

And then there was the latest bond-bashing from Warren E. Buffett, the chairman of Berkshire Hathaway. In his annual shareholder letter in early March, Mr. Buffett said the assumption that bonds were a worthy risk damper for long-term investors was "a terrible mistake." In 2012, he wrote: "Today's bond portfolios are, in effect, wasting assets." And in 2011, the message was: "Right now bonds should come with a warning label."

It's not profitable to argue with Mr. Buffett about the markets. He is right, of course. The return prospects for bonds aren't particularly appealing today. That's because low bond yields reduce the odds that you will earn a return that keeps pace with inflation in coming years. And with the Federal Reserve pushing its target interest rate higher, bond prices are likely to suffer. (When rates rise, bond prices fall. A bond fund's total return is the sum of the interest paid plus changes in bond prices.)

But Mr. Buffett is a singular investor, one with deep pockets and an extremely long-term perspective, and he has an excellent track record of exploiting market sell-offs. Most people aren't like that.

"While Warren Buffett might be able to be greedy when others are fearful and fearful when others are greedy, most of us just follow the herd," said Allan Roth, founder of the Wealth Logic financial advisory firm. "Bonds provide liquidity and courage when stocks are falling."

Bonds can be a boon for any investor who needs help in the courage department. "You own bonds to reduce volatility, not to earn a return," says Gregg Fisher, chief investment officer at the Gerstein Fisher financial advisory firm.

Moreover, what concerns Mr. Buffett are the poor prospects for long-term bonds, especially given their current low yields. He routinely points out that a 30-year Treasury bond is the wrong place to be when rates are rising, as they have been lately.

"Pensions and institutions that need to match their long-term liabilities with an asset use 30-year bonds. But most investors don't have that problem. Nobody owns them," said Kathy Jones, chief fixed income strategist at the Schwab Center for Financial Research.

According to Morningstar Direct, $59 billion is invested in long-term bond funds and exchange-traded funds (defined as portfolios with average durations above six years). But that total is dwarfed by the more than $1.5 trillion invested in intermediate-term portfolios (3.5- to six-year average duration), which include core bond funds hewing to the Bloomberg Barclays U.S. Aggregate index. Another $431 billion is invested in short-term portfolios (one- to 3.5-year average duration).

Duration is a measure of sensitivity to changing interest rates; the longer the duration, the more the price of a bond will fall when rates rise. For example, Dodge & Cox Income fund, with a duration of around four years, lost 0.9 percent in the first quarter. Vanguard Long-Term Bond Index fund,with a duration of more than 15 years, lost 3.75 percent.

Ms. Jones points out that from a low yield of 1.38 percent in July 2016, the 10-year Treasury note now yields nearly 3 percent. "We are in a bond bear market," she said. But that's nothing like a stock bear market.

Since July 2016, the average intermediate bond fund has managed to post flat performance as higher yields have offset price declines. Shorter-term portfolios have eked out a small gain. On an inflation-adjusted basis, bond funds have negative returns over that stretch. A stock bear market, by contrast, doesn't begin until stocks have fallen at least 20 percent.

Still, core bond funds' struggles have been unsettling. And with a strong-enough economy spurring the Federal Reserve to raise short-term interest rates, bond investors may need to reduce expectations.

Last quarter may well have been the start of bad times for bonds. Peter Chiappinelli, a member of the asset allocation team at GMO, points out that bonds moving in the same downward direction as stocks "has happened before and will happen again. That bonds are a dampener is not preordained by God," Mr. Chiappinelli said. "As we saw in the '70s and '80s, there are times when stocks and bonds can have a positive correlation," he said, meaning those assets can move in the same direction.

At the same time, the benchmark Bloomberg Barclays Aggregate is ratcheting up its risk. The duration of the index has increased from around 3.5 years in 2008 to six years today as the composition of the index shifted in response to the Federal Reserve's monetary policy. Treasury bonds, which tend to have longer durations, now represent more than one-third of the index compared with 22 percent in 2007. And corporations have spent the last decade issuing longer-term bonds to take advantage of low interest rates.

Mr. Chiappinelli said investing in a portfolio that is increasing its duration when interest rates "were at historic lows is the exact opposite of prudence."

Moreover, Treasuries are quite sensitive to rate increases, and Ms. Jones found that the credit quality of the corporate bonds in the index had decreased since the financial crisis.

"We tend to talk about owning the aggregate index as a core, and then adding some risk around it. Well, now might be a time to keep your core but add some less risky bonds," Ms. Jones said.

Funds that own high-quality bonds with shorter durations, such as Fidelity Short-Term Bond, can help reduce your portfolio's sensitivity to rising rates. Or you might want to consider a wholesale shift to shorter duration funds.

"Shorten up your entire bond portfolio to two or three years and you could probably afford to own fewer bonds and increase your stocks," Mr. Fisher said. His expectation is that the overall volatility of a portfolio 30 percent in short-term bonds and 70 percent in stocks is going to be on par with one that is 40 percent invested in a fund tracking the Bloomberg Barclays U.S. Aggregate index and 60 percent in stocks.

Mr. Roth recommends owning a laddered series of federally insured five-year certificates of deposit as a bond proxy. Online banks now offer five-year C.D.s yielding 2.5 percent or more.

Ms. Jones favors funds that hold floating-rate bonds — whose yields adjust when interest rates change — as a way of coping with the current environment. Ms. Jones suggests sticking with floating-rate funds that invest in high-quality bonds, such as the iShares Floating Rate Bond E.T.F. It has an average duration of less than one year and yields nearly 2 percent.

To combat inflation, you might want to add a fund that invests in Treasury Inflation-Protected Securities, or TIPS, such as Vanguard Inflation Protected Securities.

"I don't know what the return of bonds will be, and I am not suggesting it will be as good as the past 17 years, but I do expect the volatility of bonds relative to stocks to stay the same," Mr. Roth said.

Unless you are as patient and prescient as Mr. Buffett, owning a slug of less-volatile bonds can help you stick to a long-term investing strategy when stocks fall.

Don't miss: What people say in emails to the 87-year-old millionaire who buried treasure in the Rockies

Like this story? Like CNBC Make It on Facebook!

CEO shares the best business advice Warren Buffett ever gave him
CEO shares the best business advice Warren Buffett ever gave him