Professional Documents
Culture Documents
N 0976 6375(Online) Volume 1, Number 1, May - June (2010), IAEME and Technology (IJCET), ISSN 0976 6367(Print)
IJCET
ISSN 0976 6375(Online) Volume 1 Number 1, May - June (2010), pp. 82-91
IAEME
IAEME, http://www.iaeme.com/ijcet.html
ABSTRACT
Financial Forecasting or specifically Stock Market prediction is one of the hottest fields of research lately due to its commercial applications owing to the high stakes and the kinds of attractive benefits that it has to offer. Financial time-series is one of the noisiest and non-stationary signals present and hence very difficult to forecast. In this paper we have made an attempt to forecast the daily prices of stock index using a Regression, Theils and MLP models and the predictive ability of these models are compared using standard error measures.
82
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 6367(Print), ISSN 0976 6375(Online) Volume 1, Number 1, May - June (2010), IAEME
Due to the lack of profound knowledge about interior running rules in nonlinear systems like stock system, we have no idea about the variables which are more influential and important and which are not. Input variables are selected only depending on opening and objective historical data in a stock market. To avoid missing important data influencing prediction from the historical data, Principal Component Analysis (PCA), is usually used. A functional principal component technique for the Statistical analysis of a set of financial time series highlights some relevant statistical features of such related datasets [3]. This method is to replace original variables with new ones, which are less in number and not mutually correlative, and contain most of the information of original variables [6]. Xiaoping Yang [4] used PCA to find the principal components that are taken as inputs for predicting stock prices using neural network. Variables high, low, open, volume and adjusted closing were considered for prediction of closing prices using Hybrid Kohonen Self Organizing Map [5]. Liu et al [7] used the back propagation neural networks using moving average, deviation from moving average, turnover moving average, and relative index for prediction. In Versace et als work[8], values used are open, high, low, close and volume of a specific stock while Baba [9] used change of index, PBR, changes of the turnover by foreign traders, changes of current rates, and turnover in local stock market. MLP outperformed RBF in predicting weekly closing prices using the variables open, high, low and volume [10]. In the recent years, Artificial Neural Networks (ANNs) have been applied to many areas of statistics. One of these areas is time series forecasting [11-19]. The variables considered in this article for predicting the daily closing prices are the historic prices, daily opening, low and high prices of BSE Sensex from 1st January 2009 till 31st March 2010. Principal component analysis resulted in a single set of variable. The closing prices are predicted by fitting a parametric model Simple Linear Regression and also by classical Non parametric model Theils Incomplete Method. Multilayer Perceptron is another non parametric model that is used to forecast the daily closing prices taking the principal component as the predictor variable. The forecast error values are measured which is the difference between the actual value and the forecast value for the corresponding period all three models. Error values MAPE, SMAPE and
83
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 6367(Print), ISSN 0976 6375(Online) Volume 1, Number 1, May - June (2010), IAEME
MAE are related with how close the forecasted values are to the target ones. Lower the error values, better is the forecaster.
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 6367(Print), ISSN 0976 6375(Online) Volume 1, Number 1, May - June (2010), IAEME
Regression parameters for a straight line model y = a + bx are calculated by the least squares method (minimization of the sum of squares of deviations from a straight line). This differentiates to the following formulae for the slope (b) and the y intercept (a) of the line
85
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 6367(Print), ISSN 0976 6375(Online) Volume 1, Number 1, May - June (2010), IAEME
MeanAverageError, MAE =
1 n | At Pt | n t =1
MeanAveragePercentError, MAPE =
1 n | At Pt | A n t =1 t
1 n | At Pt | SymmentricMeanAveragePercentError, SMAPE = , n t =1 At + Pt
Where At is the actual value and Pt is the predicted value. 86
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 6367(Print), ISSN 0976 6375(Online) Volume 1, Number 1, May - June (2010), IAEME
Criteria:
Kaiser
Weights
PCA V1 V2 V3 V4
87
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 6367(Print), ISSN 0976 6375(Online) Volume 1, Number 1, May - June (2010), IAEME
Initial Descriptive analysis of the daily closing prices and the predictor variable (principal component variable) is given in Table 2. The assumptions of simple linear regression are checked and then with this set of observation the line of regression is fitted. Table 2 Descriptive Statistics Variable Daily Closing Principal Component Mean 14337.1182 23419.2108 Standard Deviation 3041.62375 4974.61634 Skewness -.788 -.785 Kurtosis -.909 -.918
Table 3 Tests of Normality Kolmogorov-Smirnov Statistic Closing PCA .170 .171 df 300 300 Sig. .000 .000 Shapiro-Wilk Statistic df .838 .838 300 300 Significance .000 .000
Durbin Watson value is 2.11 clearly states the absence of autocorrelation. Normality tests Kolmogorov-Smirnov and Shapiro-Wilk were performed and the outcome were displayed in Table 3. From the Table 3 it is clear that both the tests imply that the condition of normality is not met. Using method of Least Squares, the Simple Linear Regression Model for the data is given by Y = 34.312 +0.611X, where X is the principal component variable and Y
represents the daily closing price of BSE. By the classical Nonparametric model Theils method, the model is given by Y = 42.15384+0.610456X, where X is the principal component and Y represents the daily closing price. 88
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 6367(Print), ISSN 0976 6375(Online) Volume 1, Number 1, May - June (2010), IAEME
For modeling the data with Multilayer Perceptron, the Principal component variable is taken as covariate and the daily closing prices of BSE is considered to be the target variable. Smoothing (standardized, normalized and adjusted normalized) of both the dependent variable and covariates are done successively. All possible combination, changing the activation function of the hidden layer (hyperbolic tangent and sigmoid) and that of the output layer (Identity, hyperbolic tangent and sigmoid) the sum of square error and relative error values are measured with different scaling options. The different combinations of the activation function of the output and the hidden layer with the three rescaling options of the input and target variables resulted in 30 models. The architecture for which the sum of square and relative error was minimum is the one in which the smoothing of both the dependent and covariates are normal with hyperbolic tangent as the activation function of the hidden layer and Identity for the output layer. Table 5 gives the MAE, MAPE, SMAPE and R square values for the above models discussed above. Figure 1 shows how the models predict the closing prices for the last 50 data point. Table 6 MAE, MAPE and SMAPE values Model Linear Regression Theils Incomplete Method Multilayer Perceptron
118.5105 0.008839 0.004424 0.9974605 MAE 110.695401 110.6996 MAPE 0.0081926 0.008198 SMAPE 0.0040934 0.004095 R2 Value 0.9977142 0.9977138
89
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 6367(Print), ISSN 0976 6375(Online) Volume 1, Number 1, May - June (2010), IAEME
Figure 1 shows how the models predict the closing prices for the last 50 data point.
4 CONCLUSION
The best model for forecasting the daily closing prices was found to be linear regression. The model yielded the least error, only 0.0081926 on average measured by the MAPE, 0.0040934 on average measured by SMAPE and 110.695401 as the MAE value. The R square value is 0.997714272 which indicates that the model is appropriate in predicting the daily closing prices when the daily opening, high and low prices are considered for predicting. This model out performed the nonparametric Theils method and MLP models. It will be interesting to conduct further studies to compare the results with addition variables.
5. REFERENCES
1. Kai Keng Ang and Chai Quek, (2006), Stock Trading Using RSPOP: A Novel Rough Set-Based Neuro-Fuzzy Approach, IEEE Transactions of Neural
Networks, 17(5):13011315. 2. Brabazon. T., (2000) A connectivist approach to index modelling in financing markets, In Proceedings, Coil / EvoNet Summer School. University of Limerick. 3. Salvatore Ingrassia and G. Damiana Costanzo. (2005), Functional principal component analysis of financial time series, Vichi M., Monari P., Mignani S., Montanari A. (Eds.) New Developments in Classification and Data Analysis, Pages 351-358, Springer-Verlag, Berlin. 90
International Journal of Computer Engineering and Technology (IJCET), ISSN 0976 6367(Print), ISSN 0976 6375(Online) Volume 1, Number 1, May - June (2010), IAEME
4. Xiaoping Yang (2005), The Prediction of Stock Prices Based on PCA and BP Neural Networks Chinese Business Review, ISSN 1537-1506, USA Volume 4, No.5 (Serial No.23), Page 64 68. 5. Mark O. Afolabi, Olatoyosi Olude (2007), Predicting Stock Prices Using a Hybrid Kohonen Self Organizing Map (SOM), Proceedings of the 40th Hawaii International Conference on System Sciences, IEEE. 6. Huixin Ke, Jinghua Huang, Hao Shen (2007), Statistic Analysis in Investigation and Research, Beijing: Beijing Broadcast University Press, 465-484. 7. Qiong Liu, Xin Lu, Fuji Ren and Shingo Kuroiwa.( 2004), Automatic Estimation of Stock Market Forecasting and Generating the Corresponding Natural language Expression, IEEE Proceedings of the International Conference on Information Technology: Coding and Computing. 8. Versace M., Bhatt R., Hinds O. and Shiffer M. (2004), Predicting the exchange traded fund DIA with a combination of genetic algorithms and neural Expert Systems with applications, Elsevier. 9. Baba N., Naoyuki I. and Hiroyuki A. (2000), Utilization of Neural Networks & GAs for Constructing Reliable Decision Support Systems to Deal Stocks. Proceedings of IEEE-INNS-ENNS International Joint Conference on Neural Networks. 10. Sujatha K. V. and S. Meenakshi Sundaram, (2010), A MLP, RBF Neural Network Model for Prediction in BSE SENSEX Data Set, Proceedings of National Conference on Applied Mathematics. 11. Katijani, Y., W.K. Hipel and A.I. McLeod, (2005), Forecasting Nonlinear Series with Feedforward Neural Networks: A Case Study of Canadian Lynx Journal of Forecasting, 24: 105-117. 12. Yao, J., Y. Li and C.L. Tan, (2000), Option Price Forecasting Using Neural Networks. Omega, 28: 455-466. 13. Chakraborty, K., Merotra K., Mohan C.K. and Ranka S, (1992), Forecasting the Behavior of Multivariate Time-Series Using Neural Network, Neural Networks, 461-470. 5: Time Data. networks.
91