One of the most common examples of investment interest expense involves the use of a margin loan at a brokerage. If you "go on margin" with your stockbroker, it means you're borrowing money from the firm to buy stocks or other investments. The interest you pay on that margin loan is qualifying investment interest.
You can only take a deduction for investment interest expenses that is lesser than or equal to your net investment income. For example, if you have $3,000 in margin interest but net investment income of only $1,000, you can only deduct the $1,000 in investment interest in the current year.
For more information, please see this LINK