Connecting Loan account to portfolio

Is there an option to connect my loan account that I use to purchase shares to a portfolio?
I would like to create a loan portfolio with loan account linked to it.
When I purchase shares using this account, the interest i pay should be used in showing a portfolio performance.
Is this possible?

I have purchased few shares using my loan account and am paying interest on the loan.
Currently I am entering this manually into the brokerage cash account but is there any way to automate this? also how do I get this into my eof tax report?