# How to Tax-Loss Harvest during the COVID-19 Market Downturn

### How to Tax-Loss Harvest during the COVID-19 Market Downturn

[Note: I wrote this post in mid-March of 2020, when US stock market indices had fallen ~25% from their mid-February highs. I didn’t get around to publishing it until June though, so much of the advice is moot for the time. I decided to publish it anyways so it is useful for the future.]

This blog post is a deviation from the technical content that I usually post, since I thought it may be useful to share my experience with my first time venturing into tax-loss harvesting. This post is not meant to be a comprehensive guide for when to tax loss harvest, but more of a series of steps that would need to take when deciding to go through with it, and a rough estimation of the actual benefits. Now for the obligatory disclaimer: this post isn’t intended to provide investment or tax advice!

##### What is Tax-Loss Harvesting?

Tax-Loss Harvesting (TLH) refers to the process of selling your investments at a loss in order to deduct this loss, up to a limit, from your capital gain or other income for the year, thus offsetting your total tax burden for the year. This “buy high, sell low” approach is of course contrary to typical investment approaches, but through a series of steps described below, you can actually remain fully invested in the markets for the long term, reduce your cost basis, and save on taxes in the event of a market downturn. Many robo-advisor firms such as Wealthfront and Betterment, as well as traditional portfolio managers use this method to improve an investor’s overall return, but it can of course be done yourself. Let’s look at how.

First things first: Why Tax-Loss Harvest?

When the market declines harvesting your losses could provide you with a tax benefit, provided that you approach it correctly and avoid all of the different catches, such as the wash sale rule (to be explained later). When tax-loss harvesting, you take a loss of the value of your investment when you purchased it minus the value of the investment when you sold it. This loss can be used to offset any capital gains that you incurred in the same year at a 1:1 ratio - i.e. every dollar of loss will cancel out one dollar of capital gains.

If your loss exceeds your year’s capital gain, you can then use it to deduct up to $3000 from your taxable income that year. If you still have more tax losses, you can carry those forward to future years. In those future years, the tax losses must be used to offset any capital gains you incur in those years, and then can be applied to deduct up to$3000 from your taxable income that year. This means that a $30,000 loss one year can reduce your taxable income by$3000 every year for 10 years, saving you $3000 * your marginal rate every year for 10 years. Based on the above, we can see that it’s quite beneficial to tax loss harvest if you have significant capital gains in the year that you are tax loss harvesting, as if your loss is large enough, it can be used to offset the entire capital gain, and you’ll pay zero capital gains tax. It would also be beneficial if you are planning to book a large loss and anticipate large capital gains in the future, as the losses can be carried forward and applied when you realize that large capital gain. How to tax loss harvest while staying invested for the long term It’s clear that tax loss harvesting has its benefits, but if you just stop at selling the investment at a loss and booking the loss on your taxes, then you’re missing out on potential future gains in the stock market by leaving that money uninvested. If you subscribe to the philosophy that the market goes up in the long-term and would like to stay fully invested for decades to come, there is a way to do this while still booking tax losses. Let’s go through the steps in order to harvest investment losses. Here, I will use two Vanguard funds, VTSAX and VFIAX, as an example. Let’s say that you purchased$100,00 worth of VTSAX, but by March 2020, this has declined to a value of $73,000. Step 0: Make sure your cost basis is set correctly. More on this below, but the TLDR is that you want to be able to choose the shares of the fund/stock that you are selling if you own many shares of the same fund purchased at different times and prices. In order to do this, you want to change the default cost basis to a cost basis known as Specific Identification. Step 1: Wait for a market decline. Clearly, the market needs to decline such that you own some shares that you can sell at a loss as a prerequisite. How much the market needs to decline is largely up to you. If your investment only declines by$100, it is likely not worth the trouble to go through the process to only save taxes on $100. I would recommend setting an amount at which it is worth it for you to tax loss harvest - for example, only starting the process when you have a loss of$5000, so that you can book at least that much in losses.

Step 2: Find tax loss harvesting partners to stay invested while avoiding wash sales. It would be nice if you could sell VTSAX for a loss and then buy it back the same day in order to stay fully invested, but unfortunatately, the IRS will consider this a wash sale and thus not allow you to benefit from the loss incurred.

A wash sale is loosely defined as selling and then repurchasing the same or a “substantially identical” asset within a 30 day period before or after selling the asset. A simple example would be selling and then immediately repurchasing VTSAX. More interesting examples include selling VTSAX for a loss and then purchasing FZROX, Fidelity’s total stock market index fund, within a 30 way window - since these funds track the same index it is likely that this will be considered a wash sale even though they’re managed by different companies. Note that the wash sale rule specifies that you must not purchase a “substantially identical” asset 30 days before and after execute the sale which resulted in the loss that you want to harvest, so there is a 61 day period where you will not be able to repurchase the same/substantially identical asset.

