Innovations in Management Forecast: Time Development of Stock Prices with Neural Networks

Accurate prediction of stock market values is a challenging task for over decades. Prediction of stock prices is associated with numerous benefits including but not limited to helping investors make wise decisions to accumulate profits. The development of the share price is a dynamic and nonlinear process affected by several factors. What is interesting is the unpredictability of share prices due to the global financial crisis. However, classical methods are no longer sufficient for the application of share price development prediction.However, over-relying on prediction data can lead to losses in the case of software malfunction. This paper aims to innovate the prediction management when predicting the share price development over time by the use of neural networks. For the contribution, the data on the prices of CEZ, a.s. shares obtained from the Prague Stock Exchange database. The stock price data are available for the period 2012-2017. In the case of Statistica software, the multilayer perceptron networks (MLP) and the radial basis function networks (RBF) are generated. In the case of Matlab software, the Support Vector Regression (SVR) and the Back-Propagation Neural Network (BPNN) are generated. The networks with the best characteristics are retained and based on the statistical interpretation of the results, and all are applicable in practice. In all data sets, MLP networks show stable performance better than in the case of SVR and BPNN networks. As for the final assessment, the deviation of 2.26% occurs in the most significant differential of the maximal and the minimal prediction. It is not necessarily significant regarding the price of one stock. However, in the case of purchasing or selling a large number of stocks, the difference may seem significant. Therefore, in practice, the application of two networks is recommended: MLP 1-2-1 and MLP 1-5-1. The first network always represents a pessimistic, minimal prediction. The second one of the recommended networks is an optimistic, maximal prediction. The actual situation should correspond to the interval of the difference between the optimistic and pessimistic prediction.
Keywords:
Statistica software, Matlab software, stock price development, neural networks, prediction.

