The debt that you owe to the bank does not mean that your duty to pay zakaah is waived, according to the most correct scholarly opinion. This has been discussed in the answer to question no. 22426.
It is not right to take out a loan in order to invest in the stock market, especially if the loan is large as in your case. Debt is a great responsibility, so much so that if a martyr is killed in battle for the sake of Allaah he will be rewarded for everything except debt. In the answer to question no. 82011 we have quoted the words of Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) warning against taking loans in order to invest in stocks.
Zakaah is due on that which you have lent to your colleagues, if they still acknowledge the debt and they are paying it off as agreed. You have to pay zakaah on this money every time one year passes from the time when you took possession of the nisaab (minimum threshold of wealth at which zakaah becomes due), but you have the choice between two things: either paying zakaah on it every year, or delaying it until you get this money back, then paying zakaah for all past years.
But if the debtor is in difficulty or taking a long time to pay it back, then you do not have to pay zakaah until you get the money back, then when you get it you have to count a new year from the time when you get it. This has been discussed in the answer to question no. 50014.
With regard to investing in property this comes under the heading of trade goods, because these real estate companies buy land with the aim of dealing in it.
So at the end of the year you have to work out the value of your shares in this company and pay zakaah on them, one quarter of one tenth.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said concerning shares in land belonging to a real-estate company:
It seems that these shares are trade goods, because those who buy shares in land intend to deal in it and earn money from it. Hence they must pay zakaah on it every year, by working out their values and paying zakaah accordingly. If a person has shares worth thirty thousand and at the end of the year these shares are worth sixty thousand, then he must pay zakaah on sixty thousand, and if at the end of the year the thirty thousand is worth only ten thousand, then he only has to pay zakaah on ten thousand. End quote.
Majmoo’ Fataawa Ibn ‘Uthaymeen (18/226).
With regard to the money that you have invested in the stock market, if your intention when buying the shares was to deal in them – as seems to be the case – then these shares are regarded as trade goods, so when the year ends you must work out the value of the shares based on the market value and pay zakaah on them. End quote.
But if you bought the shares to keep them and benefit from their annual profits, then the way of paying zakaah in this case has been explained in the answer to question no. 69912.
And Allaah knows best.