Forecasting the stock market