Machine Learning has seen phenomenal success in recent days in diverse areas of science, economics, finance, medicine, engineering. The finance sector has been quite keen on machine learning development. One of the applications of machine learning is on stock market prediction, where the past and present price can be used to predict the future price.
However, predicting the stock price is quite a challenging problem due to the complex dynamic nonlinear nature of the stock market. The stock market has too many variables that make it quite difficult to model. Recently, machine learning models have seen a lot of attraction among financial institutions to use it as market price prediction.
Traditionally, statistical and econometric models like linear statistical time series models such as Autoregressive Integrated Moving Average (ARIMA) are used for stock market prediction. However, linear models such as ARIMA don’t perform well to predict stock prices which are highly non-linear and dynamic. Today supervised machine learning algorithms like Support Vector Machines (SVM)  , Long Short Term Memory (LSTM)   , as well as newer machine learning paradigms such as reinforcement learning   are being popular in stock market prediction.
In supervised learning, the training data consists of labelled examples. Each example consists of features and the corresponding data label. In the case of the stock market, the features could be opening price, closing price, volume, liquidity, and so on. The label could be the stock price. The machine learning algorithms are trained so that it predicts the price for future dates getting trained with the data from the past.
Support Vector Machines (SVM) are under the supervised learning class of machine learning algorithms and highly efficient binary classifiers. SVM scales well with high dimensional data and is memory efficient. However, SVM doesn’t perform well in noisy datasets. Despite its limitations, SVM is seen to have performed well in stock market prediction.
Long Short-term memory (LSTM) is an artificial neural network architecture that is useful for predictions based on time series data such as the stock market. LSTM falls under the class of recurrent neural networks. Recurrent neural networks are known to have a memory as the information cycle flows through a loop. Therefore the decisions are based not only on the current input but also on its knowledge of previous inputs. Such networks are useful for time series data like stock price, where learning from the previous price history can have a significant role. However, recurrent neural networks are known to have only short-term memory. LSTM has solved the limitation of short term memory of plain recurrent neural networks. LSTM can remember inputs over a long period as the LSTMs contain information similar to the memory in the computer, the memory can be read, written or deleted. This makes the network interesting as the architecture improves the training from the knowledge of the past inputs.
Reinforcement learning is a machine learning paradigm where the agents take action in the environment and aim to maximize their rewards. The agents are self-trained to take the best possible action to gain maximum awards and minimum punishment. For stock market prediction, reinforcement learning can use agents that will have actions of buying, holding or selling based on the data values, and rewards will be based on profit or loss.
To conclude, several machine learning algorithms have been used to predict the stock price. Though predicting stock price accurately is quite a challenging problem, there has been substantial improvement in the technical modelling of the stock price today.
- Patel, Jigar, et al. “Predicting stock and stock price index movement using trend deterministic data preparation and machine learning techniques.” Expert systems with applications 42.1 (2015): 259-268.
- Lin, Yuling, Haixiang Guo, and Jinglu Hu. “An SVM-based approach for stock market trend prediction.” The 2013 international joint conference on neural networks (IJCNN). IEEE, 2013.
- Nelson, David MQ, Adriano CM Pereira, and Renato A. de Oliveira. “Stock market’s price movement prediction with LSTM neural networks.” 2017 International joint conference on neural networks (IJCNN). IEEE, 2017.
- Selvin, Sreelekshmy, et al. “Stock price prediction using LSTM, RNN and CNN-sliding window model.” 2017 international conference on advances in computing, communications and informatics (icacci). IEEE, 2017.
- Chen, Kai, Yi Zhou, and Fangyan Dai. “A LSTM-based method for stock returns prediction: A case study of China stock market.” 2015 IEEE international conference on big data (big data). IEEE, 2015.
- Carta, Salvatore, et al. “A multi-layer and multi-ensemble stock trader using deep learning and deep reinforcement learning.” Applied Intelligence 51.2 (2021): 889-905.
- Hu, Zexin, Yiqi Zhao, and Matloob Khushi. “A survey of forex and stock price prediction using deep learning.” Applied System Innovation 4.1 (2021): 9.