The volatile nature of stock market creates problems
in developing robust prediction system for financial time series data
prediction , it become unreliable when stock market fluctuates suddenly due to
unexpected event like demonetization, earthquake or any other financial
decisions taken by government. Due to recent demonetization in India, stock
market fell down suddenly and was criticized as well as appreciated by many
financial experts and hence needed to be analyzed in terms of stability of the
stock market. This research work emphasizes on developing a robust model using two
popular neural network techniques with help of validation along with training data
instead of only training data. Models were developed with two financial time
series data: BSE 30 and INR/USD foreign Exchange (FX) using two neural network techniques:
Radial Basis Function Network (RBFN) and Error Back Propagation Network (EBPN)
Models were measured with Mean Absolute Percentage Error (MAPE). The empirical results show that RBFN is performing
better than EBPN for next day prediction with k-fold cross validation. It was
also observed that models developed through validation data is performing
better than others with lowest MAPE of 0.316 and 0.303 respectively for BSE30
Keywords: Radial Basis Function Network (RBFN), Error
back PropagationnNetwork (EBPN), Validation Data.
behavior of time series data is the primary focus for researchers of financial
time series data; this time series data fluctuates mostly due to occurrence of
any unexpected event. Stock prices and foreign exchange data are affected by
various factors and events, some of which influence stock prices directly and
others that do so indirectly and hence economy of a country may be affected.
Company stock prices and the stock market, in general, can be affected by
various events such as war, natural disasters, demonetization, political
events, and terrorism or any other monitory policy or decision taken by
government. This paper gives attention to development of a robust forecasting
system using validation data which may incorporate any event which takes place
suddenly. The recent demonetization in India was considered to check the
robustness of developed models and to check its impact on the stock market and
Foreign Exchange (FX) rate. Demonetization is the action of stripping a
currency unit of its status as legal tender. In India history Demonetization
took place three times: First in 1946 during this period currency note of
1,000, 5,000 and 10,000 were removed from the circulation, this Demonetization
did not have much impact as these types of the higher denomination was not
accessible to the ordinary people. The second demonetization took place in 1978
to drive away black money out of circulation in the economy, and third time
recently in 2016 when the currency of 500 and 1000 was banned. The objective of
this demonetization was to pull out black money and to fight against funding
for terrorism. Soon after this
demonetization, various sectors like real estate, Industry as well as
agriculture along with export and import were affected. BSE Sensex and NIFTY50
stock indices fell over 6% on the day of demonetization.
are many research articles found in the field of forecasting of time series
data 10, but there are very few papers which focus on the impact of events in
time series data using artificial intelligent techniques. Author 18 has
examined the relationship between market return after each Election Day and
economic performance during the presidential term. Author 19 represents the
result of the pattern of common stock return over four years election cycle and
different administrations like democratic and administrative. Author 20 analyze the impact of the
presidential election in the USA on stock returns flow. The analysis is focused
on securities of financial institutions listed on the New York Stock Exchange
and show the negative impact of the event in stock return. Author 21 analyzes
the performance of share prices around national elections in India during 2014
general elections. Event study methodology has been used for result analysis
and observed the positive reaction of changes in government after elections. Author
22 focuses on the effect of political uncertainty and the political process
on the stock market during US presidential election. The findings indicated
that the presidential election affects stock market volatility with positive
literature, many research papers have been published in the field of time
series data to develop a predictive model using different intelligent
techniques. Some authors 5 6 7 have developed models based on Back
Propagation Network (BPN) and Radial Basis Function Network (RBFN). For data
smoothing authors 8 have used hybridization of different techniques called
Stationary Wavelet Transform (SWT) for data preprocessing 2. Feature
extraction and the selection were also applied in data, and this data was
applied to ANN for Stock data prediction for next day close using Error Back
Propagation Network (EBPN) and Radial Basis Function Network (RBFN). Author 3
also used Exponent Back Propagation Neural Network (EBPN) to develop prediction
model and compared the EBPNN model with EBPN model. Author 11 suggested a
novel hybrid algorithm for automatic selection of input variables, number of
hidden nodes of RBF network and optimizing network parameters.
per above, it can be concluded that event is a natural process which occurs
time to time and needs to be studied to see the impact on the economy of a
country. On the other hand, we need to develop such type of model which can be
able to incorporate event which takes place suddenly. In this paper two neural
network techniques: Radial Basis Function Network (RBFN) and Error Back
Propagation Network (EBPN) were used for financial time series data prediction 13
to incorporate event. Experiments were carried out using self-written MATLAB
codes for both RBFN and EBPN. Data were partitioned with static partition as
well as k-fold cross-validation; the empirical results show that RBFN is
producing better results than EBPN.
2. Financial Time Series Data and Process Flow Diagram
To develop model, six years’ time series data
from January 2011 to March 2017 of BSE30 and INR/USD FX rate data were
collected from financial site www.yahoofinance.com and http://fx.sauder.ubc.ca
respectively. Out of which data up to Nov-8, 2017 are before demonetization and
data after this is of after demonetization. The detail of financial time series
data is shown in Table 1.
Table 1: Financial Time series data.
Financial Time Series Data
• Stock Index Data: BSE30
• Foreign Exchange Data: INR/USD.
Period of samples
1st January-2011 to 14th
March-2017 of BSE 30 and
1st January-2011 to 14th
March-2017 of INR/USD FX.
Total # of Samples
1545 (BSE 30),1545 (FX)
• BSE30 Data: www.yahoofinance.com
• INR/USD Data: www.fx.sauder.ubc.ca
• Case I- Static Partition (Training-80%,
• 10 Fold cross validation (90% Training ,
remaining 10% Validation)
• 9th November 2016 to 14 March
2017 of BSE30 and FX.
Figure 1 shows the nonlinear flow of BSE 30
data, which shows sudden fall in stock price 9 from the date of
demonetization. However, FX data trends shown in Figure 2 is almost stable even
Trends of (a) BSE30 ndex data and (b) INR/USD FX data from Jan-2011 to
BSE30 stock data was prepared with four inputs
Open, High, Low and close value and one output value next-day-close while FX
data has only one input FX rate with next-day FX rate as output. Data normalization
1 was carried out to prepare the data in the range 0 1. The process flow diagram of proposed work for financial
time series data is shown in Figure 2 where data considered for the experiment
were partitioned into three parts: training, validation and testing.
Training Set :
Training dataset is used to create the model. This dataset
presented during training a model and the network is adjusted according to
error. This sample of data used to fit the parameters i.e., weights.
A validation dataset is nothing just a subset of training data which is used for unbiased evaluation of a model to be fit
on the training dataset. It is used for minimizing the overfitting as well as
underfitting. This data set is also used for tuning the parameters of a model
i.e., model architecture.
This sample of data used to provide an unbiased evaluation
of a final model fit on the training data set. This data set is used for
performance evaluation of model.
The development of models based on partition of dataset into
training, validation and testing sets are divided into two cases; Case I: The
static partition of data as training and testing sets, Case II : Dynamic
partition of data as training, validation and testing sets. After partitioning
of data based on these two cases; intelligent techniques RBFN and EBPN were
applied to these datasets to validate the models, then testing dataset were
given to this predictive e model to test the accuracy of model.
Fig 2. Process Flow Diagram of proposed work.
Radial Basis Function Network (RBFN)
Radial basis function network (RBFN) is a type of ANN many authors
use this technique to use it as non- classifiers 13
14 17 . In this technique radial basis functions has been used as activation
functions. Linear combination of inputs and parameters of neurons are work as
output of the network. RBFN is also used for classification, Time series forecasting
13 as well as for function approximation. In the hidden layer of RBFN,
transfer function is used for network’s characterization with respect to center.
In architecture of RNFN there are three layers are used: First layer is input
layer, second layer is called hidden layer and output is then send to output
layer from hidden layer where output is computed by each neurons.
Error Back Propagation Network (EBPN)
EBPN is popularly used prediction technique 6 which
can be trained using popular Error backpropagation algorithm and it is a
generalization of delta rule. The delta value for a given input vector compares
the output vector to the correct answer. Backward propagation of the
propagation’s output activated through the neural network using the training
pattern target in order to generate the deltas of all output and hidden
neurons. This technique is also known as the backward propagation of errors
because after calculation of errors at the output it goes back through the
network layers and repeats until the error comes to
the desired output.
3.3 K-Fold cross validation
K-fold validation is a technique where dynamically partitioned of
data is done in training and testing data sets 15. This method is
better than the static method of data portioning as all the data sets are used
as training as well as the testing dataset. Static data partition with a fixed
percentage of training and testing data may bias 12 and may have the problem
of network paralysis. Dynamic partitioning of data as training and testing
changes the fold dynamically. In k-fold cross- validation the data set is
divided into k subsets. At each fold, one subset is used as the test set, and
remaining subsets are merged together and used as a training set. Then the
average error of all k trials is calculated so that each fold takes part in training
and testing both.
Experimental work is done using MATLAB software to develop models;
various parameters of RBFN and EBPN were adjusted using trial and error
methods. Financial time series data considered for event analysis were normalized
using equation 1.Comparative results obtained through MATLAB code for both the
cases are shown in Table 2 and 3 respectively for BSE30 and INR/USD data in
term of MAPE calculated using equation
4. The convergence curve shown in Figure 6 and 7 respectively for RBFN and EBPN
shown that training models were converged in appropriate direction to meet out
the objective with minimum errors.
Where X is a time series data of a particular day and Xmax is
the highest value, Xnew is obtained normalized value. Financial data
were supplied one by one and developed models were evaluated using MAPE as
shown in equation 2:
is the actual observation of ith
is the predicted observation of ith
term and n is the number of observations.
Table 2: Comparative MAPE for BSE 30 stock data.
Table 3: Comparative MAPE for INR/USD FX rate data.
Case II (ii)
Results shown in Table 2 are quite
satisfactory as RBFN is performing better than EBPN, also RBFN model in case of
case II is performing better at testing stage with MAPE = 0.316 similarly Table
3 reflects the results for INR/USD FX rate with lowest MAPE 0.303 at testing
stage using RBFN. These tables also reflects the fact that model developed with
validation data set (Case II) is better than model developed with only training
set (Case I).
These developed models are clearly
reflecting the impact of demonetization in terms of testing, however model
developed for case II is much better than the model developed for case I, these
models (Case II) are producing better results with data after demonetization
which shows the strength and robustness of the model and able to incorporate
the down fall due to unexpected events occurred. Analytical results of Table 2
and 3 are also shown in form of graphical representation in Figure 3 (a) and 3
(b) respectively for BSE30 data and INR/USD FX rate data respectively of RBFN
and EBPN for both cases (Case I & Case II). Figure 4 and 5 depict the Performance convergence curve of BSE30 and
INR/USD using RBFN respectively.
Fig. 3. Comparative results of Case I
and Case II using RBFN and EBPN for (a) BSE30 and
(b) INR/USD FX.
Fig. 4. Performance convergence curve of
BSE30 using RBFN
Fig. 5. Performance convergence curve of
INR/USD FX using RBFN.
This research work is focused on development of a
robust financial time series forecasting system based on ANN techniques to incorporate
any unexpected event occurred from time to time. The demonetization data was
considered as an event. Experimental results drawn with the help of self
written MATLAB codes stabilizes the following facts:
Out of two cases considered in this research work the performance of
model developed with case II is performing better than that of case I.
Out of two ANN techniques considered in this research work RBFN is
outperforming EBPN in all cases.
RBFN model with 10-fold cross validation is best among all other models
and can be considered as robust financial time series prediction system as MAPE
obtained at testing stages are better which concludes that models developed
with dynamic partition of data has the capability to incorporate the sudden
fall of stock market and foreign exchange rate due to unexpected event like
J. Sola, J. Sevilla, Importance of
datanormalization for the application of neural networks tocomplex industrial
problems, IEEE. Trans. Nucl. Sci, 44(3) (1997), 1464–1468.
M. N. Navi, W.H. Atomi, M.Z. Rehman,
The effects of pre-processing methods on forecasting improvement of artificial
neural networks, Aus. J. Basic .Appl. Sci . 5(6) ( 2011), 570-580.
H. Mo, J. Wang, H. Niu, Exponent Back
Propagation Neural Network Forecasting for Financial Cross-correlation relationship,
Expert systems with Applications, 53 (2016), 106-116.
R. Manjunatha, P.B. Narayana, K.H.
Reddy, K. V. K. Reddy, Radial Basis function neural network in prediction and
modeling of diesel engine emissions operated for biodiesel blends under carrying
operating conditions, Indian Journal of Science and Technology, 5(3) (2012), 2307-2312.
D.K. Sharma, H.P. Sharma, H.S. Hota,
Future Value Prediction of US Stock Market Using ARIMA and RBFN, International
Research Journal of Finance and Economics (IRJFE), 134 (2015), 136-145.
R. Handa, H.S. Hota, S.R. Tandan, Stock
Market Prediction with various technical indicators using Neural Network
techniques, International Journal for research in Applied Science and
Engineering Technology (IJRASET), 3(4) (2015) , 604-608
H. Sharma, D.K. Sharma, H.S. Hota, A
hybrid Neuro-Fuzzy Model for Foreign Exchange Rate Prediction. Academy of
Accounting and Financial Studies Journal, 20 (3)( 2016), 1-13.
H. S. Hota, R. Handa, Hybridization of
Wavelet transform and ANN techniques as stock prediction model, International
Journal of Innovations in Engineering and Technology (IJIET), 7(2)( 2016),
S. Lahmiri, Intraday stock price
forecasting based on variational mode decomposition, Journal of Computational
Science, 12(2016), 23-27.
Wang, J.J. Wang, Z.G. Zhang, S.P. Guo, Forecasting stock indices with back
propagation neural network, Expert systems with Applications, 38(2011),
11 M. Gan, H. Peng, X. P. Dong,. A hybrid algorithm
to optimize RBF network architecture and parameters for nonlinear time series
prediction. Applied Mathematical Modelling, 36(2012), 2911-2919.
Leonel, A.S. F. Ricardo, G. L. Guilherme, Maximum and minimum stock price
forecasting of Brazilian power distribution companies based on artificial
neural networks, Applied Soft Computing, 35(2015), 66-74.
Ruiz-Aguilar, I.J. Turias,, M.J. Jiménez-Come,
Hybrid approaches based on SARIMA and artificial neural networks for inspection
time series forecasting, Transportation Research Part E, 67(2014), 1-13.
I. Tahyudin, Time Series Prediction Using Radial Basis Function Neural Network,
International Journal of Electrical and Computer Engineering (IJECE), 5(4)(
Feng, H.S. Chou, Evolutional RBFNs prediction systems generation in the applications of financial time series data.
Expert Systems with Applications, 38(2011), 8285-8292.
Majhi, M. Rout, V. Baghel, On the development and performance
evaluation of a multi objective GA-based RBF adaptive model for the prediction
of stock indices, Journal of king saud university computer and information
sciences, 26(2014), 319-331.
Hota, R. Handa, A. K. Shrivas, Time Series Data Prediction Using Sliding Window
Based RBF Neural Network, International Journal of Computational Intelligence
Research, 13(5)( 2017), 1145-1156.
Chien, R.W. Mayer, Z. Wang, Stock Market, Economic Performance And Presidential
Elections, Journal of Business and Economic Research, 12(2)(2014), 159-170.
D. Huang, Common Stock Returns and Presidential Elections, Financial Analysts
Journals, (1985), 58-61.
Obradovi?, N. Tomic, , The effect of presidential election in the USA on stock
return flow – a study of a political event, Economic Research-Ekonomska
Istraživanja, 30(1)( 2017), 112-124.
A. Ramesh, Return volatility around national elections: Evidence from India,
Procedia – Social and Behavioral Sciences (ScienceDirect), 189 (2015), 163 –
Goodell, S. Vahamaa, US presidential elections and implied volatility, The role of political uncertainty, Journal of Banking
and Finance, 37(2013), 1108-1117.