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.
Hai orang-orang yang beriman, janganlah kamu saling memakan harta sesamamu dengan jalan yang batil, kecuali dengan jalan perniagaan yang berlaku dengan suka sama-suka di antara kamu. Dan janganlah kamu membunuh dirimu; sesungguhnya Allah adalah Maha Penyayang kepadamu.
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.