:salam2:
I am not a scholar, so please you should consult a scholar. But this is what I have learnt:
It is haram to invest or buying stocks of conventional banks that deal in interest.
Al-Tirmidhi Hadith 2829 Narrated byAli ibn AbuTalib Ali heard Allah's Messenger (peace be upon him) curse those who took usury, those who paid it, those who recorded it, and those who refused to give sadaqah. And he used to prohibit wailing. Nasa'i transmitted it.
Buying stocks of a company is halal if the company is not a liquor company, is not related to prostitution, is not related to haram entertainment, etc. Even though a company's main business is halal, if it deals or takes income through interest investing in its stock may be haram depending on the percentage of that haram transaction being involved in the company. For that the investor has to check the annual reports of the company and check if the company has taken any Loan from a conventional bank, taking interest from banls, etc. If so then it is not halal to invest, even if the company's mail line of business is halal. Only if the loan and the income through interest constitutes only a very very little percentage of the company's capital and income then it is halal, but it is advised the investor give out as charity that percentage of money from his profit. . Allah knows best.