If you have a redraw and draw funds to directly pay to buy income producing shares then interest is deductible for the period of ownership of the shares. The interest is deductible against the dividend income. (s8-1 ITAA)
If you buy shares that don't pay dividends then the deduction is not available. It may comprise a cost base of the asset for CGT purposes. When sold it may reduce the profit. So sort of deductible but not against other income if its a loss. Whereas a revenue loss as described in para 1 above can offset other (wages) income.