Muni rates have risen sharply since late spring — the 10-year rate is up about 100 basis points — causing a predictable decline in bond prices. Discount bonds performed worse because of the dreaded de minimis rule, under which buyers pay taxes on the gain at maturity at the ordinary income rate when the discount is large.

But there is a silver lining: taking a tax loss can ease the pain. Short-term losses can be particularly attractive to investors in the top tax bracket, because their rate is a hefty 43.4% (the sum of the 39.6% short-term capital gain-loss rate and the 3.8% surtax for Obamacare).

The basic idea is to sell a bond the value of which has declined, recognize the loss for tax purposes, and reinvest the proceeds in a “like” security. For illustrative purposes, we ignore the wash-sale rules, but in any case it will become clear that the replacement security is actually irrelevant to determining whether the sale is beneficial.

The analysis of this simple transaction is actually quite complicated. For starters, the transaction is not necessarily advisable simply because the after-tax proceeds from a sale exceed the repurchase price.

What is often missing from a typical tax loss swap analysis or proposal is the fact that the base case or “hold value” varies according to the investor’s tax circumstances — not only the tax bracket, but when and at what price the bond was purchased. For example, if an investor purchased a bond at or above par, there would be no tax due at maturity. But if rates subsequently rose and the price fell below the de minimis threshold, then a new buyer would be subject to taxes on the gain at maturity at ordinary income tax rate (as high as 43.4%, post-Obamacare). As a result, the value to the marginal buyer could be significantly lower than the hold value to the original investor.

Consider for example a 2.50% bond with 10 years to maturity when the 10-year rate is 3.00%. If the investor had purchased this bond at par, the hold value is the pretax value, namely 95.57. But the market price, at 93.50, is roughly 2 points lower, reflecting the present value of the 2.82 points (0.434 x 6.50) in tax that would be due at maturity.

If the holder purchased the bond at par less than a year ago and sold it today (at a transaction cost of 0.50%) for 93.00, the tax savings would amount to 0.434 x (100-93) or 3.04% of par. Therefore, selling would result in a gain of roughly half a point (96.04-95.57) relative to holding.

However, if the bond was purchased more than a year ago, the tax savings would be only 0.238 x (100-93) or 1.67% of par, resulting in proceeds of 94.67 (93+1.67). Here, the transaction loses about a point (94.67 – 95.57). Notice that from a swap viewpoint this transaction can be seen as producing a cash take-out, wherein proceeds exceed the repurchase price of the bond. But the tax saving from selling at a loss is overwhelmed by the tax due at maturity from rebuying at a discount. That wouldn’t happen if the original purchase was at a premium and the swap occurs at a price that is still above par.

Naturally, the higher the original purchase price the larger the loss and the greater the tax savings. Figure 1 displays how the benefit depends on the purchase date and purchase price. Clearly, the benefit of booking a short-term loss trumps that of a long-term one. If you purchased the bond less than a year ago and your current tax basis is above 98.50, you could profitably sell at 93.00. However, if you purchased the bond more than a year ago, due to the lower tax rate, a sale at that price is profitable only if your basis exceeds 103.80.

Figure 2 displays the net benefit of selling at a loss. As in Figure 1, it shows that the short-term tax losses generate a much bigger benefit than long-term losses. For example if the holder’s tax basis is 105, selling at 93 generates a mere 0.31% of benefit from a long-term loss, but a much larger 2.68% benefit from a short-term loss. As indicated earlier, the analysis of a tax-driven transaction usually assumes reinvestment in a like replacement bond. But by now it should be clear that the benefit does not depend on the choice of reinvestment vehicle. The latter is a function of the investor’s risk preferences and portfolio management goals, and it should be considered separately from the decision to recognize a tax loss.

Assuming that a sale does result in a benefit, how does the investor know whether it’s better to act or to wait for a better opportunity? Taking a tax loss is a real option, and determining the value of this 'tax option’ requires option-based valuation tools. Like most options, the tax option is a wasting asset — in particular as the window for taking a short-term loss closes, its value declines precipitously. The interested reader will find a thorough discussion of this in forthcoming papers.

In summary, active tax management can significantly enhance return. Determining the benefit is only the initial step in deciding whether to sell. If the benefit is relatively modest, waiting for a more attractive opportunity may be preferable. In order to make the right decision, one needs to know how to calculate the risk like a professional; this requires both market information and the proper toolkit to deal with uncertainty of interest rates and after-tax cash flows.