Neural networks and forecasting stock price movements-accounting approach : Empirical evidence from Iran

Article history: Received December 1, 2011 Received in Revised form February, 14, 2011 Accepted 24 March 2012 Available online March 25 2012 Stock market prediction is one of the most important interesting areas of research in business. Stock markets prediction is normally assumed as tedious task since there are many factors influencing the market. The primary objective of this paper is to forecast trend closing price movement of Tehran Stock Exchange (TSE) using financial accounting ratios from year 2003 to year 2008. The proposed study of this paper uses two approaches namely Artificial Neural Networks and multi-layer perceptron. Independent variables are accounting ratios and dependent variable of stock price , so the latter was gathered for the industry of Motor Vehicles and Auto Parts. The results of this study show that neural networks models are useful tools in forecasting stock price movements in emerging markets but multi-layer perception provides better results in term of lowering error terms. © 2012 Growing Science Ltd. All rights reserved.


Introduction
Stock market has been one of the main sourcing for investment planning around the world and it has been a growing market in Iran recently.The increasing globalization of the financial markets has heightened the interest in emerging markets.The idea of having a well-organized stock market to speed up the process of industrialization of the country dates back to 1930's when Bank Melli Iran started a study about the subject.A report completed in 1936 worked out the details for the formation of a stock market and laid down the preliminary foundation to proceed with the plan.The outbreak of the World War II and subsequent economic and political events delayed the establishment of the stock exchange up to the year 1967 when the Stock Exchange Act was ratified.The Tehran Stock Exchange opened in April 1968.Initially only Government bonds and certain State-backed certificates were traded in the market.
During 1970's the demand for capital boosted the demand for stocks and at the same time institutional changes like the transfer of shares of public companies and large private firms owned by families, to the employees and the private sector led to the expansion of the stock market activities.(http://www.iran-embassy-oslo.no/embassy/exchange.htm).
This study aims to forecast the stock price movements using neural network (NN) and OLS models (Specht, 1968).NN models have been successfully used in prediction or forecasting studies across many disciplines (Mostafa, 2010).There is an extensive literature in financial applications of NNs (Haerdle, 1990;Specht, 1991;Schioler & Hartmann, 1992;Dhar & Chou, 2001).Callen et al. (1996) implemented an artificial NN model to predict quarterly accounting earnings for a sample of 296 corporations trading on the New York stock exchange.Their results indicated that the resulted errors were significantly larger (smaller) than the generated by the parsimonious Brown-Rozeff and Griffin-Watts (Foster) linear time series techniques.The study showed that NN models were not necessarily superior to linear time series models even when the data are financial, seasonal and non-linear.Brockett et al. (1997) presented an alternative feed-forward back-propagation NN method, which utilizes eight financial decision variables obtained from a statistical analysis of a range of State of Texas insurance companies, which were regarded as being financially healthy or weak over the period 1987-90.The results explained that the technique was very successful in predicting which companies would become insolvent.Desai and Bharati (1998) argued that there is a predictable variation in returns of financial assets over time.They studied whether the predictive power of the economic and financial variables used in studies could be enhanced when the statistical method of linear regression was replaced by feedforward neural networks with backpropagation of error.They used two techniques to reduce the complexity of the network.
The results of the experiments obtained by Desai and Bharati (1998) confirmed that an "overfitted" network, while making better predictions for within-sample data provides poor predictions for out-ofsample data.The methods helped improve out-of-sample forecasts and they showed that one cannot say that the linear regression forecasts are conditionally effective in terms of neural networks forecasts with any degree of confidence.However, one can say that the neural networks forecasts are conditionally effective with respect to the linear regression prediction with some confidence.Leung et al. (2000) explained the limitations on studies examining the predictability of the stock index movement predictions.They evaluated the performance of different multivariate classification techniques relative to a group of level estimation approaches by conducting time series comparisons between the two types of models on the basis of predicted performance and investment return.They measured the relative performance of different models with respect to the trading profit generated by their forecasts and developed a set of threshold trading rules driven by the probabilities estimated by the classification models.The results recommended that the classification models outperformed the level estimation models in terms of predicting the direction of the stock market movement and maximizing returns from investment trading.Leung et al. (2000) in other work studied the predictability of a specific NN architecture called general regression neural network (GRNN) (Caudill, 1993) and compared its performance with different forecasting techniques, including multi-layered feedforward network (MLFN), random walk models and multivariate transfer function.They reported that GRNN not only maintained a higher degree of forecasting accuracy but also performed statistically better than other evaluated models for different currencies.Chen et al. (2003) proposed a model to predict the direction of return on market index in one of the fastest growing financial exchanges in developing Asian countries called Taiwan Stock Exchange,.The proposed model was based on the idea that trading strategies guided by forecasts of the direction of price movement could be more effective and lead to higher profits.They used probabilistic NN (PNN) to predict the direction of index return after it was trained by historical data.Chen et al. (2003) compared the performance of their proposed model with the generalized methods of moments (GMM) with Kalman filter.Besides, the forecasts were used to various index trading strategies, of which the performances were compared with those generated by the buy-and-hold strategy as well as the investment strategies guided by other models.The results indicated that the PNN-based investment strategies provided higher returns than other investment strategies.They also considered the influences of length of investment horizon and commission rates.Olson and Mossman (2003) compares NN forecasts of one-year-ahead Canadian stock returns with the predictions obtained using ordinary least squares (OLS) and logistic regression (logit) methods.The input data were 61 accounting ratios for 2352 Canadian companies over the period 1976-1993.The most recent 6 years of data were rolled forward each year to forecast annual returns for 1983-1993.
The results showed that back propagation NNs, which considered non-linear relationships between input and output variables, outperform the best regression alternatives for both point estimation and in classifying firms expected to have either high or low returns.The superiority of the NN techniques translated into greater profitability using different trading rules.Classification models seemed to outperform point estimation models, but four to eight output categories appeared to provide better results for both logit and NN models than either binary classification models or models with 16 classification categories.Ebrahimpour et al. (2011) presented a new method for forecasting the trend of time series, based on mixture of multi-layer perceptron (MLP).They used three neural network combining methods and an Adaptive Network-Based Fuzzy Inference System (ANFIS) for trend prediction in the TSE.They used two experiments in their study.In the first experiment, the time series data were the Kharg petrochemical company's daily closing prices on the TSE.It considered various schemes for forecasting the trend of the time series, the recognition rates were 75.97%, 77.13% and 81.64% for stacked generalization, modified stacked generalization and ANFIS, respectively.Using the mixture of MLP experts (ME) scheme, the recognition rate seemed to have increasing trend to 86.35%.For the second case, the time series data were the daily closing prices of 37 firms on the TSE.This experiment was conducted to verify the results of the first experiment and to show the efficiency of the ME method compared with stacked generalization, modified stacked generalization and ANFIS.
This paper presents an empirical study for stock market prediction using different techniques such as NNs.The remaining paper is organized as follows.Section 2 provides a description of our methodological approach and presents the hypotheses development; the results are discussed in Section 3.

