Applied Intelligence, cilt.53, sa.20, ss.23812-23833, 2023 (SCI-Expanded)
Hidden Markov Model (HMM) which is frequently used in time series modeling with satisfactory results is commonly used for predicting stock prices in many studies. Due to its more transparent structure than most of the current Neural Network (NN) models and its sensitivity to the initial parameter settings, we propose a hybrid model that combines Recurrent NN (RNN) and HMM in modeling stock prices to eliminate initial parameter influence. Despite its common application to speech recognition data with categorical variables, we reconstruct RNN and HMM for financial data. RNN is used as a solution to the probability of not reaching the global maximum based on the HMM’s initial parameters selection. To do so, we improve the classification power of HMM to achieve the hidden states that do not get stuck at a local maximum but provide the global maximum. In addition, unlike the literature, the loss function is not chosen as the maximum likelihood but is defined directly over the prices. Thus, the model does not only detect the states appropriately, yet the predictions can get closer to the actual prices. Besides, a multivariate comparison is performed to determine the effect of different numbers and types of variables through bivariate and trivariate models. The application is made on S &P 500, Nasdaq daily closing prices and daily EUR/USD exchange rates data from 2000 to 2021. It is shown that the accuracy is increased significantly compared to the implementations of HMM and RNN methods separately.