A good pair of “tax loss harvesting partners” is thus two funds that are relatively similar so that they allow you to mostly maintain your target allocation, but also track slightly different indices (this seems to be enough to avoid the wash sale rule). Many tax loss harvesting posts online recommend pairs such as VTSAX & VFIAX (tracking US CRSP Index vs S&P 500 index) or VTSAX & VLCAX (the latter tracking large caps). Let’s say that you go with VTSAX & VFIAX.

Step 3: Execute the trade. This part is simple, since Vanguard allows you to simply exchange one mutual fund for another. Ensure that your cost basis is set appropriately (more on this below), and pick the lot with the largest loss that you want to sell. Exchange this for VFIAX, and you’ve realized your losses.

Step 5: Report the losses on your tax return. You’ll get a form 1099-B which indicates the short-term and long-term losses that you incurred.

With the above steps, we are able to book a $27,000 paper loss, while still remaining invested with basically the same asset allocation (we exchanged VTSAX for VFIAX, which are largely similar in that they track the broad US stock market, although VFIAX has a bent towards larger companies). Since we exchanged our funds, our investment does not sit outside of the market for even a day, and thus has potential to benefit from a market rebound (or booking even more tax losses) in the future. 31 days after this, you can exchange the VFIAX back for VTSAX in order to keep your portfolio the same as it was before (while considering the short-term capital gains implications of this). This$27,000 paper loss will first be used to offset any capital gains in the current year. Assuming that you are investing for the long term (i.e. retirement) and thus don’t have significant capital gains in a working year, what will actually happen is that you will be taxed on $3000 less of income for this year, thus saving you your marginal rate on$3000. Let’s assume that you live in California and have a marginal federal tax rate of 32%. This means that the total tax you’d pay on $3000 at your marginal rate would be 41.3% (32 + 9.3) or 1239. This means that over 9 years, you’ll save 1$1,151 assuming you have no capital gains for the following 9 years.

There is a catch to this which makes it so that you don’t actually save that much, although. Since you repurchased similar shares when the market was down, provided that the market eventually does recover in the long term, with your reduced cost basis you will be liable for paying additional capital gains tax than if you hadn’t tax loss harvested. In this example, since your cost basis has effectively been reduced by $27,000, you’ll have to pay capital gains tax on$27,000 you’d otherwise not have to pay. This means you’ll end up paying $6561 in federal and CA income taxes, still netting you a savings of$4590.

The above wrinkle means that tax loss harvesting is not necessarily something that is always beneficial to do during a market downturn. For example, if you fall into the 0% capital gains tax bracket this year, then it is not useful to write off capital gains with capital losses. If you anticipate high income (federal or state) in future years, or move from a no income tax state to a state where there is one, the benefit may be less due to being in a larger capital gains or state income tax bracket.

In the case where the income taxes you save every year ends up being less than the capital gains and state taxes you pay on the extra gain due to the reduced basis, the TLH will actually end up having a negative value (your income in the year the capital gain is realized would have to be much higher than what it is in the year you realize the loss, for this to practically apply).

A Quick Primer on Cost Basis and its relation to tax-loss harvesting

If you don’t understand cost basis and proceed with the sale of assets that have lost value, you may actually end up with a capital gain if your broker used the default FIFO or average cost method for determining your cost basis. To understand how this can happen, let’s take a look at the different types of cost bases that exist.

A cost basis a computation for what you paid for an investment, accounting for any transaction/brokerage fees. In the simple case where you buy 1 share of company A for $100, and then sell it, your cost basis (what you paid) is$100. Now let’s say that you bought another share of company A a year later, for $200, and a year after that, wanted to sell 1 of your 2 shares. Let’s assume that a single share of company A was worth$300 at that point. Assuming a taxable brokerage account, you’ll be taxed on the $300 minus whatever you paid to acquire the share. You might intuitively think of the following ways to compute what you paid to acquire the share: 1. I’ll sell the first share that I bought 2 years ago, so I paid$100 (known as FIFO cost basis)
2. I’ll sell the last share that I bought, so I paid $200 (known as LIFO cost basis) 3. I’ll sell the “average share”, so it’ll be like I paid$150 (known as average cost basis).
4. I’ll pick the specific share I want to sell when I sell it (known as specific identification cost basis)

We can see that the cost basis we pick in this simple case affects the taxes that we will pay on our gain, and this also applies to deducting taxes when incurring a loss. For example, let’s consider the following scenario:

