I listened to a Shiur on Chabad.org about stocks and halacha https://www.chabad.org/multimedia/audio_cdo/aid/457200/jewish/The-Stock-Market.htm Although I feel like the questions that were asked in the lesson were very well articulated, I didn’t really hear any answer for the more practical issue of investing in "Traife Companies" - namely, that they earn money from forbidden activities and distribute that money to shareholders. Also, what do you think about investing in index funds, which automatically give you exposure to those "Traife Companies"? Thank you.
There is no clear answer to the term "Traife Companies". One should consult a rabbi on a specific question. I’ll try to give general guidelines which may help understanding some of the issues. If one is a partner in a business or holds more than 50% of the stock, he has ownership over the company, and therefore is fully responsible for all its actions. If one holds stocks of a company but less than 50%, he does not have ownership, but there are other problems. It may be forbidden for him to support the company as he is abetting in a transgression which is forbidden. If people know he is a shareholder in such a company, he may be giving legitimacy to their forbidden actions, which is also forbidden. If one knows that the company is dealing with things which are completely forbidden to benefit from, such as idolatry, this may be a problem, unless there is a way he can make some condition that his share comes only from permitted businesses. In regard to index funds, you don’t usually have any of the above concerns, and therefore it is Halachically a legitimate investment. If one sees that most of their investments are going towards companies of forbidden merchandise, it may be the time to pull out and look for an alternative investment.