If you’re gonna say “they benefit in the extra capital gains between now and when the loan is repaid” - no, that can’t be it, that’s exactly equivalent to taking a $100 loan and investing in stocks instead (i.e. leverage).
If you’re gonna say “they benefit in the extra capital gains between now and when the loan is repaid” - no, that can’t be it, that’s exactly equivalent to taking a $100 loan and investing in stocks instead (i.e. leverage).
2) You're buying a house, and you need $100 today.
3) You sell $100 of SPY, and pay short-term capital gains (up to 37%)
OR...
1) You purchased $100 of SPY on June 15th, 2020
2) You're buying a house, and you need $100 today.
3) You take a loan for $100
4) You wait until June 15th, 2021 and then sell $100 of your SPY holdings, paying long-term capital gains (15-20%)
5) You repay the $100 loan
...it doesn't really avoid tax. It's just an alternative way of accessing capital by taking out a loan instead of liquidating assets.
I might be misunderstanding your question though.
Finally, it's also possible to roll the gains into a trust and the cost basis is adjusted to zero on death. [0] So yes, it's tax avoidance.
[0]: E.g. this is how it's possible to do that: https://wellergroupllc.com/taxes-resources/tax140-guide-dete...