Hidden Markov model for stock trading - Nguyet Nguyen (International Journal of Financial Studies, 2018)
Hidden Markov model (HMM) is a statistical signal prediction model, which has been widely used to predict economic regimes and stock prices. In this paper, we introduce the application ofHMMin trading stocks (with S&P 500 index being an example) based on the stock price predictions. The procedure starts by using four criteria, including the Akaike information, the Bayesian information, the Hannan Quinn information, and the Bozdogan Consistent Akaike Information, in order to determine an optimal number of states for the HMM. The selected four-state HMM is then used to predict monthly closing prices of the S&P 500 index. For this work, the out-of-sample R2 OS, and some other error estimators are used to test the HMM predictions against the historical average model. Finally, both theHMMand the historical average model are used to trade the S&P 500. The obtained results clearly prove that the HMM outperforms this traditional method in predicting and trading stocks.
Keywords: 330; hidden Markov model; stock prices; observations; states; regimes; predictions; trading; out-of-sample R2; model validation