The thesis deals with forecasting the S&P 500 stock market index. This is a commonly used metric for the state of US economy, as it consists of many companies. Index changes can be observed at different intervals. We decided to create models for forecasting the index and its volatility on a hourly interval and on a daily interval. The models were trained and tested on historical data. Since the index is a time series, decided to tested recurrent neural networks and compared them with sucessful XGBoost algorithm.
We tested RNN, LSTM and GRU cells. For hourly forecasts, the GRU cell model was the best with a relative mean error of 0.221 and an error of 0.095 in the volatility forecast. For the daily difference predictions, we first used time series decomposition to remove the trend from the data so that older data generalized better. We created a model consisting of LSTM cells to which we added recurrent dropout and layer normalization. Thus, we obtained a model that achieves a relative mean error of 0.6104 in the predicted differences.
|