DSE Stock Price Prediction using Hidden Markov Model

Abstract

As a classic problem, stock market prediction is a topic that has been extensively explored utilizing machine learning and artificial neural network-based tools and techniques. Interesting aspects of this problem include its time reliance as well as its volatility and other such complex relationships. To combine them, hidden Markov models (HMMs) have been utilized to anticipate and predict the stock market. We demonstrated the Maximum a Posteriori HMM method for predicting stock prices for the next day based on previous data. HMM is trained by analyzing the fractional change in the stock price as well as the intraday high and low values. It is then used to create a Maximum a Posteriori decision across all possible stock prices for the next day using the HMM model. The approach demonstrated in our work is quite generalized and can be used to predict the stock prices for any company, given that the hmm is trained on the dataset of that company’s stocks dataset. We evaluated the accuracy of our models using some extensively used accuracy metrics for regression problems and came up with a satisfactory outcome.