new financial instrument traded on the exchange by essential or practical analysis. Vrbka and Rowland (2017) state that predicting share prices is one of the critical financial topics important for the whole market economy and investors that require an accurate stock market price information to making ethical investment decisions.
However, accurate prediction of share prices is a very complex process for many reasons. One of the reasons is the fact that the price share development is a dynamic, nonlinear process that is influenced by several factors -exchange rates, interest rate, aggregate economic activities or global price indexes. The unpredictability of price share due to the global financial crisis is particularly remarkable. Some research results indicate that classical methods are no longer sufficient for the application of share price development prediction. The main reason is the fact that they cannot be used for carrying out a proper analysis and prediction since there are problems such as the inaccuracy of predictions or low training speed. Therefore, new methods, techniques or application thus come to the fore, with the method of artificial neural networks being one of them (Vrbka et al., 2018). There could be no doubt that stock price indexes are dynamic and complex. Therefore, accurate prediction of stock market values is a challenging task for over decades. As put forward by Groda and Vrbka (2017), precise stock price prediction shows the salient part in aiding financial market stockholders increase profit and obtain realistic trend of potential development based on the exponential alignment of time series using neural networks.
This paper aims to innovate the prediction management when predicting the share price development over time by the use of neural networks.
Literature Review. The development of Science and Technology in recent years has led to more and more people devoted to the study of the prediction, and it turns out to be more comfortable for researchers and investors to make a stock prediction by using different ways now, including machine learning, deep learning, and so on. Chen and He (2018) believed that it is reliable to use deep learning to predict stock prices. Combination of methods believed to have higher prediction accuracy compared to other techniques in stock price forecasting (Jujie & Danfeng, 2018;Endress, 2018;Plastun et al., 2019). Economists are today more unease with the monitoring and prediction of economic sequences due to the influence of the economic crisis in 2007/2008. Determining the current and future state of the economic cycle of businesses is tough. Composite Leading Indicators (CLI) can, however, be used to determine present and future statues of the economic cycle of entities. CLI provide early signals of the turning point in firm's sequences and shows the fluctuation of economic activities. According to Andrea et al. (2017), CLI predicted German economic cycle two quarters ahead with a cross-correlation value of 0.867, which they claimed was better than the predicted capabilities of OECD, Eurostat and IFO pointer.
The multivariate nonlinear prediction model is a useful tool for stock price prediction in an emerging market (Ma and Liu, 2008). Artificial neural network (ANN) has so far displayed the best performance in financial time series forecasting. This approach gives excellent performance in predicting the values from the stock market indices (Wang et al., 2016). Besides, artificial Chemical reaction ANN (ACRNN) developed by Nayak et al. (2017) use chemical reaction optimisation to train MLP models for forecasting stock indices due to the ability to overcome issues of convergence, parameter setting and overfitting. It observed that ACRNN techniques demonstrate significant improvements in prediction accuracy over the MLP approach in the study period. Ntakaris et al. (2018) suggested an efficient way by monitoring the dynamics of a limit order volume to identify the information edge. Rodríguez-Gonzalez et al. (2011) presented CAST software as a set of solution for calculating relative strength indicator using ANN. The result of their research is very encouraging and reveal that the software can predict a given market as a whole along with the individual stock. Bulk and displaying parameters are vital in stock trading prediction (Dinh & Kwon, 2018). Twodimensional principal component analysis and Radial Basis Function ANN outperforms traditional principal component analysis as well as independent component analysis on the MLP (Guo et al., 2015). The reality is that selecting input variables appropriately can generate a higher forecast accuracy, and it is possible to enhance the performance of optimised ANN (Qiu & Song, 2016).
Stock price prediction can never be an easy task. Researchers mostly due to models use, or research focus attains mixed results. Statistica and Matlab software is used by researchers to set data for prediction using the machine or deep learning techniques. On the one hand, Matlab encompasses applicationspecific toolboxes that allow it to learn and apply specialised technology. On the other hand, Statistica software is more comfortable in data mining and it flexible in handling a large number of data set. Prediction of stock prices is associated with numerous benefits including but not limited to helping investors make wise decisions in order to accumulate profits. However, over-relying on prediction data can lead to losses in the case of software malfunction. Therefore, the need for empirical research comparing the performance of the two types of software to aligning stock price development using ANN cannot be overemphasised.
Nevertheless, it shall be noted that in addition to the types as mentioned above of software that is used for this contribution, there is other software capable of time series prediction, or share price prediction. One type is, for example, SPSS Modeler from IBM, known initially as Clementine. SPSS modeller is a sophisticated data mining tool that covers the whole data mining process, starting for the preparation of data to the application of the models' results in practice. It is applied mainly for the creation of predictive models and the performance of other analytical tasks. Its visual interface provides the users with the possibility to use statistical algorithms and algorithms of data mining without programming. Clear advantages of SPSS over other types of software consist of several fields. First, the software is useroriented and puts proper emphasis on the efficiency and the speed of data processing. Other advantages of SPSS include cooperation with company databases, which is at a very high level. Other types of software include the EViews programme developed by the company Quantitative Micro Software. This type of software provides its users with the possibility of the fast development of statistical relationships from data and their subsequent application for predicting the future values of the data.
Methodology and research methods. The CEZ, a.s. is one of the most important business entities in the Czech Republic. It describes its activities, structure and vision as follows (CEZ, 2019): The CEZ Group is an integrated energy group operating in many countries in Central and Southeast Europe and in Turkey, its headquarters is in the Czech Republic. The Group's principal business activities include the generation, distribution, trade and sale of electricity and heat together with the trade and sale of natural gas and coal mining. CEZ Group companies employ almost 27,000 employees.
The most important shareholder of the parent company CEZ, a.s. is the Czech Republic, its share of the registered capital (as of 14th June 2017) is almost 70%. The CEZ, a.s. Stocks are traded at the Prague and Warsaw Stock Exchanges, where they are included in the PX and WIG-CEE indexes.
The mission of the CEZ Group is to provide safe, reliable and positive energy to customers and the entire society, to bring innovation to address energy needs and contribute to a higher quality of life. The strategy reflects the essential transformation of the energy market in Europe. The CEZ Group wants to operate its energy assets most efficiently and to adapt to the growing share of decentralised and emissionfree production. The next priority is to offer the customers a wide range of products and services in the synergy with the sale of electricity and gas. The third priority is to actively invest in prospective energy assets with a focus on the Central European region and in the promotion of modern technologies at the early stage of development.
In the Czech Republic, the CEZ Group companies mine and sell coal, produce and distribute electricity and heat, trade-in electricity and other commodities, sell electricity, heat and natural gas to end customers and provide other services. The product portfolio consists of nuclear, coal, gas, water, photovoltaic, wind and biogas sources. 327 http://mmi.fem.sumdu.edu.ua/en The stock price data are available for the period from 2nd February 2012 to 9th October 2017, i.e. 1,442 records in total. The data are from the Prague Stock Exchange database. They are the final prices of every day in which the stocks were traded in the given period. The data statistics are in Table 1. Source: developed by the authors.
The Statistica 12.0 DELL software and the Matlab software produced by The MathWorks, Inc. are used for data processing. Time is an independent variable. The price of the company stocks is a dependent variable. The time series is divided into three sets -training, testing and validating. 70% of the input data is in the first Group. The neural structures are generated based on the training data set. 15% of the remaining input information is left in the two remaining data sets. Both groups are available for the verification of the reliability of the neural network that has been found, i.e. the discovered model.
The tool of the data mining of the neural network is used in case of the Statistica software. The time series regression is to be used correctly. The multilayer perceptron networks (MLP) and the radial basis function networks (RBF) will be generated. The time series delay will be 1. The total of 10,000 neural networks will be generated. The five of them, with the best characteristics, will be preserved. The method of least squares will be used. Network generating will be terminated unless there is an improvement, i.e. the decrease of the value of the square aggregate. There will be preserved only such neural structures whose square aggregate of residua in proportion to the real development of gold is the lowest possible. At least two neurons, but not more than 20, will be in the hidden layer. In the case of RBF, there will be at least 21 neurons, but not more than 30, in the hidden layer. There will be considered the following activating functions in the hidden layer and the output layer for the MLP: Linear, Logistic, Atanh, Exponential, Sinus.
The other settings will remain default; according to the ANS instrument -automated neural networks. If the outputs are not adequate, they can be modified by the adjustment of the weights of the individual neurons in the structure. In the case of the Matlab software, two kinds of neural networks will be used. Specifically, they are the Support Vector Regression (SVR) and the Back-Propagation Neural Network (BPNN). For the training set, the normalisation will be made by «mapminmax» function, which is the Matlab's function. In the case of SVR, the best parameters g&c will be sought by «SVMcgForRegress» function. The training set will be used to train the SVR model by «svmtrain» function based on the best parameters in the previous step and adopt the Gaussian kernel function to construct SVR. The training set will be brought into SVR to predict the prices of trading days and compute the prediction statistic. Subsequently, the testing set will be brought into SVR to forecast the prices of trading days and calculate the prediction statistic. After that, the validation set will be brought into SVR to predict the prices of trading days and compute the prediction statistic. To predict the price for the following one trading day, the price of last day of 1,442 trading days will be used, namely the price of the previous trading day to predict the price of the latter trading day. The prices of the following 61 trading days are predicted in the same way.
In the case of BPNN, the structures of BPNN will be built by «newff» function. The neurons will be set as follows: 4 neurons in the input layer, 2-20 neurons in the hidden layer and one neuron in the output layer ( Figure 1).

