Question :
What is the ruling of Sharia on designing programs that brokerage firms use for margin trading?
The Answer :
Praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
Designing programs, which are usually used for dealing in usury (Margin trading), is forbidden for this is helping in sin. The evidence on this is that Jabir said : "Allah's Messenger (PBUH) cursed the accepter of interest and its payer, and one who records it, and the two witnesses, and he said: They are all equal." {Related by Muslim}. And Allah The Almighty Knows Best.