Praise be to Allah.
Bank shares are in fact money, and based on this it is not permissible to buy or sell bank shares because that is selling money for money without meeting the conditions of equal amounts and concluding the exchange in one sitting. Moreover the banks are riba-based institutions and it is not permissible to cooperate with them by either buying or selling, because Allaah says (interpretation of the meaning):
“Help you one another in Al‑Birr and At‑Taqwa (virtue, righteousness and piety); but do not help one another in sin and transgression. And fear Allaah. Verily, Allaah is Severe in punishment”
And it was proven that the Prophet (peace and blessings of Allaah be upon him) cursed the one who consumes riba, the one to whom it is given, the one who writes it down and the two who witness it, and he said they are all the same. Narrated by Imam Muslim.
All that you are entitled to is your capital.
My advice to you and to other Muslims is to beware of all riba-based transactions and to warn against them, and to repent to Allaah from any such transactions you may have engaged in in the past, because riba-based transactions are a kind of war against Allaah and His Messenger (peace and blessings of Allaah be upon him), and are one of the causes of the wrath and punishment of Allaah, and He says (interpretation of the meaning):
“Those who eat Ribaa will not stand (on the Day of Resurrection) except like the standing of a person beaten by Shaytaan (Satan) leading him to insanity. That is because they say: ‘Trading is only like Ribaa,’ whereas Allaah has permitted trading and forbidden Ribaa. So whosoever receives an admonition from his Lord and stops eating Ribaa, shall not be punished for the past; his case is for Allaah (to judge); but whoever returns (to Ribaa), such are the dwellers of the Fire — they will abide therein”
And Allaah says (interpretation of the meaning):
“O you who believe! Be afraid of Allaah and give up what remains (due to you) from Ribaa (from now onward) if you are (really) believers.
279. And if you do not do it, then take a notice of war from Allaah and His Messenger but if you repent, you shall have your capital sums. Deal not unjustly (by asking more than your capital sums), and you shall not be dealt with unjustly (by receiving less than your capital sums)”
And please note the hadeeth referred to above.