Stock Price Prediction Using Convolutional Neural Networks on a
Multivariate Time Series
Abstract
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 modelled, 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 machine learning and deep
learning-based methods. We select the NIFTY 50 index values of the
National Stock Exchange (NSE) of India, over a period of four years:
2015 – 2018. Based on the NIFTY data during 2015 – 2018, we build
various predictive models using machine learning approaches, and then
use those models to predict the “Close” value of NIFTY 50 for the year
2019, with a forecast horizon of one week, i.e., five days. For
predicting the NIFTY index movement patterns, we use a number of
classification methods, while for forecasting the actual “Close”
values of NIFTY index, various regression models are built. We, then,
augment our predictive power of the models by building a deep
learning-based regression model using Convolutional Neural Network (CNN)
with a walk-forward validation. The CNN model is fine-tuned for its
parameters so that the validation loss stabilizes with increasing number
of iterations, and the training and validation accuracies converge. We
exploit the power of CNN in forecasting the future NIFTY index values
using three approaches which differ in number of variables used in
forecasting, number of sub-models used in the overall models and, size
of the input data for training the models. Extensive results are
presented on various metrics for all classification and regression
models. The results clearly indicate that CNN-based multivariate
forecasting model is the most effective and accurate in predicting the
movement of NIFTY index values with a weekly forecast horizon.