The stock exchange is a market place where shares are bought and sold. By buying the shares of a company, you, in fact, share in the business. Therefore, if there is nothing against Islam in the nature of the business, there is nothing wrong in being the shareholder of that business and in getting dividends on those shares. Similarly, if you sell the shares at any point of time owing to some reason and get capital gains thereby, the transaction and the profit will not be wrong from the point of view of Islam. However, when this trading moves beyond mere buying and selling, ie when the buyer and the seller do not remain a buyer and a seller but become a `bear' or a `bull', trouble begins.
Ideally, the market price of a share should be related to the performance of the company. But the speculators (euphemistically called investors) manipulate the prices by artificially stimulating the demand and the supply of shares. Forward contracts are made and further contracts are derived (financial derivatives) on that basis. The result is that the whole market activity is based on speculation rather than being based on entrepreneurship. The share price of a company doing perfectly well suddenly falls and that of a company in trouble suddenly rises. A person earns millions and loses millions in a day in this game. Obviously, such fluctuations have a negative impact on the economy, which is usually borne by the not-so-affluent sections of the society. One of the worst cases of such speculation was when on Oct. 19, 1987 --- now known as the Black Monday --- Wall Street crashed owing to the panic that had spread among the investors. Billions are lost in a day in such crashes. Since shares are sometimes bought and sold even before they have been actually bought and sold and, at times, are bought primarily on the basis of borrowed capital (as in the case of the famous Australian investor Alan Bond), stakes are high and the slightest fear can start a chain reaction, which may result in a major catastrophe. The reason for such timorousness is nothing except that the whole economic activity in these exchanges is based on speculation rather than on entrepreneurship. When such a large area of economic activity is based on speculation, the spirit of entrepreneurship suffers and moral corruption pervades the society.
Islam wants that the economic activity of its followers be based on entrepreneurship, hard work, creativity, moral principles and concern for others, whereas speculation is often detrimental to these values.
The moral corruption that ensues from such activities as speculation far exceeds whatever material benefit they give. Therefore , it is more closer to taqwa (fear of God) to avoid them. Avarice and greed, on which such speculation is based are absolutely opposed to taqwa. It is the foundation of infaaq (spending in the way of Allah) on which Islam wants to build the edifice of an economy. This spirit of infaaq often dies in the absence of fear of God---and avarice and greed become the Deity*
In an Islamic state, the government has the right to enact such laws as would eliminate the inherent risks of deception and loss by which either party can suffer in such activities as speculation on the stock exchange. However, until such laws are framed, it is upto the individual to decide when his trading becomes such speculation as would be detrimental to his taqwa. But that is a question which each individual must answer for himself. The rule here is sal nafsak (ask thy heart) --- it will tell you the truth.