I've been playing around with a random selection algo that was recently shared, mostly testing how many securities are needed to effectively diversify (I think most academic studies put the number at about 15 before you hit diminishing returns).
Anyways, the results from those test got me thinking about this algo, a tax efficient approach that attempts to give you a beta of 1, while selling off losing stocks to "harvest" the tax benefit (see investopedia tax harvesting). This algo starts with 30 random stocks picked from the sp500. Each month it checks to see which stocks have unrealized losses, sells them, and blacklists them for 31 days to avoid running into a wash sale. It then randomly picks a few more stocks to replace the ones that were sold and rebalances everything to equal weighting. Additionally, each year, it increases the number of holdings by 5 to inject some fresh blood (otherwise, the companies get stale)
Right now, I'm measuring the tax benefit with a back of the envelope calculation that says (cost basis - current price) * shares, which I expect to be a reasonable proxy for the losses. Also, I would expect that splits and dividends complicate it in ways that I haven't accounted for, but I think it should be pretty close.
I've run the backtest 8 times over the same time to see how the random selection effects it and this was the worst result. The other returns were 270%, 307%, 451%, 337%, 308%, 406%, and 407%. I tried getting a notebook going so I can run a batch of test, but ran into trouble with that.