Prediction of future
movement of stock prices has been a subject matter of many research work. On
one hand, we have proponents of the Efficient Market Hypothesis who claim that
stock prices cannot be predicted, on the other hand, there are propositions
illustrating that, if appropriately modeled, stock prices can be predicted with
a high level of accuracy. There is also a gamut of literature on technical
analysis of stock prices where the objective is to identify patterns in stock
price movements and profit from it. In this work, we propose a hybrid approach
for stock price prediction using five deep learning-based regression models. We
select the NIFTY 50 index values of the National Stock Exchange (NSE) of India,
over a period of December 29, 2014 to July 31, 2020. Based on the NIFTY data during December 29, 2014
to December 28, 2018, we build two regression models using <i>convolutional
neural networks</i> (CNNs), and three regression models using <i>long-and-short-term
memory</i> (LSTM) networks for predicting the <i>open</i> values of the NIFTY
50 index records for the period December 31, 2018 to July 31, 2020. We adopted
a multi-step prediction technique with <i>walk-forward validation</i>. The parameters of the five deep learning
models are optimized using the grid-search technique so that the validation
losses of the models stabilize with an increasing number of epochs in the model
training, and the training and validation accuracies converge. Extensive
results are presented on various metrics for all the proposed regression models.
The results indicate that while both CNN and LSTM-based regression models are
very accurate in forecasting the NIFTY 50 <i>open</i> values, the CNN model
that previous one week’s data as the input is the fastest in its execution. On
the other hand, the encoder-decoder convolutional LSTM model uses the previous
two weeks’ data as the input is found to be the most accurate in its
forecasting results.