# What is an appropriate algorithm to use for tax loss harvesting?

I've been reading into how Betterment and Wealthfront have architected their tax loss harvesting algorithms, but they stop short of providing any real examples.

Essentially, they both reduce to:

Benefit – Cost ≥ Threshold


They differ in how they define each term, however. Threshold is proprietary and the result of Monte Carlo research, so let's leave it aside for now.

Benefit looks like it is best measured as a percentage of the asset class in the portfolio. For example, if cost basis of the emerging markets fund makes up 10,000 of a portfolio and the loss is $400, does it make sense to say the benefit is ($60 ÷ \$10,000) = .6%


Then cost, for example, would equal the management fee difference. Let's say .09% and .18%, plus any commissions or bid/ask spread losses expressed as a percent.

(.09% - .18%) - 0 - 0 = .09%


Making the difference

.6% - .09% ≥ Threshold


Have I thought about this correctly or am I missing IRR and time horizons?

## 1 Answer

The answer is that you may use an approach that includes IRR, but that's not a necessary component of what I would consider a good model. I have seen commercial tools that include them and those that don't. I have also seen practitioners set the variables in packages that include this approach, so that they were not a relevant component of the resulting model.

You're going to want both a view of historical results and consider Monte Carlo to get a better feeling for the probability surface of your strategy.

This section of the Wealthfront documentation might help you. They show that they have considered approaches incorporating IRR. https://research.wealthfront.com/whitepapers/tax-loss-harvesting/#15a-quantifying_the_value_of_tax_deferral_differential_IRR

I don't know who works on Wealthfront's algorithms, but I would like to. I cannot speak to the quality of their services in any way, but I can say that the research in the whitepaper above is not naive. And that is saying something special in the world of tax efficient portfolio management for retail investors.

• I'd like to know as well. Perhaps they can respond here? I think Betterement uses IRR because I've asked them about their "deferral horizon" and they say it's 67 years of age or when the goal has run out. They published their switching calculator. So the final key to the puzzle is how they calculate expected returns but I venture it's just CAGR. Wealthfront is more of a mystery to me. – Maletor Mar 7 '15 at 1:20
• If you're somewhat new to this space then I would suggest that you look for research by Dan diBartolomeo. He has a company called Northfield, but has published plenty of non-commercial stuff as well as helpful white papers for the software. I'm going to to take a look at that switching calculator, so thanks for the pointer. The Betterment stuff looked solid from what I saw, but not as slick and clear a presentation as the Wealthfront stuff. – Nathan S. Mar 7 '15 at 17:23