Risk management in the stock market