The stock market index forecasting is quite a popular topic in the present economy. There are many micro and macro-economic factors which influence the stock prices. With the emergence of machine learning techniques, algorithmic trading became most popular in forecasting the stock prices. There are many traditional machine learning techniques like ARMA, ARIMA which are used to forecast the stock market index. However these techniques consider trends and patterns involved in the data. Since the stock market data is a time series and irregular in nature there will be some noise involved. The present research paper studies the forecasting of stock market index by applying Hidden Markov models which considers the hidden states within the stock market index and traditional ARIMA model. HMM considers the posterior probabilities on different hidden states using Expectation Maximization algorithm. The data considered for the study includes 5 different stock market index Dow Jones, NIFTY 50, S P 500, New York Stock Index (NYSE) and KOSPI. The data includes daily prices of Low, High, Close, Open, Volume for a period of 5 years that is 2014-2019 which accounts to approximately 1380 data points. In HMM model the closing price of the index is considered for determining the transition states and posterior probabilities at 2, 3, 4 and 5 hidden states. Akaike Information Criteria (AIC) and Bayesian information Criterion (BIC) are used to determine the states from HMM. The research paper studies the direction of the market the closing price of the stock index considering HMM. The paper is divided into 5 parts which include Part 1: Introduction, Part 2: Past study, Part 3: Machine Learning Algorithms, Part4: Data Analysis using HMM and Part 5: Results and Conclusion. © 2020 IEEE.