Get your taxes done using TurboTax

If you used the investment loan to purchase a mortgage on the second home, the interest paid on the mortgage would be deductible as an itemized deduction on Schedule A.  However, the margin loan interest would still not be deductible.

If you purchased the residential property as an investment, such as a rental, with no personal use, then the margin interest would be deductible.  And if you had a mortgage on the rental property, the mortgage interest would be an expense you could enter on Schedule E.