Yes it is halal, as long as the following are meant:
- Trading stocks of companies or constituents do not breach the principles of Shariah. Investments related to unethical or moral behaviors are Forbidden in Islam. There are several prohibited industries in Islamic finance.
- Financial services that feature transactions based on gambling, speculation and/or interest. Examples would include conventional banks, investment companies, insurance companies, and other financial institutions.
- Certain food and beverages industries, most scholars agree that investing in tobacco, illegal drugs, alcohol, and other non-halal foods/beverages are prohibited.
- Gambling; this means Islamic funds can not invest in online lotteries, casinos, lotto draws and betting transactions.
- Some sectors in the Entertainment industry; those sharia prohibitions apply to adult entertainment products including videos, audio recordings, websites, magazines, etc. The same goes for certain types of non-Islamic music and cinema products.
- Cloning; this decision is a fairly recent one. Islamic scholars must continually make decisions about the compliance state of new technologies and industries.
If an individual invests in shares of a company with prohibited activities. That the amount of income generated from prohibited component does not exceed 5% of the total income of the corporation irrespective of the income being generated by undertaking a prohibited activity, by ownership of a prohibited asset or in some other way. If a source of income is not properly disclosed then more effort is to be exerted for identification thereof giving due care and caution in this respect.
It is important for investors to look into the financial screening of the corporations before investing in their stocks/funds. It is not permissible to participate or trade in shares of corporations whose primary activity is permissible but they make deposits or borrow on the basis of interest. The fundamental rule is that of the prohibition of acquiring shares of and transactions (investment and trading) in the shares of corporations that sometimes undertake transactions in Riba and other prohibited but from things even when their primary activity is permissible.
It is not permissible to undertake trading in shares of a corporation, when the assets of the corporation are cash exclusively, whether this is during the period of subscription or after that, prior to the commencement of the business of the company or at the time of liquidation, except at their nominal value with the condition of delivery of possession. It is also not permissible to undertake in the shares of a corporation if the entire assets of the corporation are composed of debts unless the rules for dealing in debts are observed.
Sources: dummies and iefpedia Shari’ah Standard