Unbiased measurement of tax-loss harvesting benefits

Our software “does your taxes” on April 15th of every backtest year, for more accurate & unbiased estimates of the benefits of tax-loss harvesting.


When estimating the after-tax benefit of tax-loss harvesting (TLH) strategies, a common simplifying assumption is that offsetting tax savings get posted to the account on the same day of a TLH sell order. However, in practice, one would have to wait until tax time (April 15th of the following year) to see the benefit. Such a simplification biases results by giving tax savings more time to grow with the market, thereby making after-tax returns look better.

Our software takes the cleaner – though harder to implement – approach of “doing your taxes” on April 15th of every backtest year.


Assume that on Jan. 25, 2020, the system sells 1,000 shares of XYZ (bought at $30 per share, long-term, without loss of generality) for $26 per share. The account has a realized loss of ($30 – $26) * 1,000 = $4,000. Using a long-term tax rate of 20%, this results in a 20% * $4,000 = $800 tax savings. [Note: to keep this example simple, we will assume here that there are always other long-term capital gains to offset against (vs. the $3,000 cap against ordinary income), so losses do not have to be carried forward. This is a fixed assumption that even the biggest firms make, but we do not; see here.]

However, in reality, that $800 won’t just appear in the account on Jan. 25, 2020, the day of the trade. Instead, the client will prepare his / her tax return in the next year, and then receive that $800 benefit (i.e. a reduction in tax owed) around April 15 of 2021, the day tax returns are due¹.

On average, if such TLH trades are equally spaced throughout the year, and considering that April 15th is 3.5 months into the year, then the simple-yet-inaccurate approach would give those tax savings 6 + 3.5 = 9.5 extra months to grow with the market.

Accurate approach

In our backtests, we “do your taxes” on the annual tax day (first market day on or after April 15th) for all realized taxes incurred in the previous year, and make any tax payment (or deposit any “refund” – really a reduction in tax owed) afterwards.


  1. Harder to implement.
  2. Must avoid negative cash: if a large tax payment is due on April 15, and the account has insufficient cash, then we would need to sell stock in the backtest to make the tax payment.
  3. Requires cleaner after-tax values. A big TLH sell on Jan. 25, 2020 would result in a lower total cost basis for the portfolio (thereby increasing the after-tax liquidation value right away), while an offsetting tax refund will appear on Apr. 15, 2021. Extra work is needed to avoid this looking like a spurious drop in the after-tax liquidation value on Jan. 25, 2020.
  4. Having a large tax refund appear on a single point in time can make the results look noisy. If e.g. prices are very cheap around April 15th, 2021, and we invest that large “refund” (a tax offset, really) on that day, then total returns would look high. We are aware of this, and have implemented a simple way to avoid this.


  1. More realistic and accurate because we avoid extra compounding. In the simple approach, “cashing in” the TLH benefit right away would result in investing in securities whose returns have more time to compound². In the example, that would be roughly 15 months (Jan. 25, 2020 to Apr. 15, 2021). Therefore, the simple approach will (on average) erroneously conclude that the after-tax performance of enabling TLH is higher than it actually is.
  2. More realistic and accurate because we can apply proper netting of short/long term gains/losses according to IRS rules. It is only possible to do this right if we know the aggregate values for an entire tax year. Moreover, this provides a basis to handle loss carryovers from previous years and to calculate any remaining loss carryovers for later, which makes our tax calculations even more realistic.


We have been obsessing about investing sophistication and rigor since March 2016, when we started work on our software. We always prefer to do things correctly, even if it’s more work, and even if it penalizes the calculated TLH after-tax performance.


¹ Note that the opposite is also true (i.e. tax payments are not actually due on the day a gain is realized), although only in the context of regular rebalancing, since TLH will not realize gains.

² “Compound” is not the best term here, since this is not bank interest, and securities may move up or down; however, securities markets trend upwards over the long term, so the value will go up, on average.

Author: Rowboat Advisors

Rowboat Advisors builds software for sophisticated and fully automated portfolio management for the financial advisor industry.