Good luck on the tax planning. If you've got big gains to offset, you're doing way better than most in 2022. I'm not a fan of selling a stock you think is undervalued, just for a tax loss. As you can't simply add back after 30 days. What if the stock jumps 20% during that time?