1. In 2015, you bought 100 shares of VTSAX for $100. 2. In 2019, you bought 50 shares of VTSAX for$200.
3. In 2020, you decide to sell 30 shares of VTSAX at $180. Clearly despite selling some shares at$180 you’re at a net (paper) gain here, but can you generate a paper loss that allows you to offset other capital gains or lower your taxable income for 2020? It turns out you can, depending on your cost basis. First, let’s assume that you stuck with Vanguard’s default cost basis for mutual funds, the average cost basis.

Average cost basis

Your average cost per share is (100 * 100 + 50 * 200)/150 = 133.33, which means you’d book a capital gain 1400 as a result of your sale. The question of how this capital gain is taxed - short or long-term - naturally arises: how do you even compute the age of the “average” share?

It turns out that there are two types of average cost basis: single category and double category. In the single-category average cost basis, the cost basis is computed with the average method but then the shares are matched in FIFO order. With double category, it’s a little more complicated: the average cost of short term and long-term shares are computed separately and taxed accordingly. Let’s assume that we are using single category average cost basis, in which the 30 shares would map to the 100 shares purchased in 2015, thus booking a long-term capital gain of 1400. We would pay 1400 * .15 = $210 in federal tax. FIFO cost basis Next, let’s assume that you went with the FIFO cost basis (the default cost basis for many brokerages, especially for individual stocks). This means that the 30 shares that you sold will come out of the 100 that you bought in 2015, so your capital gain will actually be calculated as 180 * 30 - 100 * 30 =$2400. You’re left paying more taxes than average cost basis. (Generally as the market trends upwards, FIFO would end up causing you to pay more tax than average-cost.)

Specific identification

Finally, let’s assume that you used specific identification for your cost basis and thus picked the lot that you wanted to sell. A lot just refers to a fixed quantity of shares purchased at the same price on the same date. Clearly, you want to choose your lots in descending order of their price. So you pick 30 shares from the 50 you purchased in 2019. Now your cost basis is $200 per share, so your capital gain will be (180 - 200) * 30 = -600, i.e., a capital loss of$600. In this exercise, picking the best cost basis over the worst one reduces your tax burden by $3000, a potential savings of$1239 assuming our above federal and state tax rates. Of course this reduction only increases with larger sums invested.

The TLDR of all this is that you generally want to pick specific identification as your cost basis, which will allow you to manually select the lots that you want to sell. It is more work and a little more complicated but the tax savings can be immense.

Note that there is a major downside in using the average cost basis method is that once you sell a security using this cost basis method you cannot use any other cost basis method while liquidating your holdings in that security. This makes sense, as it would be easy to abuse if you had a bunch of shares with a low average cost, sold using the average cost method, then purchased the shares at a much more expensive price, and then wanted to sell using LIFO to minimize your taxes. Thus, it’s probably better to stick with specific identification and choose each lot that you want to sell in order to minimize your tax burden.

##### A Catch: Automatically reinvesting dividends and automatic investments in 401(k) or IRA accounts

Many investors have automatic dividend reinvestment turned on in their brokerage accounts, which is very convenient since the dividends that you receive are automatically reinvested and don’t spend a minute sitting outside of the market. However, this incurs an additional complication with tax loss harvesting.

In the above example, if you sell VTSAX in order to realize your paper losses, but then are paid a dividend which is reinvested into VTSAX (for example, from other VTSAX holdings you have) within 30 days before or after your sale, then you’ll have accidentally triggered a wash sale. However, note that this isn’t the end of the world because the dividend reinvestment will likely only purchase a small amount of shares. In the above cost basis example, if you sell 30 shares but your dividend reinvestment purchases 5 shares, you can still reap the tax loss harvesting benefits on 25 shares.

An easy way to avoid this is to not automatically reinvest dividends, of course. Vanguard funds mostly pay out dividends four times a year, so it’s not too much work to log in and reinvest them every couple of months.

Another catch is the fact that many people have automatic purchases of funds in their IRA/401(k). The IRS has clearly stated that if a security is sold in a taxable brokerage account but then a substantially similar asset is purchased in an IRA account (30 days before or after) then it is a wash sale, and thus you can’t claim the losses on your tax returns. It is an open question of whether this applies to 401(k) investments as well, as the IRS has not clearly issued any guidance (the above statement only specifically mentioned IRAs) on this and forums such as Bogleheads are divided on the issue. It’s better to be safe than sorry though and avoid possible wash sales incurred in IRAs or 401(k) accounts.

The TLDR

Tax loss harvesting is a sequence of steps that you can take to potentially offset your capital gains or taxed income for many years, depending on the size of the loss, while staying fully invested in the market. Care must be taken to be aware of the tax tradeoffs (extra future capital gains), choose the right cost basis to incur the loss, and avoid wash sales.

Sources