By Min Zeng

U.S. government bonds posted a broad price rally Wednesday after a five-year note auction drew the strongest demand in more than two years.

A gauge of foreign demand for the $34 billion auction reached a record high. It reflects buying interest from overseas as U.S. bonds offer more attractive yields compared with their peers in Europe and Japan.

The bond market and the auction both benefited on a day when investors cut back appetites for stocks, which stalled the Dow Jones Industrial Average's march toward 20,000, a milestone it has never reached. An unexpected drop in pending home sales pointed toa setback in the housing market, also stoking demand for haven bonds.

The yield on the benchmark 10-year Treasury note settled at 2.510%, compared with 2.563% Tuesday. Yields fall as bond prices rise.

"Clearly there is demand for bonds leading into year-end," said Justin Lederer, senior trader of interest rates at Cantor Fitzgerald LP.

One support for the Treasury bond market near term is the prospect of pension funds rebalancing their portfolios following strong gains in stocks and the selloff in bonds following the U.S. election in early November, said some analysts.

Pension funds typically have a targeted allocation among different asset classes, so they need to readjust, or rebalance, the allocation ratio on either a quarterly or monthly basis.

Boris Rjavinski, senior fixed-income strategist at Wells Fargo Securities, said the bank's model estimates that U.S. defined-benefit pension funds will need to add about$20 billion in bonds versus roughly $32 billion in outflows from domestic equities.

"We have seen some rebalancing flows into our multisector fixed income funds related to rebalancing out of stocks and into bonds," said Donald Ellenberger, head of multisector strategies at Federated Investors.

U.S. bonds remain a bargain for foreign buyers. The five-year notes were sold at a yield of 2.057%, the highest since 2011, while the five-year German government bond yielded negative 0.54%. A gauge of foreign demand for the five-year sale, the indirect bidding, soared to 71.4%. That surpassed the previous record of 68.7% in August 2016.

A $28 billion sale of seven-year notes is due Thursday, the final leg of this year's Treasury debt offerings.

Trading is thinner than normal due to the holiday season, which tends to exaggerate part of the price moves, according to analysts.

Government bond yields in the developed world havebeen rising after falling to their historic lows in the summer. The yield was headed for a second consecutive year of gains, up from 2.273% at the end of 2015.

The shift toward higher yields reflects rising expectations among investors of a brighter growth outlook, higher inflation and potentially a faster pace of interest-rate increases by the Federal Reserve. Selling in the bond market had intensified after the U.S. election in early November. The prospect of expansive fiscal policy from President-elect Donald Trump in the coming year has added to expectations of stronger economic growth and higher inflation.

The 10-year yield has been up more than one percentage point from its record low set in early July.

The selling pressure has eased lately. The yield briefly rose above 2.6% earlier this month to trade at the highest since 2014. Some analysts say the selloff is overdone and that the 10-year yield around 2.6% attracts somebuying interest.

The Treasury bond market over all has handed investors a total return of 0.35% this year through Tuesday, according to Bloomberg Barclays bond indexes data. The sector had logged a 6.2% return between the end of last year and July 8, when the 10-year yield closed at a record-low yield of 1.366%.

Long-term bonds suffered even more. Treasury debt maturing in 10 years or more posted a negative 0.27% return this year through Tuesday, after posting a 19% return through July 8. Total return includes bond price changes and interest payments.

Write to Min Zeng at min.zeng@wsj.com

(END) Dow Jones Newswires

December 28, 2016 15:58 ET (20:58 GMT)

Copyright (c) 2016 Dow Jones & Company, Inc.