The Scholars have discussed the ruling of buying and selling shares, as well as participating in the stock market.
In general, it is permissible to buy and sell stock of a company which does not deal with riba (usury) and has ownership of products and/or property. The Permanent Committee was asked:
Question: Please inform me whether it is permissible to buy stocks from a company in cash and sell them to another person for a higher price that is to be paid to me in installments over a period of a year, knowing that the buyer will sell the stocks after receiving them from me for a price that is less than that upon which we agreed.
Answer: There is no problem with buying or selling stocks as long as the companies that are dealt with do not use Riba (interest), and that they are ownership companies, such as architectural, agricultural or production companies. It is also permissible for the person who buys these stocks to sell them or deal in them without restrictions.
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions. [https://alifta.com/Search/ResultDetails.aspx?languagename=en&lang=en&view=result&fatwaNum=&FatwaNumID=&ID=14489&searchScope=7&SearchScopeLevels1=&SearchScopeLevels2=&highLight=1&SearchType=exact&SearchMoesar=false&bookID=&LeftVal=0&RightVal=0&simple=&SearchCriteria=allwords&PagePath=&siteSection=1&searchkeyword=098117121105110103032115116111099107115#firstKeyWordFound]
They also passed a similar fatwa here:
However, the Scholars have warned against participating in the stock market due to the doubt that surrounds the companies that trade on it. The stock market is a mixed environment, with many companies working with riba (usury) or having partnership or trade with companies that work with it.
Shaikh Fawzan (may Allah preserve him) was asked:
Question: May Allah be good to you eminent Shaikh, this questioner says: What is the ruling on taking up shares in general and with the bank specifically considering that he says: that there are are thirteen companies and organizations that will put forth their stock in the coming month?
Answer: “I say: it is upon a Muslim not to join as a shareholder nor partnership until he knows its reality in detail. Until he knows its reality and what [the company] does. If it is safe from haram, from usury, from lying and cheating, ignorance, and Gharar (risk), then he enters into it. As for if he does not know it, then he avoids it due to the statement of the Prophet (ﷺ):
إنَّ الْحَلَالَ بَيِّنٌ، وَإِنَّ الْحَرَامَ بَيِّنٌ، وَبَيْنَهُمَا أُمُورٌ مُشْتَبِهَاتٌ لَا يَعْلَمُهُنَّ كَثِيرٌ مِنْ النَّاسِ، فَمَنْ اتَّقَى الشُّبُهَاتِ فَقْد اسْتَبْرَأَ لِدِينِهِ وَعِرْضِهِ، وَمَنْ وَقَعَ فِي الشُّبُهَاتِ وَقَعَ فِي الْحَرَامِ، كَالرَّاعِي يَرْعَى حَوْلَ الْحِمَى يُوشِكُ أَنْ يَرْتَعَ فِيهِ
And between the two of them are doubtful matters about which many people do not know. Thus he who avoids doubtful matters clears himself in regard to his religion and his honor, but he who falls into doubtful matters [eventually] falls into that which is unlawful, like the shepherd who pastures around a sanctuary, all but grazing therein [Bukhari and Muslim].
You should enter into something you knows is safe, halal, and lawful earnings. As for that which you know is haram, then you avoid it out of obligation. As for something that is doubtful to you, then you avoid it out of cautiousness and to protect your conscience. The Prophet (ﷺ) said:
دَعْ مَا يُرِيبُك إلَى مَا لَا يُرِيبُك
Leave that which makes you doubt for that which does not make you doubt [Saheeh Tirmidhi no. 2518 ]
Shaikh Ibn ul-‘Uthaymeen rahimahullah was asked:
Question: What is the Legislated ruling on the stock/shares of companies which are circulating on the market? Is it allowed to do business with them?
Answer: “I cannot answer this question because the companies present on the market differ in their dealing with usury. If you know that this company works with usury and distributes the profits of this usury with those who participate with them [investors/shareholders], then it is not allowed to partner with it. If you partnered with them, then afterwards you learn that it deals with usury, then you should go to the administration and cancel the partnership. If it is not possible, then you should remain in the company. When they give you the profit and it is revealed the source of that profit, then you take the halal amount of profit and get rid of the haram. If you do not know, then cautiousness is to get rid of half of the profit and keep the other half. This is because this what you are able to do and Allah says: Fear Allah as much as you can [4:16]” [Fatawa al-Islamiyyah (2/263-264) as cited in Al-Asham al-Mukhtalit pg. 119]
Shaikh al-Albani rahimahullah was also against buying the shares on stock market [See: Silsilatul-Huda wan-Nur no. 427]
So it is advised to avoid trading in the stock market due to the doubt and prevalent use of usury.
And Allah Knows Best
Faisal Ibn Abdul Qaadir Ibn Hassan