If one of the stocks you purchased with borrowed funds only produces Capital Gains as investment income, the CRA will not allow the interest deduction.
The CRA ruling regarding this is explained in this link: Line 22100 - Carrying charges and interest expenses
You would need to prorate your Investment Loan Interest according to how much of the loan was used to purchase this particular stock to accurately calculate the deduction.
More information can also be found in this link from TurboTax: Investment Expenses Permitted by the Income Tax Act in Canada