Abstract
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 of HMM in 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 R OS 2 , and some other error estimators are used to test the HMM predictions against the historical average model. Finally, both the HMM and 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.
Highlights
Stock traders always wish to buy a stock at a low price and sell it at a higher price
We first use the four criteria: Akaike information criterion (AIC), Bayesian information criterion (BIC), Hannan–Quinn information criterion (HQC), and Consistent Akaike Information Criterion (CAIC) to examine the performances of Hidden Markov model (HMM) with numbers of states from two to six
The results show that HMM with four states is the best model among these five HMM models
Summary
Stock traders always wish to buy a stock at a low price and sell it at a higher price. Gupta et al (2012) implemented HMM by using various observation data (open, close, low, high) prices of stock to predict its closing prices. In our previous work Nguyen and Nguyen (2015), we used HMM for single observation data to predict the regimes of some economic indicators and to make stock selections based on the performances of these stocks during the predicted schemes. After selecting the best model, we use the HMM to predict the S&P 500 price and compare the results with that of the historical average return model (HAR). The authors used HMM with the four observations: close, open, high, and low price of some airline stocks to predict their future closing price using four states. We use the selected HMM model and multiple observations (open, close, high, low prices) to predict the closing price of the S&P 500.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have