Figure 1. Neural network scheme
Source: developed by the authors. Different functions will be used for the activation of the hidden and output layers. Subsequently, there will be set initial values for the BPNN model such as the maximum number of iterations, minimum error and others. The training set will be used to train the BPNN model by «train» function. After that, the training set will be brought into BPNN to predict the prices of trading days and compute the prediction statistic. The testing set will be brought into BPNN to forecast the prices of trading days and calculate the prediction statistic.
Next, the validation set will be brought into BPNN to predict the prices of trading days and compute the prediction statistic. For this, the price of the last four day of 1,442 trading days will be used to predict the price for the following one trading day. There will be used the prices of the last three days and the just predicted price to predict the price for the following one trading day. The prices of the following 60 trading days are predicted in the same way.
Having generated the neural networks, their validity will be evaluated expertly, not only according to statistical characteristics. The development of prices will be predicted for 62 following days in which the stocks will be traded. Finally, the performance of the Statistica software and the Matlab software will be compared.
Results. Neural structures A (Statistica). Table 2 provides five neural networks with the best characteristics of the 10,000 generated structures. All the preserved neural networks are MLP networks. It means that the neural networks with RBF have met performance parameters and errors worse than the preserved neural networks. All of them were formed by Quasi-Newton algorithm; there was a different version in each time. Two functions were used to activate the hidden layer of neurons -namely the hyperbolic tangent and the logistic function. 329 http://mmi.fem.sumdu.edu.ua/en Two functions were likewise used to activate the neurons of the outer layer. They were the logistic function and the identity function in this case. The value of the correlation coefficient describes the performance of a neural network. The correlation coefficients of all the preserved networks and data sets are shown in table 3. There is a search for a neural network that, ideally, has a correlation coefficient the closest to the value of zero. The performance of all three sets should ideally be similar. It means that the structure generated by the training data set is valid and verified on the two other data files. The value of the correlation coefficients of all neuronal structures and data sets is always higher than 0.997. The differences between the individual neural networks are minimal. Therefore, the analysis of prediction statistics (see table 4) will be principal. When monitoring the prediction statistics of the individual neural networks, it will necessarily be concluded that the differences between the networks are minimal, in all the statistics. The correct result can be indicated in the graphic development of the prices and predictions. Figure 2 shows the graphic comparison of the development of the original CEZ stock prices and the predictions calculated by all the neural networks. The figure shows that all the networks were able to copy the real price movement in the past data accurately. There seems to be a conclusion that all the networks are applicable in practice. At the end of the curve, there is an inserted forecast for the next 62 trading days. Figure 3 offers a detailed view of these 62 trading days. Case number 1,442 corresponds to 9th October 2017. There is a noticeable specific dispersion of future predictions. However, there is a question, whether it is significant. The decrease in stock price is predicted for the period after 9.10.2017. Table 5 provides a detailed view of the selected cases of prediction. Specifically, it is every tenth case of the prediction. Source: developed by the authors.
The table shows that the 1 st and second neural networks have precisely the same course of predictions. It is always the minimum quantity of predictions at any given time. The other predictions are of lower values. However, they do not significantly differ among each other. Further, the table presents a summary of the maximal and minimal predictions of a particular case.
Moreover, it calculates the difference between a minimal and maximal prediction. Subsequently, this difference is compared with the maximum forecast and expressed as a percentage of the difference concerning the maximum forecast. It was found that there is a difference between 1.06% and 2.26% between the minimum and maximum predictions. Neural structures B (Matlab). There have been generated the neural structures of SVR and BPNN by using the Matlab software. The results are noticeable in Table 6. The table clearly shows that the networks display very high performance in every set. The correlation coefficient always exceeds the value of 0.99. Moreover, the margin of error is not significant in the individual sets. The SVR uses the structure of the Gaussian curve. The structure of the BPNN networks sis noticeable in Figure 4.  The schemes of Figure 3 reveal that the BPNN networks use four neurons at the input layer. Further, it is obvious what functions they use in the hidden and the output layers of neurons. The networks number 3 and 4 coincide in terms of the basic structure. The difference, despite negligible, is evident in the performance of both networks. The more significant difference is clear as both networks use diverse activating functions in the hidden layer of neurons. The network number 3 uses sigmoid, i.e. a logistic function; however, the network number 4 uses a linear function like in the output layer of neurons. Table 7 shows the basic statistics of balanced time series. The table reveals minimal differences between the individual networks and between the data subsets, i.e. training, testing and validating. One may assume that not only do the outputs have excellent characteristics, but they can be interpreted analogically. Therefore, the similar outputs of all the neural structures can be expected. However, in order to be sure, it is appropriate the depict the balanced time series realistically, including the prediction for a further 62 days (see Figure 5). Not only does the figure provide a balanced time series, but also the real course of the price of CEZ stocks in the monitored period. The figure makes the minimal deviations from the reality of the balanced time series noticeable. The differences are especially apparent at the moment of predicting the future CEZ stock price. At that time, only the course of the time series balanced by the neural structures is being monitored. Figure 6 presents a closer view of the monitored interval. The graph indicates that all the neural networks generated by the Matlab SW predict future growth. The most optimistic prediction presents the neural network number 2. It assumes the growth of the stock values exceeding CZK 514 in the monitored period. In contrast, the most pessimistic development of the CEZ stock prices predicts the SVR structure. It estimates the value explicitly at CZK 457.76 at the end of the monitored period. Source: developed by the authors.
The table clearly shows that the maximal and the minimal predicted prices gradually differ with time. In the case number 1,452, i.e. every tenth day of the prediction, the maximal and the minimal prices differ from each other by 3%. On the contrary, the difference reaches up to 11% in case number 1,502. However, despite these results, it is not possible to state unambiguously which of the neural networks created by Matlab will predict the future stock price best, i.e. with a minimal difference from the real course of the price of the valuated company.
The comparison of the neural structures generated by the SW Statistica and Matlab. The correlation coefficient describes the performance of the time series. The correlation coefficients for the individual subsets of the examined neural networks are provided in Table 9. It can be found in the table that the networks generated by the SW Matlab show the minimal values of the correlation coefficient. It is the network 3 BPNN 4-4-1 in the case of the training data set, the SVR in the case of the testing data set and the SVR in the case of the validating data set as well. In contrast, the networks generated and preserved by the SW Statistica provide all the maxims. 3.MLP 1-7-1 and 4.MLP 1-5-1, i.e. two artificial structures, achieved a maxim in the training data set. 2.MLP 1-2-1 achieved a maxim in the testing data set. There are three neural networks, 1.MLP 1-2-1, 2.MLP 1-2-1 a 5.MLP 1-4-1, which achieved it in the validating data set. MLP 1-7-1 and 4.MLP 1-5-1, the performance of which is only smaller by 0.000 0001, belong to the validating data set as well. Figure 7 presents an interesting comparison of the performance, which does not only depend on the individual networks in terms of the databases but also in terms of the run software. It is noticeable in the picture there are rather significant differences between the networks generated by SW Statistica and the networks generated by SW Matlab. However, all the neural networks deliver excellent performance. It can be generally claimed the networks generated and preserved by SW Statistica give almost the same performance in all the three data sets, i.e. training, testing and validating; even exceeding the value of 0.99. The networks generated by SW Matlab provide a lower but still comparable performance in the training data set. In contrast, the performance is significantly lower in comparison with SW Statistica in the testing and validating data sets. The SVR neural structure provides even lower performance than the BPNN. The comparison of the predictions of the analysed neural networks must be compelling (see Figure 8). It was evident that the networks generated by SW Matlab predict the rise of the CEZ stock prices in the course of the monitored 62-day period. However, they differ among each other regarding the price estimates of the individual days. In contrast, all the networks generated by SW Statistica assume a fall of the stock prices of the examined stocks.
Conclusion. Predicting share prices is an essential issue in the financial works, as it contributes to the development of efficient strategies for efficient stock market transactions. For all persons interested in the stock exchange, predicting share prices is a critical task. It is a topical issue, especially for shareholders, dealers, and stockbrokers, who are very interested in as accurate share price predictions as possible. Accurate share price predictions provide the possibility of financial advantage and the elimination of market risks.
Over the past two decades, there has been intensive research on the issue of predicting price share development. Most of the research was focused on the approaches of artificial intelligence, specifically artificial neural networks. It can be stated that the most commonly used software tools used for predicting the share market include the Matlab system. The research confirmed it by Gandhmal and Kumar (2019), who presented the overview of various techniques used to achieve effective stock market prediction. The authors also carried out an analysis that describes software tools used in relevant documents dealing with the prediction of share prices. The results of their research show that the leading software tools include JavaScript, Python, Tensor Flow, and the Matlab mentioned above, which was applied for the vast majority