Data
This study covers the historical data from March 19, 2003to March 19, 2008.Regarding to the features of neural networks, in which the more number of testing data, the better network gets reply whole companies having been selected in statistic society for the study were tested, We used data for all listed companies traded on the TSE and used the following qualifications for selecting sample, -Companies belong to industries having the most number of companies rather other industries at the same level.-The end of companies' financial duration should be at 19 th , March, 2008 and none of them has any changes during the study.-Companies must be active from 2003 to 2008.
-Comprehensive data are given on all companies.
Based on the above limitations, Motor Vehicles and Auto Parts industries were selected as a statistic society.

2.2.Hypothesis
Predicting stock price using accounting ratios with neural network approach can reduce the error in predicting stock price at the level of Motor Vehicles and Auto Parts industries compared with linear methods like ordinary least squares.

Ordinary least squares (OLS)
In statistics, ordinary least squares (OLS) or linear least squares is a method for estimating the unknown parameters in a linear regression model.OLS is a classic curve estimation method, which minimizes the sum of squared vertical distances between the observed and predicted responses in the dataset, using a linear approximation.To predict stock price, the current paper uses last year ratios for predicting stock price.First, stock price is predicted through OLS approach.This paper applies multiple regressions, that stock price is considered dependent variable (y) and accounting ratios as independent variable X 1 in the following model: where we obtain passive parameters ( i a ) through least error square and ( e ) indicates predication error.The most common classification on accounting ratios (independent variable) is follow:

