Professional Documents
Culture Documents
1
Deptt. of Computer Science & Engineering,
VCT Kumaun Engineering College,
Dwarahat, District –Almora (Uttarakhand), INDIA,
Email - vaislaks@rediffmail.com
2
Deptt. Of Computer Science,
Birla Institute of Applied Sciences,
Bhimtal, Post- Bhimtal, Distt-Nainital (Uttarakhand), INDIA
E-mail - ashutoshbhatt123@rediffmail.com
3
Head, Department of Computer Science & Engineering,
Jaypee University of Engineering & Technology,
Raghogarh , District – Guna (MP), India,
Email - dr.shishir@yahoo.com
predictors, the changes in a stock market can then be weights. The process of adjusting the weights to make the
learned better using networks which employ a feedback Neural Network learn the relationship between the inputs
mechanism to cause sequence learning. and the targets is known as learning or training. There are
several methods of finding the weights of which the gradient
2. Literature Review descent method is most common.
In general, the approaches to predict stock market could be
classified into two classes, fundamental analysis and
technical analysis. Fundamental analysis is based on
5. Statistical Technique
macroeconomic data and the basic financial status of
companies like money supply, interest rate, inflationary Multiple Regression Analysis is a Multivariate Statistical
rates, dividend yields, earnings yield, cash flow yield, book technique used to examine the relationship between a single
to market ratio, price-earnings ratio, lagged returns[8,9]. dependent variable and a set of independent variables. The
Technical analysis is based on the rationale that history will objective of the multiple regression analysis is to use
repeat itself and that and the correlation between price and independent variables whose values are known to predict the
volume reveals market behavior. Prediction is made by single dependent variable.
exploiting implications hidden in past trading activities and
by analyzing patterns and trends shown in price and volume
charts[10]. Using neural networks to predict financial 6. Data and Methodology
markets has been an active research area in both methods,
6.1 Data Set Used
since the late 1980's [11, 12, 13, 14, 15]. Most of these
published works are targeted at US stock markets and other The data is obtained from the RBI site (www.rbi.org.in),
international financial markets. In this article our Prediction NSE site [17], SEBI site (www.sebi.gov.in). The NIFTY
is made by exploiting implications hidden in past trading data (closing Nifty Index), Industrial Production, Wholesale
activities and by analyzing patterns and trends shown in Price Index, Exchange Rate, Net Investment by FIIs, Export,
monthly stock price and Industrial Production, Wholesale Import, Money Supply Narrow Money, Money Supply Broad
Price Index, Exchange Rate, Net Investment by FIIs, Export, Money is from April, 1994 to March , 2007. All above data
Import, Money Supply Narrow Money, and Money Supply taken on monthly basis. The stock market can display
Broad Money. varying characteristics for Industrial Production, Wholesale
Price Index, Exchange Rate, Net Investment by FIIs, Export,
Import, and Money Supply. So it is necessary to develop
Training a Neural Network model for predicting monthly stock return of NIFTY. The
To experiment with neural networks, we used NeuralWare, data for the study comprises the monthly stock returns of
NeuralWorks Predict, [16] which provides the tools to NIFTY, monthly Industrial Production, monthly Wholesale
implement and test various configurations of neural Price Index, monthly Exchange Rate, monthly Net
networks and learning algorithms. Investment by FIIs, monthly Export & Import, monthly
Money Supply from April, 1994 to March , 2007 creating a
3. Objective of Study series of 156 observations which were collected from the
The objective of this study is to model the Stock Prices data Reserve Bank of India website (www.rbi.org.in) , NSE
using the Statistical Technique and the Neural Networks, site(www.nseindia.com), SEBI site(www.sebi.gov.in).
and then to compare the results of these two techniques.
To build the Neural Network forecasting models monthly
data (156 observations) is used to for the measurement of
4. Neural Networks
forecasting accuracy. An important first step in the analysis
Artificial Neural Network is an artificial representation of of the data is to determine if the series is stationary, as all
the human brain that tries to simulate its learning process. other calculations of invariants presume stationarity in both
To train a network and measure how well it performs, an linear and nonlinear. A time series is said to be stationary if
objective function must be defined. A commonly used there is no systematic change in mean (no trend), in
performance criterion function is the sum of squares error variance, and, if so, periodic variations have to be removed.
function. To detect nonstationarity, the study uses a stationary test,
2
∑ ∑ (t )
1 p N called the unit root test (Augmented Dickey Fuller Test and
E = p i − yp i (1) Philip Perron Test). The null hypothesis tested here is “the
2 p =1 i =1
series is non-stationary”. If the absolute value of the statistic
Where, p represents the patterns in the training set, yp is the is greater than the critical Value, then the null hypothesis is
output vector (based on the hidden layer output), tp is the rejected and hence the series is stationary.
training target. The above equation represents the output
nodes, tpi and ypi are, respectively, the target and actual
network output for the ith output unit on the pth pattern.
The network learns the problem at hand by adjusting
52 (IJCNS) International Journal of Computer and Network Security,
Vol. 2, No. 8, August 2010
Figure 1. .Monthly stock closing for period April 1994 to Figure 9. .Monthly Export for period April 1994 to March
March 2007 2007
Figure 2. .Monthly Closing alternate series Figure 10. Export alternate series
Figure 3. .Monthly Industrial production for period April Figure 11. Monthly Import for period April 1994 to March
1994 to March 2007 2007
Figure 4. .Monthly Industrial Production alternate series Figure 12. Import alternate series
Figure 5. .Monthly Wholesale Price Index for period April Figure13. .Monthly Money Supply Narrow Money for
1994 to March 2007 period April 1994 to March 2007
Figure 6.Wholesale Price Index alternate series Figure 14. Money Supply Narrow Money alternate series
7. Design Methodology
Dependent Variable: Closing Nifty
It is difficult to design a Neural Network Model for a
Method: Least Squares
particular forecasting problem. Modeling issues must be
Sample (adjusted): 3 156
considered carefully because it affects the performance of an
Included observations: 154 after adjusting endpoints
ANN. One critical factor is to determine the appropriate
architecture, that is, the number of layers, number of nodes
Variable Coefficient Std. Error t-Statistic Prob.
in each layer. Other network design decisions include the
C 0.010347 0.006730 1.537532 0.1263
selection of activation functions of the hidden and output
nodes, the training algorithm, and performance measures. Exchange Rate(-1) -0.426087 0.364542 -1.168830 0.2444
The design stage involves in this study to determine the Export(-1) -0.042306 0.064830 -0.652570 0.5151
input nodes and output nodes, selecting the performance Foreign Investors Inflow(- 6.25E-06 2.06E-06 3.039389 0.0028
metrics etc. 1)
The number of input nodes corresponds to the number of Import(-1) -0.044457 0.061156 -0.726940 0.4684
variables in the input vector used to forecast future values. Industrial Production(-1) 0.269663 0.154961 1.740202 0.0839
However currently there is no suggested systematic way to Money Supply broad 0.119117 0.286181 0.416230 0.6779
determine this number. Too few or too many input nodes money(-1)
can affect either the learning or prediction capability of the Money Supply narrow -0.017499 0.333083 -0.052538 0.9582
network. For this study the output is the forecasted monthly money(-1)
stock return.Monthly Closing NIFTY is taken as dependent Wholesale Price Index(-1) -0.833971 0.963889 -0.865215 0.3884
variable(Output) and Industrial Production, Wholesale Price R-squared 0.121900 F-statistic 2.516168
Index, Exchange Rate, Net Investment by FIIs, Export,
Adjusted R-squared 0.073454 Prob (F-statistic) 0.013663
Import, Money Supply Narrow Money, Money Supply Broad
Money are taken as independent variable (Inputs).
Hear Noisy Data has been taken for Neural Network Regression 156 0.017077 0.000552 0.023492
forecasting and Data Transformation level is moderate. The
variable selection for the network is comprehensive. Comparison of the Models:-
Adaptive Gradient Learning Rule is applied hear, the output The Stock Market Monthly closing values were forecasted
Layer Function is taken Sigmoid for the forecasting. using Neural Networks and Regression technique. The
comparison between the two models is done on the basis of
Table 1 : Using Neural Network the MAPE, MSE and RMSE values obtained for the
No of MAE MSE RMSE forecasted values of the two models. An accuracy measure is
Obs. often defined in terms of the forecasting error, which is the
Neural 156 0.05007 0.00419 0.06475 difference between the actual (desired) and predicted value.
Network The ultimate and the most important measure of
performance is the prediction accuracy.
Modelling & Forecasting using Multiple Regression The following table gives the table of comparison:-
Technique:-
Closing nifty is taken as dependent variable and Industrial Table 3: Comparison of Models
Production, Wholesale Price Index, Exchange Rate, Net No of Obs. MAE MSE RMSE
Investment by FIIs, Export, Import, Money Supply were Regression 156 0.066 0.007 0.082
taken as independent variables. The variables (closing nifty, Neural 156 0.05007 0.00419 0.06475
Industrial Production, Wholesale Price Index, Exchange Network
Rate, Export, Import, Money Supply) were transformed
using natural log to achieve normality and linearity.
54 (IJCNS) International Journal of Computer and Network Security,
Vol. 2, No. 8, August 2010
Where formulae for the statistics are: clearly depicts the fact that Neural Networks outperform
MAE = abs (Actual –Forecast)/n. Statistical technique in forecasting stock market prices.
MSE = 1/n * [Actual –Forecast] 2. The effectiveness of neural network can be measured using
RMSE = SQRT (MSE). the hit rate, which may be a better standard for determining
From the above Table, Neural Networks performs well than the quality of forecast instead of the traditional measures
compared to Statistical forecasting of monthly closing Nifty like RMSE, SSE, and MAE. The field of neural networks is
values. very diverse and opportunities for future research exist in
The following figures shows the MAE, MSE and RMSE many aspects, including data preprocessing and
calculated for the forecast period using the above two representation, architecture selection, and application. The
forecasting techniques logical next step for the research is to improve further the
performance of NNs, for this application, perhaps through
better training methods, better architecture selection, or
better input.
References
[1] E. M. Azoff. “Neural network time series forecasting of
financial market.” JohnWiley & Sons Ltd. 1994.
[2] C.M. Bishop, “Neural Networks for Pattern
Recognition,” Oxford University press. 1995.
[3] Fama, F. Eugene & French, R. Kenneth, “Dividend
Figure 18. MAE of Neural Network and Statistical Method yields and expected stock returns,” Journal of
Financial Economics, Elsevier, vol. 22(1), pp. 3-25.
1988.
[4] Hair, Anderson, Tatham, Black, “Multivariate Data
Analysis,” Pearson Education press. 1998.
[5] Kalyani Dacha “Causal Modeling of Stock Market
Prices using Neural Networks and Multiple
Regression: A Comparison Report,” Finance India,
Vol. xxi , No.3, pp. 923-930. 2007.
[6] Lakonishok et al. “The Journal of Finance,” Volume
49, Issue 5, pp. 1541-1578. Dec. 1994.
[7] Mendenhall and Beaver, “Introduction to Probability
Figure 19. MSE of Neural Network and Statistical Method and Statistics,” Ninth Edition, International Thomson
Publishing, 1994.
[8] National Stock Exchange (NSE), Available: www.nse-
india.com.
[9] NeuralWare, NeuralWorks Predict, Available:
http://www.neuralware.com.
[10] H.P. PAN, “A joint review of technical and
quantitative analysis of the financial markets towards a
unified science of intelligent finance,” Proc.2003
Hawaii International Conference on Statistics and
Related Fields, June 5-9, Hawaii, USA, 2003.
[11] R. Sharda, and R. Patil, “Neural Networks as
Figure 20. RMSE of Neural Network and Statistical Method forecasting experts: an empirical test,” Proceedings of
the 1990 International Joint Conference on Neural
The experiments illustrate a varying degree of predictability Networks, Vol-I, pp. 491-494, Washington DC, USA.
of the monthly stock returns. For Example based on the 1990.
values of RMS, MAE, RMSE and other statistics. The above [12] Smirlock Michael and Starks, T. Laura, “A Further
comparision of Neural Network and Statistical model clearly Examination of Stock Price Changes and Transactions
shows that the Neural Networks prediction is better than the Volume,” Journal of Financial Research 8, pp. 217-
Statistical technique. 225. 1985.
[13] G.S. SWALES, and Y.YOON, “Applying artificial
neural networks to investment analysis,” Financial
8. Conclusion
Analysts Journal, 48(5). 1997.
In this paper, two techniques for modeling and forecasting [14] Tang, Almeida and Fishwick, Simulation, “Time series
stock market prices have been shown: Neural Network and forecasting using neural networks vs. Box-Jenkins
Statistical Technique. The forecasting ability of models is methodology,” pp. 303-310. November 1991.
accessed on the basis of MSE, MAE and RMSE. This [15] P.C.Verhmf, P.N. Spnng, J.C. Hmksb, “The
commercial use of segmentation and predictive
(IJCNS) International Journal of Computer and Network Security, 55
Vol. 2, No. 8, August 2010
Authors Profile