Yeah my point was to be a disclaimer on your comment for what a stupid idea it is.
Interest payments are deductible in many circumstances, borrowing against holdings do not cause taxes from selling the holdings, and in some circumstances capital losses can be converted to net operating losses deductible against income paid in both prior and future years, practically ensuring you get your money back if properly planned. (Carrybacks were removed in the 2017 tax reform law but restored in the CARES Act.)
But I understand, calculated risks are only for people good at math.
Make your own choices