Peace be upon you. According to Grand Ayatollah Sayyid Sistani (may Allah protect him): There is no issue in itself, but it is necessary to observe the conditions for the permissibility and validity of the transaction, including: 1. It is not permissible to engage with companies and banks that deal in usury with those from whom it is not permissible to take an increase, as participating in their capital means entering into their usurious transactions unless one declares their disapproval of participating in them. 2. It is not permissible to engage with companies that invest their funds in prohibited areas such as selling alcohol, etc. 3. It is not permissible for both the sold item and the price to be a debt owed before the contract, nor is it permissible for both to be deferred in the contract due to the invalidity of selling debt for debt. Source: [Official Site](
https://www.sistani.com/arabic/qa/10345/). Additionally, according to Grand Ayatollah Sayyid Khamenei (may Allah protect him): Generally, if the activity in the stock market is in accordance with the relevant laws and Sharia standards (such as being non-usurious and not involving shares of companies engaged in prohibited activities like alcohol and pork), then there is no issue. Source: [Official Site, Q9](
https://www.leader.ir/ar/content/24662). May you be successful in all good.