Praise be to Allah.
Firstly: It is permissible to deal in shares if they are clean
There is nothing wrong with dealing in shares, on condition that they are clean and are not mixed or haraam.
Clean shares are shares in a company whose activities are permissible, on condition that it does not deal in riba, either with regard to depositing wealth in bank accounts or with regard to loans. You can find out about that from the company’s prospectus and financial statements.
Mixed shares are shares in a company whose activities are permissible, such as pharmaceutical companies, if it borrows with interest or deposits money in interest-bearing accounts. Two statements have been issued by Islamic Fiqh Councils stating that it is haraam to deal in mixed shares.
See the answer to the question: Ruling on trading and investing in shares.
What you must do is get rid of these shares by selling them, and purifying the price you receive for them [by donating to charitable causes commensurate with the percentage of the wealth that is haraam according to what is mentioned above].
It says in Fataawa al-Lajnah ad-Daa’imah (14/299): Question: I fear Allah and hate riba. I have some shares in the electric company, Sabic, the agricultural company in Tabook, the National Agricultural Development Company (Nadec), the Kuwait Cement Company, and an auto company. I have heard a great deal of talk about there being riba in these companies. But I decided not to make any decision until I hear the truth from you, O shaykh, may Allah reward you with good. If there is riba [in these companies], then how can I get rid of it and get my money back?
Answer: Firstly: with regard to any company which is proven to deal in riba, either receiving it or giving it, it is haraam to buy shares in that company, because that comes under the heading of cooperating in sin and transgression. Allah, may He be exalted, says (interpretation of the meaning): “And cooperate in righteousness and piety, but do not cooperate in sin and transgression. And fear Allah ; indeed, Allah is severe in penalty” [al-Maa’idah 5:2].
Secondly: if someone has previously bought shares in a company that deals in riba, then he must sell his shares in that company, and spend the interest on charitable causes and projects. And Allah is the source of strength. May Allah send blessings and peace upon our Prophet Muhammad and his family and companions. End quote.
Secondly: Options contracts on shares
It is haraam to deal in options contracts, whether the option is for the seller or the buyer, because of what it involves of ambiguity and because the option in options contracts does not have to do with money or a benefit that one may exchange for something else, as was stated in a statement of the Islamic Fiqh Council. See the answer to question no. 216654 .
If someone owns shares – even if they are clean – it is not permissible for him to sell them in future options contracts.
And Allah knows best.