It is permissible to deal in permissible stocks, but not those which are haraam or mixed. Haraam stocks are stocks in riba-based banks; tourism companies and hotels which promote and help in immorality; facilities that make alcohol and commercial insurance companies. See the answer to question no. 112445.
It is not permissible to help in buying stocks that are not permissible according to shareeâah, because Allah 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â
Based on that, if your work involves facilitating the purchase of the stocks or helping in that in any way, then this helping is haraam, and the salary earned from that is haraam. You should try to leave this company or move to a department which is free of helping in haraam matters, because the sin is not limited to the one who directly commits the haraam action; rather the one who helps in it, approves of it or promotes it is also affected.
And Allah knows best.