Most contemporary scholars permit buying shares in companies whose main business is lawful, with conditions. Shares in companies whose main business is haram (alcohol, interest-based banks) are forbidden. Scholars differ about companies that are mostly lawful but have a small amount of interest income, and about margin buying and short selling, which most forbid. Check the company and ask a scholar.
Ó fiéis,, não consumais reciprocamente os vossos bens, por vaidades, realizai comércio de mútuo consentimento e nãocometais suicídio, porque Deus é Misericordioso para convosco.
This is general information, not a fatwa. For your own situation, ask a qualified scholar.
Questions about halal and haram
Is trading in stocks halal?
Most contemporary scholars permit buying shares in companies whose main business is lawful, with conditions. Shares in companies whose main business is haram (alcohol, interest-based banks) are forbidden. Scholars differ about companies that are mostly lawful but have a small amount of interest income, and about margin buying and short selling, which most forbid. Check the company and ask a scholar.