Machine Learning in Prediction of Asset Price Bubble Bursts - Hvězda, Martin (2023)
This master thesis deals with a comparison of machine learning algorithms to be able to identify a bubble burst in form of a crash in a stock index based on prior price patterns. The algorithms compared in terms of technical performance are: linear regression, logistic regression, XGBoost decision trees, support vector machines and a recurrent neural network. The algorithms are then used for development of trading strategy that enables an investor to exit the market when provided with a crash signal from the model to protect them from large losses in their portfolio. Alternatively, the signal can also be used to hedge against the loss by entering a short position in futures or options. This strategy is then compared with a Buy and Hold strategy used by conservative investors. A total number of 8 large world stock indexes were used in the work, out of which one (S&P 500 Index) was used for testing and the remaining 7 for training and validation (training set of 7 and 1 for the validation of training data). The data are then time series for the last 20 years ranging from 01/01/2003 until 31.12.2022. The selected performance measure was F-beta score that calculates the weighted harmonic mean of accuracy and recall. The developed models performed significantly better than comparable random models in predicting an upcoming crash in different prediction periods. The empirical part is then further divided into two use cases with different identification of a crash and different prediction periods. While shallow machine learning models were able to perform better in longer prediction periods with unbalanced target variable, a Recurrent Neural Network with LSTM architecture managed to deliver better results when the prediction periods are shorter, and more balance is introduced into the response variable. For example, in case of a 1-day prediction, the RNN was able to outperform the Buy and Hold strategy by more than 200 % in the last 20 years.