Prediction of stock price based on hidden Markov model and nearest neighbour algorithm

Author(s):  
Asadullah Al Galib ◽  
Mahbub Alam ◽  
Rashedur M. Rahman
Author(s):  
Kastolan Kastolan ◽  
Berlian Setiawaty ◽  
N. K. Kutha Ardana

AbstractThe problem of portfolio optimization is to select a trading strategy which maximizes the expected terminal wealth. Since the stocks are traded at discrete random times in a real-world market, we are interested in a time sampling method. The sampling of stock price is obtained from the process of time sampling which is used in a point and figure chart. Point and figure (PF) chart displays the up and down movements of unbalanced stock prices. The basic idea is to describe essential movements of the unbalanced stock prices using a hidden Markov model. The model parameters are transition probability matrices. They are estimated using maximum likelihood method and expectation maximization algorithm. The estimation procedure involves change of measure. The model is then applied to the stock price of Bumi Resources Tbk. collected on a daily basis. The estimated parameters are used to calculate the optimal portfolio using a recursive algorithm. The results show that the discrete hidden Markov model can be applied to describe essential movements of the stock price. The best result gives 93.63% accuracy of the estimate of observation sequence with mean absolute percentage error (MAPE) 3.63%. The numerical calculation shows that the optimal logarithmic PF-portfolio increases the wealth.Keywords: point and figure portfolio; optimization portfolio; discrete hidden Markov model; expectation maximization algorithm; stock price of Bumi Resources Tbk. AbstrakMasalah pengoptimalan portofolio adalah pemilihan strategi perdagangan yang dapat memaksimalkan kekayaan terminal yang diharapkan. Karena di pasar dunia nyata, saham diperdagangkan pada waktu acak yang berbeda, sehingga kami tertarik pada metode pengambilan sampel waktu. Proses pengambilan sampel waktu diperoleh sampling harga saham yang digunakan dalam diagram point and figure (PF-chart). Grafik point and figure hanya menampilkan pergerakan naik atau turun harga saham yang tidak seimbang. Ide dasarnya adalah untuk mendeskripsikan pergerakan esensial dari harga saham yang tidak seimbang menggunakan model hidden Markov. Parameter dari model ini adalah matriks probabilitas transisi. Parameter diestimasi menggunakan metode maximum likelihood dan algoritma expectation maximization. Prosedur estimasi melibatkan perubahan ukuran. Model ini kemudian diaplikasikan pada harga saham Bumi Resources Tbk. dari tanggal 2 Januari 2007 sampai dengan 31 Januari 2011. Hasil estimasi parameter tersebut digunakan untuk menghitung portofolio optimal menggunakan algoritma rekursif. Hasil penelitian ini menunjukkan bahwa model hidden Markov diskrit dapat diterapkan untuk menggambarkan pergerakan esensial dari harga saham. Model terbaik memberikan akurasi 93.63% dari estimasi deretan observasi dengan mean absolute percentage error (MAPE) 3,63% dan 5 faktor penyebab kejadian. Perhitungan numerik menunjukkan bahwa logaritma portofolio-PF yang optimal dapat meningkatkan kekayaan.Kata kunci: portofolio point and figure; optimalisasi portofolio; model hidden Markov diskrit; algoritma expectation maximization; harga saham PT Bumi Resources.


2020 ◽  
Vol 3 (1) ◽  
pp. 70-78
Author(s):  
Donata D. Acula ◽  
Teofilo De Guzman

The main focus of this research is the enhancement of the Hidden Markov Model by using some features of Neural Networks and the forecasted values of predictors by Seasonal Autoregressive Integrated Moving Average. The enhanced method was used to predict the close price of stocks whose predictors are open price, high price, low price, and volume of Apple and Nokia data. The performance of the method was measured using the Mean Absolute Percentage Error of the predicted price. The result was compared against the actual close price by using the paired T-test. The testing of the hypothesis showed that the Enhanced Hidden Markov Model obtained more than 94% accuracy rate. It also shows that in Apple data, the predicted close price of the Enhanced Hidden Markov Model is significantly better than the predicted close price of Neural Networks. Using Nokia data, the test claims that there is no difference between the performance of Enhanced Hidden Markov Model and Neural Network in prediction. 


2019 ◽  
Vol 12 (4) ◽  
pp. 168 ◽  
Author(s):  
Eun-chong Kim ◽  
Han-wook Jeong ◽  
Nak-young Lee

This study uses the hidden Markov model (HMM) to identify the phases of individual assets and proposes an investment strategy using price trends effectively. We conducted empirical analysis for 15 years from January 2004 to December 2018 on universes of global assets divided into 10 classes and the more detailed 22 classes. Both universes have been shown to have superior performance in strategy using HMM in common. By examining the change in the weight of the portfolio, the weight change between the asset classes occurs dynamically. This shows that HMM increases the weight of stocks when stock price rises and increases the weight of bonds when stock price falls. As a result of analyzing the performance, it was shown that the HMM effectively reflects the asset selection effect in Jensen’s alpha, Fama’s Net Selectivity and Treynor-Mazuy model. In addition, the strategy of the HMM has positive gamma value even in the Treynor-Mazuy model. Ultimately, HMM is expected to enable stable management compared to existing momentum strategies by having asset selection effect and market forecasting ability.


2016 ◽  
Vol 9 (3) ◽  
pp. 696-713
Author(s):  
Edesiri Nkemnole

The movement of stock prices, in capital markets across the world, has been found to be both random and non-random. Basically, for a stock price to follow a random walk, its future price changes randomly based on all currently available information in the stock market, its price history inclusive. Some research findings have shown that the existing traditional unit root tests have low statistical power and hence cannot capture gradual changes over successive observations. Consequently, there is a need to revisit the random walk theory in stock prices using other tests. This study employs a Hidden Markov Model (HMM) with time-varying parameters to assess whether the stock price movements of the Nigerian Stock Exchange (NSE) follow a random walk process, or otherwise. Via hidden states, the HMM allows for periods with different volatility levels characterised by the hidden states. By simply accounting for the non-constant variance of the data with a two-state Hidden Markov Model and taking estimation into account via the Sequential Monte Carlo Expectation Maximisation (SMCEM) technique, this study finds no support of randomness. In conclusion, the stock price movements of the NSE do not follow the random walk process.


2012 ◽  
Vol 132 (10) ◽  
pp. 1589-1594 ◽  
Author(s):  
Hayato Waki ◽  
Yutaka Suzuki ◽  
Osamu Sakata ◽  
Mizuya Fukasawa ◽  
Hatsuhiro Kato

Sign in / Sign up

Export Citation Format

Share Document