The longest-term municipal bonds offer a buying opportunity, analysts at JPMorgan Chase & Co. and Citigroup Inc. say, as yields reach a two-year high following Detroit’s bankruptcy and concern over the Federal Reserve curbing bond purchases.

Benchmark munis due in 30 years yield 4.64 percent, or about 1.8 percentage points more than 10-year borrowings, data compiled by Bloomberg show. That’s the widest gap since January 2012 and compares with an average of 1.14 percentage points since 2001. While 30-year muni yields jumped 1.67 percentage points since the start of May, similar-maturity U.S. Treasury rates increased 0.87 percentage point, the data show.

The interest-rate move has been fueled by investors pulling about $15 billion from long-term muni mutual funds for 23 weeks, the lengthiest stretch in two years, Lipper US Fund Flows data show. Taxable-equivalent yields on top-rated bonds are higher than those on BBB corporate debt, a signal for investors such as hedge funds, pensions and insurance companies to buy local- government bonds, according to Peter DeGroot, a municipal strategist at JPMorgan in New York.

“The whole long-end of the muni market is exceptionally cheap right now,” said Clark Wagner, who oversees $1.5 billion of munis as director of fixed income at First Investors Management Co. in New York. “Long munis look really attractive on a relative basis to corporates and to Treasuries.”

Fed Slowing

The longest-maturing bonds in the $3.7 trillion muni-debt market have outpaced a broad fixed-income decline spurred by concerns that the Federal Reserve will slow its bond-buying amid signs the U.S. economy is improving. Investors are betting that the end of the central bank purchasing $85 billion in Treasuries and mortgages each month will lead to higher interest rates.

In that scenario, investors holding bonds with longer maturities will miss out on a chance to lock in higher-yielding debt, while those with shorter-dated securities get cash back quicker to redeploy.

Detroit’s Chapter 9 filing on July 18 has produced bigger losses for munis relative to other assets. The bankruptcy cost the local-debt market about $13.8 billion through Aug. 7, according to J.R. Rieger, vice president for fixed-income indexes at Standard & Poor’s in New York.

The 23 straight weeks of investor withdrawals from long- term muni mutual funds is the longest since June 2011, when individuals pulled their money out for 31 weeks.

Whitney Prediction