Trading in Indian Stock Market Using ANN: A Decision Review
Trading in Indian Stock Market Using ANN: A Decision Review
Trading in Indian Stock Market Using ANN: A Decision Review
Abstract
A stock market is a public market for trading the company’s stock. Prediction provides
knowledgeable information regarding the current status of the stock price movement. Hence, it
can be utilized in decision making for customers in finalizing whether to buy or sell the particular
shares of a given stock. Stock market forecasters focus on developing a successful approach for
forecast or predict index values of stock prices. Since in stock market, data are highly time variant
and are normally in a nonlinear pattern, pre predicting the future price of a stock is highly
challenging. From the evolution of machine learning, researchers from this area are busy to solve
this problem effectively. Many different techniques are used to build predicting system. Here we
describe the different state of the art techniques used for stock forecasting and compare them with
respect to their pros and cons. Many methods like technical analysis, fundamental analysis, time-
series analysis etc are used to predict the price but none of these are proved as a consistently
acceptable. Neural Network is the best technique till time to predict stock prices especially when
some de-noising schemes are applied to a neural network. Artificial Neural Network (ANN), a
field of Artificial Intelligence (AI), is a popular way to identify unknown and hidden patterns in
data which is suitable for share market prediction. The past data of the selected stock will be used
for building and training the models. The results from the model will be used for comparison with
the real data to ascertain the accuracy of the model. In this approach, we use back propagation
algorithm for training phase and multilayer feed forward network as a network model for
predicting the price of a share.
252
Key words
Artificial neural networks, Multi-layer feed forward neural network, back propagation, the
stock market.
1. Introduction
Stock market prediction is the act of trying to determine the future value of a company stock
traded on an exchange. Share is the control of the company, divided into small parts and each part
is called as Share or Stock. A stock exchange is a firm or mutual union which provides "trading"
services for traders and stock brokers, to trade stocks and other securities. The stock market
prediction has been an area of intense interest due to the potential of obtaining a very high return
on the invested money in a very short time. It is possible to predict the future stock prices or
indices with results that are better than random. Different modeling techniques have been used to
try and model the stock market index prices. These techniques have been focused on two areas of
forecasting, namely technical analysis, and fundamental analysis. The technical analysis considers
that market activity reveals significant new information and understanding of the psychological
factors influencing the stock price in an attempt to forecast future prices and trends. It has been
used since a very long time but has had limited success. Recently, soft computing techniques are
being increasingly employed. Artificial neural networks (ANNs) have been widely used in
prediction of financial time series. This paper represents the idea how to predict share market
price using Artificial Neural Network with a given input parameters of share market. Artificial
Neural Network receives data of any number of years and it can predict the future price, based on
the past data. Here we use Back propagation with feed forward architecture for prediction. The
network was trained using more than five years of data. It shows a good performance for market
prediction. The network selected though was not able to predict the exact value of a stock but it
succeeded in prediction the trends of the stock market.
253
2.1 Fundamental analysis
Fundamental Analysis finds an intrinsic value of a stock and generates a buy signal if the
current value of stocks is below intrinsic value. Here the market is defined 90% by logical and
10% by physiological factors but this analysis is not suitable for our study because the data it uses
to determine the intrinsic value of an asset does not change on a daily basis and therefore is not
suitable for a short-term basis. However, this analysis is suitable for predicting the share market
only on a long-term basis.
3. Literature review
R.K. Dase and Pawar D.D. in [1] tried to predict the stock rate because it is a challenging
and daunting task to find out which is more effective and accurate method so that a buy or sell
signal can be generated for a given stocks. Predicting stock index with traditional time series
analysis proved to be difficult. An artificial neural network may be suitable for this task. Neural
network has the ability to extract useful information from large set of data. In this paper the
author also presented a literature review on application of artificial neural network in stock market
Index prediction.
254
Halbert white in [2] provided some results of an on-going project using neural network
modeling and learning techniques to search and decode nonlinear regularities in asset price
movements. He focused on IBM common stock daily returns. To deal with the salient features of
economic data highlights, statistical inference played a vital role and requires modifications to
standard learning techniques that may improve the prediction of trading.
Jing Tao Yao and chew Lim tan in [3] used Artificial Neural Networks for classification,
prediction and recognition. Neural network training is an art of trading based on neural network
outputs or trading strategy. Authors discussed a seven-step neural network prediction model
building approach in this article. Pre and post data processing/analysis skills, data sampling,
training criteria and model recommendation also covered in this article.
Tiffany Hui-Kuang and Kun-Huang Huarng in [4] used Neural Network because of their
capabilities in handling nonlinear relationship and also implement a new fuzzy time series model to
improve forecasting. The fuzzy relationship is used to forecast the Taiwan stock index. In the
neural network fuzzy time series model input sample observations are used for training and out
sample observations are used for forecasting. The drawback of taking all the degree of
membership for training and forecasting may affect the performance of the neural network. To
avoid this, they took the difference between the observations and thus reduced the range of the
universe of discourse.
Akinwale adio T, Arogundade O.T and Adekoya Adebayo F in [5] examined the use of error
in back propagation and regression analysis to predict the untranslated and translated Nigeria
Stock Market Price (NSMP). The author used 5-j-1 network topology to adopt the five input
variables. The number of hidden neurons determined the j variables during the network selection.
Both the untranslated and translated statements were analyzed and compared. The Performance of
translated NSMP using regression analysis gives better result than that of untranslated NSMP.
The result was showed on untranslated NSMP ranged for 11.3% while 2.7% for NSMP.
David Enke and Suraphan Thawornwong in [6] used machine learning for data mining to
evaluate the predictive relationship of numerous financial and economic variables. Neural network
model used for estimation and classification are examined for forecasting the future price of the
trade. A cross-validation technique was used to improve the generalization ability of several
models. The trading strategies of classification models gives higher profits than the buy-and-hold
strategy and guided by the level-estimation based on forecast of the neural network and regression
models. The author decides to deploy the forecast of the stock dividends, transaction costs and
individual-tax brackets to replicate the realistic investment practices.
255
Yi-Fan Wang, Shihmin Cheng and Mei-Hua Hsu in [7] used Markov chain concepts into
fuzzy stochastic prediction of stock indexes to achieve better accuracy and confidence. In this
paper they examined that in comparison to ANN, Hidden Markov model has major advantages. It
generates high accuracy result and requires only one input of data. The first hour’s stock index
data was used as the input and it lead the prediction of the probable index at any given hour. This
approach did not require the standard deviation of the prediction. This approach provided not only
improved profit performance but also used to determine the losses with greater confidence.
Md. Rafiul Hassan and Baikunthu Nath in [8] used Hidden Markov Models (HMM)
approach to forecast the stock price for interrelated markets. HMM was used for pattern
recognition and classification problems because of its suitability for modeling dynamic system. The
author summarized the advantage of the HMM, which has strong statistical foundation. It’s able
to handle new data robustly and computationally efficient to develop and evaluate similar patterns.
The author decides to develop hybrid system using Artificial Intelligence paradigms with HMM to
improve the accuracy and efficiency of forecasting the stock market.
256
Using additional levels of hidden neurons provides increased flexibility and more accurate
processing. It costs more if the hidden layer neurons get increased. The cost of extra complexity in
the training algorithm provides more flexibility. Increasing the number of hidden neurons is
unnecessary, as less number of neurons would serve our purpose. On the other hand, less hidden
neurons than required would cause reduced robustness of the system, and defeat its purpose.
For our system, there is a training phase where the weights are found from this section and
Back-propagation algorithm is used to train the network. These weights are used in prediction
phase using same equations which are used in the training phase [9]. This is the basic architecture
of our system and this approach is known as Feed Forward Network. There are a lot of inputs in
share market. But all the inputs are not used in our system because their impacts are not
significant in share market price. We collect the stock price for Reliance Capital from NSE, India
from January,2010 to December, 2014. We need five inputs for the system. Those are Open,
Close, Low, High and Volume.
Back propagation is a form of supervised learning for multi-layer networks. In this paper, we
apply Back propagation feed forward NN to the stock market in order to search the trend of the
price. It aims to predict the future trend of the stock market and the fluctuation of price. This
makes use of Back Propagation Neural Network algorithm to predict the stock market by
establishing a three-tier structure of the neural network, namely input layer, hidden layer, and an
output layer. Back-propagation algorithm is basically the process of back-propagating the errors
257
from the output layers towards the input layer during training sessions. Back-propagation is
necessary because the hidden units have no target values which can be used, so these units must
be trained based on errors from the previous layers.
The output layer has a target value which is used to compare with the calculated value. As
the errors are back propagated through the nodes, the connection weights are continuously
updated. Training will continue until the errors in the weights are adequately small to be accepted
[10]. On the other hand, the computational complexity of Back propagation Algorithm is only
O(n). These features of the algorithm are the main criteria for predicting share prices accurately.
The main steps using the Backpropagation algorithm as follows:
Step 1: Feed the normalized input data sample, compute the corresponding output.
Step 2: Compute the error between the output(s) and the actual target(s).
Step 3: The connection weights and membership functions are adjusted.
Step 4: IF Error > Tolerance THEN goes to Step 1 ELSE stop.
258
In the propagation phase, the input data is normalized for feeding the network into the input
nodes using the formula:
V ' ' Normalized Input
V Actual Input
V ' ' [(V Amin ) /( A max A min))]( New _ A max New _ A min) New _ A min Where,
New _ A min, New _ A max Boundary Values of the new data range.
In this case, it is -1 and 1 because the
259
of epochs or when Mean Squared Error (MSE) is almost never improving after certain epochs
[fig.2].
After 7 epochs we get the best validation performance curve with no further improvement of
the MSE.
The circle in the performance curve shows the best validation performance. Also, we got the
best regression value 0.996. but while we use the data sets without normalization in the same
network, we got the regression value in around 0.866.
While comparing the actual value with the predicted value, we find both the curves are
almost touching each other which indicates that the prediction is mostly accurate.
Conclusions
260
ANNs are efficiency methods in the area of stock market predictions, and in this paper, we
tried to sum up the application of Artificial Neural Networks (ANN) for predicting the stock
market. We described the theory behind ANNs and our Neural Network model and its salient
features. Back propagation algorithm is the best algorithm to be used in Feed forward neural
network because it reduces an error between the actual output and the desired output in a gradient
descent manner. Thus, we can see that Neural Networks are an effective tool for stock market
prediction and can be used on real world datasets. ANN have shown to be an effective, general
purpose approach for pattern recognition, classification, clustering and especially time series
prediction with a great degree of accuracy.
References
1. R.K. Dase, D.D. Pawar, Application of artificial neural network for stock market predictions:
A review of literature, 2010, International Journal of Machine Intelligence, vol. 2, no. 2, pp.
14-17.
2. H. White, Economic prediction using neural networks: The case of IBM daily stock returns,
Department of Economics University of California, San Diego.
3. J.T. Yao, C.L. Tan, Guidelines for financial prediction with artificial neural networks.
4. T.H.K. Yu, K.H. Huarng, A neural network-based fuzzy time series model to improve
forecasting, 2010, Elsevier, pp. 3366-3372.
5. T. Akinwale Adio, O.T. Arogundade, F. Adekoya Adebayo, Translated Nigeria stock market
price using artificial neural network for effective prediction, 2009, Journal of theoretical and
Applied Information technology.
6. D. Enke, S. Thawornwong, The use of data mining and neural networks for forecasting stock
market returns, 2005.
7. Y.F. Wang, S.M. Cheng, M.H. Hsu, Incorporating the Markov chain concepts into fuzzy
stochastic prediction of stock indexes, 2010, Applied Soft Computing, pp. 613-617.
8. H. Md. Rafiul, N. Baikunth, Stock Market forecasting using Hidden Markov Model: A new
approach, 2005, Proceeding of the 2005 5th international conference conference on intelligent
Systems Design and Application 07695-2286-06/05, IEEE 2005.
9. M.P. Naeini, H. Taremian, H.B. Hashemi,Stock market value prediction using neural
networks, 2010, International Conference on Computer Information Systems and Industrial
Management Applications (CISIM), pp. 132-136.
10. M. Majumder, A. Hussian, Forecasting of Indian market index using Artificial Neural
Network.
261
11. C. Bhagwant, B. Umesh, A. Gangathade, S. Kale, Stock market prediction using artificial
neural networks, 2014, (IJCSIT) International Journal of Computer Science and Information
Technologies, vol. 5, no. 1, pp. 904-907.
12. M. Zekic, Neural network applications in stock market predictions: A methodology analysis.
13. E. Schoeneburg, Stock price prediction using neural networks: A Project Report, 1990,
Neurocomputing, vol. 2, pp. 17-27.
14. S. Haykin, Feed forward Neural Networks: An introduction.
15. S. Haykin, Neural Networks and Learning Machines.
262