Deductions & credits

And if I used proceeds from HELOC to invest (say in stocks) and made profit from that investment, I cannot deduct HELOC interest from my investment profit as an "expense"?