The municipal bond is one of the most popular tax-efficient investments you could make because its interest payments are exempt from federal, state and local taxes. As a result, the tax equivalent yield of a muni is higher than its current yield and usually higher than the yields of many others types of bonds, including Treasuries and corporates.

The tax equivalent yield of a 20-year muni yielding 3.5%, for example, is almost 5.8% for investors in the top federal tax bracket of 39.6% (couples with taxable income over $450,000) and even higher after state and local income taxes are included in the calculation, if there are any.

But Andy Chorlton, head of U.S. multi-sector fixed income at Schroders, tells ThinkAdvisor that munis don’t necessarily deliver the best after-tax return, which is what investors really want.

“There are times when munis do not provide the best after-tax return,” says Chorlton. “Sometimes it’s Treasuries and sometimes it’s corporates that deliver that.”

And according to Chorlton, that sometime is now. Many municipal bonds are currently more expensive than corporates on an after-tax basis following strong gains last year when munis were the best performing U.S. bond sector in 2016.

A 10-year AAA muni is yielding 1.84%, according to Bloomberg’s 10-year muni benchmark, slightly less than the 1.9% yield on the 10-year Treasury note and about half the yield of a 7-year AAA corporate bond, which has a comparable duration, or sensitivity to changing interest rates. In addition, corporate bonds, which have underperformed in the last 18 months unlike munis, have a “greater chance of principal gain,” says Chorlton.

“Sometimes it’s worth paying tax on coupons,” says Chorlton. “The goal for investors should be the best after-tax return, not maximum tax efficiency.”

Given that goal and a rosier outlook for investment-grade corporates than munis,  Schroders it looking to minimize exposure to municipal bonds in its funds and separately management accounts by selling munis and buying corporates while also taking into account any capital gains.

“There’s no point as a fund manager building the perfect portfolio if a client is paying capital gains taxes,” says Chorlton. “You need to manage capital gains.”

One popular strategy to manage capital gains is to offset those gains with taxable losses, which can be “harvested” throughout the year as needed. The key is to harvest the loss and realize the gain without negatively impacting a portfolio, says Chorlton.

That often involves buying another asset to replace the one that was sold for a profit, which can be hard to do in the bond market, says Chorlton, noting the difficulty in finding a similar credit with a similar coupon and maturity.

“Most of the time [in fixed income] it’s not about finding a replacement but managing the cost of the transaction,” says Chorlton. “You don’t want to try to do it when everyone else is doing it. If you realize a gain in December, the chance of finding an offset is very limited.”

Investors also need to be aware of the IRS Wash Sale Rule when trying to replace an asset that has been sold for a loss to offset a capital gain. Under the rule an investor cannot buy a substantially equal security within 30 days – before or after – of that sale.

Here are some other tax issues that muni investors need to be aware of:

  • Income from municipal bonds used to finance stadiums, airports and other capital projects for “private activity” issuers could be subject to the Alternative Minimum Tax (AMT). Investors who are subject to the AMT will be taxed at 28% on that municipal bond income rather than nothing.
  • Municipal bonds bought at a discount and sold at a profit can be required to pay their higher income tax rate rather than capital gains rate on those gains if the bond was bought at a discount of more than 0.25% for each year until maturity. For example, an investor who bought a 10-year muni bond with a face value of 100 at less than 97.5 (100 – [0.25 × 10 years]), he or she would have to pay ordinary income tax on any capital gain.

– Related on ThinkAdvisor: