## 4 Application of Hybrid Analytical--Neural Models for Share Price Forecasting  
Information regarding likely upcoming share price changes is of the utmost importance for investors. In this work, new hybrid analytical-neural models are proposed for predicting the closing price of an asset for the next day. In these models, technical or fractal analyses were combined with ANN. The general structure of these hybrid models is shown in Figure 1. In the first module, TA or FA indicators were calculated. These were then used as inputs for the ANN, and the share closing price for the next day was obtained as the ANN output. Three kinds of hybrid model are discussed:  
* Hybrid models combining technical analysis and ANN (TA-ANN)
* Hybrid models combining fractal analysis and ANN (FA-ANN)
* Hybrid models combining technical and fractal analyses and ANN (TA-FA-ANN)  
The different hybrid model structures were compared to find the best solution. The influence of fractal analysis on the final results was also examined.  
In our earlier research, several TA-ANN models [22] and FA-ANN models [30] were tested, in which previously calculated market indicators were used as ANN inputs. This corresponds to the opened switch S, in Figure 1. In the present work, TA-FA-ANN models are introduced. A moving time window method was also applied in all three kinds of hybrid model, where, in addition to market indicators, the current and several past samples of the CLOSE signal were entered as ANN inputs. This variant corresponds to the closed switch S, in Figure 1.  
Feed-forward ANNs of the MLP type were applied for close price forecasting. An example of one of the applied two-layer MLP structures is shown in Figure 2.  
Figure 1: Processing scheme for one-day ahead predicting of the CLOSE value using hybrid TA–FA–ANN-based approach. TA = Technical analysis, FA = Fractal analysis, ANN = Artificial neural network.  
Figure 2 shows an exemplary architecture (4-7-1) of the studied networks. It is composed of 4 input nodes, 7 neurons with a sigmoidal transfer function in a hidden layer, and 1 neuron in an output layer. In this study, different two-layer MLP structures were tested with different numbers of inputs and neurons in the hidden layer. It was confirmed that such two-layer ANNs are universal approximators [13], i.e., they are capable of mapping any smooth input-output functions with appropriate accuracy [43]. In the presented example, four market indicators were entered into the ANN input and the CLOSE value was obtained on the ANN output. Generally, for all the tested ANNs, the number of inputs is determined by the number of implemented TA and FA indices and also by the number of CLOSE signal past samples. The number of neurons in the hidden layer should be chosen in such a way as to achieve a compromise between ANN accuracy and generalization capability [44]. An insufficient number of neurons would result in poor ANN accuracy. Too many neurons would increase the network training time and could cause losses in ANN generalization capability [44]. Therefore, different types of MLP were tested. The ANNs were trained with a resilient propagation algorithm [45]. Input variables were selected on the basis of expert knowledge gathered in a literature review [14; 16; 41; 46; 47] and then tested experimentally according to the rules described in Section 5. The main criterion for selecting the ANN structures was the minimum of the mean square error (MSE) for the testing data.  
The reference method for hybrid modeling was a purely ANN-based approach, in which the moving time window method [48] was applied and the share close price was predicted by MLP.