Praise be to Allah.
Putting money in a shared bank portfolio to build real estate and then trade in it or benefit from the dividends comes under the heading of dealing in real estate shares.
The basic principle with regard to zakaah on shares is: if the company [or bank] has not paid zakaah on its wealth for any reason, then what the shareholders must do is pay zakaah on their shares. If the shareholder is able to find out from the company accounts how much zakaah is due on his own shares (that is if the company has paid zakaah on its wealth in the manner indicated), then he should pay zakaah on his shares in this manner, because that is the basic principle with regard to paying zakaah on shares.
If the shareholder is not able to find out about that:
If he bought shares in the company with the aim of benefitting from the annual dividend of the shares, not with the aim of trading in them, then this shareholder does not have to pay zakaah on the shares themselves; rather he must pay zakaah on the dividend, at the rate of one quarter of one tenth after one full hijri year has passed since he took possession of the dividend. He should also pay attention to the conditions of zakaah being obligatory and make sure there are no impediments.
If the shareholder bought the shares with the aim of trading in them, he should pay zakaah on them as trade goods. If zakaah becomes due on them when they are still in his possession, he should pay zaakah on the market value. If they have no market value, he should pay zakaah on their value as estimated by experts. He should pay one quarter of one tenth, or 2.5%, of that value and of the profit if there is any.
End quote from Majallat Majma‘ al-Fiqh al-Islami (1/879)
Based on that:
If you bought this portfolio with the intention of benefitting from the dividends, but you have not received anything, then you do not have to pay zakaah on it. If you have received a small amount of profit, but you spent it before one full hijri year had passed, then you do not have to pay zakaah on it either.
If you bought these shares with the intention of trading in them, then you have to pay zakaah every year on the market value of the shares. There is nothing wrong with you paying the obligatory zakaah from any money you have, from bank profits or otherwise, so long as it is permissible according to sharee‘ah.
If a person is obliged to pay zakaah but he does not have any cash, it is permissible for him to delay paying zakaah until he has the cash, or to pay in instalments whenever he is able to do so, and he does not have to take out a loan.
Al-Mirdaawi (may Allah have mercy on him) said in al-Insaaf (3/186): If you are not able to pay it from the wealth itself because it is not available or for some other reason, it is permissible to delay it until you are able to do so. End quote.
Shaykh Ibn Baaz (may Allah have mercy on him) said: If the land and the like, such as the house and car and so on, are intended for trade, then you have to pay zakaah every year based on their value at the end of the zakaah year, and it is not permissible to delay that, except for one who is unable to pay his zakaah because he has no other wealth. In this case he may delay it until he sells it and pays the zakaah for all years, each year according to its value at the end of that zakaah year, whether the value was greater than the price or less. What I mean is: the price for which the land or car or house was bought.
End quote from Majma‘ al-Fataawa, 14/161
And Allah knows best.