2.4.Multi-layer perceptron (MLP)
Multi-layer perceptron (MLP) (Ebrahimpour, 2008) consists of sensory units that make up the input layer, one or more hidden layers of processing units (perceptrons), and one output layer of processing units (perceptrons).The MLP performs a functional mapping from the input space to the output space.An MLP with a single hidden layer having H hidden units and a single output, y, implements mappings of the form 1 ( ) , where h Z is the output of the th h hidden unit, h W is the weight between the th h hidden and the output unit, and o W is the output bias.There are N sensory inputs, Xj .The j th input is weighted by an amount Bj in the h th hidden unit.The output of an MLP is compared with a target output and an error is calculated.This error is back-propagated to the neural network and used to adjust the weights.This process aims at minimizing the mean square error between the network's prediction output and the target output.MLP was first developed to mimic the functioning of the brain.It consists of interconnected nodes referred to as processing elements that receive, process, and transmit information.MLP consists of three types of layers: the first layer is known as the input layer and corresponds to the problem input variables with one node for each input variable.The second layer is known as the hidden layer and is useful in capturing non-linear relationships among variables.The final layer is known as the output layer and corresponds to the classification being predicted.
The proposed model first trains the network to produce the correct output with minimum error.The output of the first part is fed to the middle layer nodes to process the data.These values are processed based on the randomly allocated initial weight for the links.The input travels from one layer to another and every layer processes the value based on the weights of its links.When the value finally reaches the output node, the actual output is compared with the expected output.The difference is measured and it is propagated backwards, this is when the links adjust their weights.After the error has propagated all the way back to first layer of middle level nodes, the input is fed to the input nodes one more time.The process repeats and the weights are adjusted over and over until the error is minimized.The important point is the weight of different links and the weights of the links will decide the output value.The MLP is the most frequently used NN technique in pattern recognition and classification problems.

2.5.Common performance evaluation standards for prediction
This paper is applied and based on filed a study, which is based on gathered data from TSE and the obtain results are universalized for the whole statistical society.The proposed model of this paper uses OLS to study linear relationship and to evaluate productivity of linear methods, then to estimate the error rate; it uses performance evaluation standards including mean standard error (MSE), radical mean square error (RMSE), normalized mean standard error (NMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE).
The first three cases were from mean standard error's family, the later two standards were on obsolete error (Table 2), to study non-linear relationship and to evaluate the part of productivity in non-linear relates of artificial neural networks.At the end of paper, two methods are compared and some and the results are extracted with regard to error evaluation standards.

OLS-based forecasting
To predict stock price, the current paper uses last year ratios for predicting stock price.First, stock price is estimated through OLS approach.After estimating computations related to OLS using SPSS software package, MSE and R 2 are calculated as 5.0824×10 6 and 0.6233, respectively.Table 3 demonstrates details of all errors.

MLP-based forecasting
The implementation of the proposed MLP has been performed using MATLAB software package and Fig. 1 shows details of our results for the actual versus predicted dataset.Based on the results we can also conclude that financial ratios have relatively good power for price estimation.

Conclusion
In this paper, we have use two methods based on ordinary least square as well as multi-layer perception to forecast future price index based on financial ratios of stock market.The proposed model of this paper has been implemented for closing price movement of Tehran Stock Exchange (TSE) using financial accounting ratios from year 2003 to year 2008.The investigation has used two approaches namely Artificial Neural Networks and multi-layer perceptron.Independent variables are accounting ratios and dependent variable of stock price , so the latter was gathered for the industry of Motor Vehicles and Auto Parts.The results of this study indicated that neural networks models are useful tools in forecasting stock price movements in emerging markets but multi-layer perception provided better results in term of lowering error terms.

Fig. 1 .
Fig. 1.The results of the implementation of MLP forecast

Table 3
Standards of performance evaluation for OLS approach

Table 4
shows the results of different error estimations.
Table 5 compares the performance of two methods based on two different techniques.As we can observe from the results of Table 5, MLP provides better estimations with lower values of MSE, RMSE, NMSE, MAE and MAPE, it can describe almost 73% of the actual data versus 62% for OLS method.