(Bloomberg) -- Things can only get better for the $4 trillion muni market in the second half of the year, according to Wall Street strategists.

With the rise in bond yields mostly priced in, the market is on track to pare its 9.25% year-to-date loss, they say. State and local government finances are also looking healthy, which adds to the rosy sentiment. 

Large money managers including BlackRock Inc. to Nuveen LLC have become positive on municipal debt recently. Many say munis have suffered from an overreaction by investors, who pulled out a record $87 billion from muni funds, spooked by inflation and aggressive action by the Federal Reserve to contain prices by raising interest rates. 

The market posted a record loss for the first six months of the year, with 10-year and 30-year AAA municipal bond yields rising about 170 basis points. Munis could finish the year down 6.25% to 7.25%, according to Barclays Plc and Charles Schwab strategists.

“We’re not going to be able climb our way out of this hole, but we’re setting ourselves up for a pretty good Q4 and 2023”, said Mikhail Foux, head of municipal strategy at Barclays. “The focus is clearly shifting away from inflation to possible recession or at least slower growth. That should put some kind of cap on how high rates will go.”

Investors have bolted from munis even though state coffers are filled with federal stimulus cash as well as personal and corporate income tax receipts. State tax revenue is 25% above its pre-pandemic peak, according to Nuveen, and state rainy day funds are at historic highs, S&P Global Ratings Inc. says. 

“The story is that credit quality is very strong,” said Cooper Howard, muni fixed income strategist at Charles Schwab. 

A looming recession doesn’t dampen the view. State and local governments have historically performed relatively well during the early parts of recession, even though it has taken them much longer to eventually recover from one, according to Barclays. Some 37 states are already planning to maintain or increase their rainy day fund balances next year to brace for a slowdown, the latest quarterly fiscal survey from the National Association of State Budget Officers, shows. 

With recession risk rising, Charles Schwab’s Howard recommends higher-rated AA and AAA bonds. The yield premium on AA bonds has widened to 17 basis points from seven basis points since the beginning of the year, according to Bloomberg indexes.

Investors should also consider longer-duration bonds because the yield premium is higher, Howard said. The difference in yield between 10-year AAA rated debt and 2-year bonds is 80 basis points.

“Now that we believe that the peak in yields is likely behind us, it makes sense to extend duration,” he said. 

But investors should still brace for a “choppy” summer in the short term, Barclays’ Foux said. June’s inflation reading and the Fed’s July meeting, along with the end of its bond-buying program, could result in higher yields and make munis cheaper than Treasuries, he said. 

“There’s a lot of near-term technicals that could put pressure on rates and make them volatile,” Foux said. 

©2022 Bloomberg L.P.