# Modified Neural Network Algorithms for Predicting Trading Signals of Stock Market Indices

Authors: C. D. Tilakaratne; M. A. Mammadov; S. A. Morris
Journal: Journal of Applied Mathematics and Decision Sciences
 (2009)

---

## Abstract

The aim of this paper is to present modified neural network algorithms to predict whether it is best to buy, hold, or sell shares (trading signals) of stock market indices. Most commonly used classification techniques are not successful in predicting trading signals when the distribution of the actual trading signals, among these three classes, is imbalanced. The modified network algorithms are based on the structure of feedforward neural networks and a modified Ordinary Least Squares (OLSs) error function. An adjustment relating to the contribution from the historical data used for training the networks and penalisation of incorrectly classified trading signals were accounted for, when modifying the OLS function. A global optimization algorithm was employed to train these networks. These algorithms were employed to predict the trading signals of the Australian All Ordinary Index. The algorithms with the modified error functions introduced by this study produced better predictions.


---

## Body

## 1. Introduction

A number of previous studies have attempted to predict the price levels of stock market indices [1–4]. However, in the last few decades, there have been a growing number of studies attempting to predict the direction or the trend movements of financial market indices [5–11]. Some studies have suggested that trading strategies guided by forecasts on the direction of price change may be more effective and may lead to higher profits [10]. Leung et al. [12] also found that the classification models based on the direction of stock return outperform those based on the level of stock return in terms of both predictability and profitability.The most commonly used techniques to predict the trading signals of stock market indices are feedforward neural networks (FNNs) [9, 11, 13], probabilistic neural networks (PNNs) [7, 12], and support vector machines (SVMs) [5, 6]. FNN outputs the value of the stock market index (or a derivative), and subsequently this value is classified into classes (or direction). Unlike FNN, PNN and SVM directly output the corresponding class.Almost all of the above mentioned studies considered only two classes: the upward and the downward trends of the stock market movement, which were considered as buy and sell signals [5–7, 9, 11]. It was noticed that the time series data used for these studies are approximately equally distributied among these two classes.In practice, the traders do not participate in trading (either buy or sell shares) if there is no substantial change in the price level. Instead of buying/selling, they will hold the money/shares in hand. In such a case it is important to consider the additional class which represents a hold signal. For instance, the following criterion can be applied to define three trading signals, buy, hold, and sell.Criterion A.
(1.1)buyifY(t+1)≥lu,holdifll<Y(t+1)<lusellifY(t+1)≤ll,,
where Y(t+1) is the relative return of the Close price of day (t+1) of the stock market index of interest, while ll  and lu are thresholds.The values ofll and lu depend on the traders' choice. There is no standard criterion found in the literature how to decide the values of ll and lu, and these values may vary from one stock index to another. A trader may decide the values for these thresholds according to his/her knowledge and experience.The proper selection of the values forll and lu could be done by performing a sensitivity analysis. The Australian All Ordinary Index (AORD) was selected as the target stock market index for this study. We experimented different pairs of values for ll and lu [14]. For different windows, different pairs gave better predictions. These values also varied according to the prediction algorithm used. However, for the definition of trading signals, these values needed to be fixed.By examining the data distribution (during the study period, the minimum, maximum, and average for the relative returns of the Close price of the AORD are-0.0687, 0.0573, and 0.0003, resp.),   we chose lu=-ll=0.005 for this study, assuming that 0.5% increase (or decrease) in Close  price of day t+1 compared to that of day t is reasonable enough to consider the corresponding movement as a buy (or sell) signal. It is unlikely that a change in the values of ll and lu would make a qualitative change in the prediction results obtained.According to Criterion A withlu=-ll=0.005, one cannot expect a balanced distribution of data among the three classes (trading signals) because more data falls into the hold class while less data falls into the other two classes.Due to the imbalance of data, the most classification techniques such as SVM and PNN produce less precise results [15–17]. FNN can be identified as a suitable alternative technique for classification when the data to be studied has an imbalanced distribution. However, a standard FNN itself shows some disadvantages: (a) use of local optimization methods which do not guarantee a deep local optimal solution; (b) because of (a), FNN needs to be trained many times with different initial weights and biases (multiple training results in more than one solution and having many solutions for network parameters prevent getting a clear picture about the influence of input variables); (c) use of the ordinary least squares (OLS; see (2.1) as an error function to be minimised may not be suitable for classification problems.To overcome the problem of being stuck in a local minimum, finding a global solution to the error minimisation function is required. Several past studies attempted to find global solutions for the parameters of the FNNs, by developing new algorithms (e.g., [18–21]). Minghu et al. [19] proposed a hybrid algorithm of global optimization of dynamic learning rate for FNNs, and this algorithm shown to have global convergence for error backpropagation multilayer FNNs (MLFNNs). The study done by Ye and Lin [21] presented a new approach to supervised training of weights in MLFNNs. Their algorithm is based on a “subenergy tunneling function’’ to reject searching in unpromising regions and a “ripple-like’’ global search to avoid local minima. Jordanov [18] proposed an algorithm which makes use of a stochastic optimization technique based on the so-called low-discrepancy sequences to trained FNNs. Toh et al.  [20] also proposed an iterative algorithm for global FNN learning.This study aims at modifying neural network algorithms to predict whether it is best buy, hold, or sell the shares (trading signals) of a given stock market index. This trading system is designed for short-term traders to trade under normal conditions. It assumes stock market behaviour is normal and does not take unexceptional conditions such as bottlenecks into consideration.When modifying algorithms, two matters were taken into account: (1) using a global optimization algorithm for network training and (2) modifying the ordinary least squares error function. By using a global optimization algorithm for network training, this study expected to find deep solutions to the error function. Also this study attempted to modify the OLS error function in a way suitable for the classification problem of interest.Many previous studies [5–7, 9, 11] have used technical indicators of the local markets or economical variables to predict the stock market time series. The other novel idea of this study is the incorporation of the intermarket influence [22, 23] to predict the trading signals.The organisation of the paper is as follows. Section2 explains the modification of neural network algorithms. Section 3 describes the network training, quantification of intermarket influence, and the measures of evaluating the performance of the algorithms. Section 4 presents the results obtained from the proposed algorithms together with their interpretations. This section also compares the performance of the modified neural network algorithms with that of the standard FNN algorithm. The last section is the conclusion of the study.


## 2. Modified Neural Network Algorithms

In this paper, we used modified neural network algorithms for forecasting the trading signals of stock market indices. We used the standard FNN algorithm as the basis of these modified algorithms.A standard FNN is a fully connected network with every node in the lower layer linked to every node in the next higher layer. These linkages are attached with some weights,w=(w1,…,wM), where M is the number of all possible linkages. Given weight, w, the network produces an output for each input vector. The output corresponding to the ith input vector will be denoted by oi≡oi(w).FNNs adopt the backpropagation learning that finds optimal weightsw by minimising an error between the network outputs and given targets [24]. The most commonly used error function is the Ordinary Least Squares function (OLS):(2.1)EOLS=1N∑i=1N(ai-oi)2,
where N is the total number of observations in the training set, while ai and oi are the target and the output corresponding to the ith observation in the training set.


### 2.1. Alternative Error Functions

As described in the Introduction (see Section1), in financial applications, it is more important to predict the direction of a time series rather than its value. Therefore, the minimisation of the absolute errors between the target and the output may not produce the desired accuracy of predictions [24, 25]. Having this idea in mind, some past studies aimed to modify the error function associated with the FNNs (e.g.,  [24–27]). These studies incorporated factors which represent the direction of the prediction (e.g., [24–26]) and the contribution from the historical data that used as inputs (e.g., [24, 25, 27]).The functions proposed in [24–26] penalised the incorrectly predicted directions more heavily, than the correct predictions. In other words, higher penalty was applied if the predicted value, oi, is negative when the target, ai, is positive or viceversa.Caldwell [26] proposed the Weighted Directional Symmetry (WDS) function which is given as follows:(2.2)fWDS(i)=100N∑i=1Nwds(i)|ai-oi|,
where(2.3)wds(i)={1.5if(ai-ai-1)(oi-oi-1)≤0,0.5,otherwise,
and N is the total number of observations.Yao and Tan [24, 25] argued that the weight associated with fWDS (i.e., wds(i)) should be heavily adjusted if a wrong direction is predicted for a larger change, while it should be slightly adjusted if a wrong direction is predicted for a smaller change and so on. Based on this argument, they proposed the Directional Profit adjustment factor:(2.4)fDP(i)={c1if(Δai×Δoi)>0,Δai≤σ,c2if(Δai×Δoi)>0,Δai>σ,c3if(Δai×Δoi)<0,Δai≤σ,c4if(Δai×Δoi)<0,Δai>σ,
where Δai=ai-ai-1,  Δoi=oi-oi-1,  and σ  is the standard deviation of the training data (including validation set). For the experiments authors used c1=0.5, c2=0.8, c3=1.2, and c4=1.5 [24, 25]. By giving these weights, they tried to impose a higher penalty the predictions whose direction is wrong and the magnitude of the error is lager, than the other predictions.Based on this Directional Profit adjustment factor (2.4), Yao and Tan [24, 25]  proposed Directional Profit (DP) model [24, 25]:(2.5)EDP=1N∑i=1NfDP(i)(ai-oi)2.
Refenes et al. [27] proposed Discounted Least Squares (LDSs) function by taking the contribution from the historical data into accounts as follows:(2.6)EDLS=1N∑i=1Nwb(i)(ai-oi)2,
where wb(i) is an adjustment relating to the contribution of the ith observation and is described by the following equation:(2.7)wb(i)=11+exp(b-2bi/N).
Discount rate b denotes the contribution from the historical data. Refenes et al. [27] suggested b=6.Yao and Tan [24, 25] proposed another error function, Time Dependent directional Profit (TDP) model, by incorporating the approach suggested by Refenes et al. [27] to their Directional Profit Model (2.5):(2.8)ETDP=1N∑i=1NfTDP(i)(ai-oi)2,
where fTDP(i)=fDP(i)×wb(i).fDP(i) and wb(i) are described by (2.4) and (2.7), respectively.Note. Refenes et al. [27] and Yao and Tan [24, 25] used 1/2N instead of 1/N in the formulas given by (2.5), (2.6), and (2.8).


### 2.2. Modified Error Functions

We are interested in classifying trading signals into three classes: buy, hold, and sell. The hold class includes both positive and negative values (see Criterion A in Section1). Therefore, the least squares functions, in which the cases with incorrectly predicted directions (positive or negative) are penalised (e.g., the error functions given by (2.5) and (2.8), will not give the desired prediction accuracy. For example, suppose that ai=0.0045 and oi=-0.0049. In this case the predicted signal is correct, according to Criterion A. However, the algorithms used in [24, 25] try to minimise error function as Δai×Δoi<0 (refer (2.8). In fact such a minimisation is not necessary, as the predicted signal is correct. Therefore, instead of the weighing schemes suggested by previous studies, we proposed a different scheme of weighing.Unlike the weighing schemes suggested in [24, 25], which impose a higher penalty on the predictions whose sign (i.e., negative or positive) is incorrect, this novel scheme is based on the correctness of the classification of trading signals. If the predicted trading signal is correct, we assign a very small (close to zero) weight and, otherwise, assign a weight equal to 1. Therefore, the proposed weighing scheme is(2.9)wd(i)={δif  the  predicted  trading  signal  is  correct,1,otherwise,
where δ is a very small value. The value of δ needs to be decided according to the distribution of data.


#### 2.2.1. Proposed Error Function 1

The weighing scheme,fDP(i), incorporated in the Directional Profit (DP) error function (2.5) considers only two classes, upward and downward trends (direction) which are corresponding to buy and sell signals. In order to deal with three classes, buy, hold, and sell, we modified this error function by replacing fDP(i)  with the new weighing scheme wd(i) (see (2.9). Hence, the new error function (ECC) is defined as(2.10)ECC=1N∑i=1Nwd(i)(ai-oi)2.
When training backpropagation neural networks using (2.10) as the error minimisation function, the error is forced to take a smaller value, if the predicted trading signal is correct. On the other hand, the actual size of the error is considered in the cases of misclassifications.


#### 2.2.2. Proposed Error Function 2

The contribution from the historical data also plays an important role in the prediction accuracy of financial time series. Therefore, Yao and Tan [24, 25] went further by combining DP error function (see (2.5) with DLS error function (see (2.6) and proposed Time Dependent Directional Profit (TDP) error function (see (2.8).Following Yao and Tan [23, 24], this study also proposed a similar error function, ETCC, by combining first new error function (ECC) described by (2.10) with the DLS error function (EDLS). Hence the second proposed error function is(2.11)ETCC=1N∑i=1Nwb(i)×wd(i)(ai-oi)2,
where wb(i) and wd(i) are defined by (2.7) and (2.9), respectively.The difference between the TDP error function (see (2.8) and this second new error function (2.11) is that fDP(i) is replaced by wd(i) in order to deal with three classes: buy, hold, and sell.


### 2.3. Modified Neural Network Algorithms

Modifications to neural network algorithms were done by (i) using the OLS error function as well as the modified least squares error functions; (ii) employing a global optimization algorithm to train the networks.The importance of using global optimization algorithms for the FNN training was discussed in Section1. In this paper, we applied the global optimization algorithm, AGOP (introduced in [28, 29]), for training the proposed network algorithms.As the error function to be minimised, we consideredEOLS (see (2.1) and EDLS (see (2.6) together with the two modified error functions ECC (see (2.10) and ETCC (see (2.11). Based on these four error functions, we proposed the following algorithms:(i)
NNOLS—neural network algorithm based on the Ordinary Least Squares  error function, EOLS (see (2.1);(ii)
NNDLS—neural network algorithm based on the Discounted Least Squares  error function, EDLS (see (2.6);(iii)
NNCC—neural network algorithm based on the newly proposed error function 1, ECC (see (2.10);(iv)
NNTCC—neural network algorithm based on the newly proposed error function 2, ETCC (see (2.11).The layers are connected in the same structure as the FNN (Section2). A tan-sigmoid function was used as the transfer function between the input layer and the hidden layer, while the linear transformation function was employed between the hidden and the output layers.AlgorithmNNOLS differs from the standard FNN algorithm since it employs a new global optimization algorithm for training. Similarly, NNDLS also differs from the respective algorithm used in [24, 25] due to the same reason. In addition to the use of new training algorithm, NNCC and NNTCC are based on two different modified error functions. The only way to examine whether these new modified neural network algorithms perform better than the existing ones (in the literature) is to conduct numerical experiments.


## 2.1. Alternative Error Functions

As described in the Introduction (see Section1), in financial applications, it is more important to predict the direction of a time series rather than its value. Therefore, the minimisation of the absolute errors between the target and the output may not produce the desired accuracy of predictions [24, 25]. Having this idea in mind, some past studies aimed to modify the error function associated with the FNNs (e.g.,  [24–27]). These studies incorporated factors which represent the direction of the prediction (e.g., [24–26]) and the contribution from the historical data that used as inputs (e.g., [24, 25, 27]).The functions proposed in [24–26] penalised the incorrectly predicted directions more heavily, than the correct predictions. In other words, higher penalty was applied if the predicted value, oi, is negative when the target, ai, is positive or viceversa.Caldwell [26] proposed the Weighted Directional Symmetry (WDS) function which is given as follows:(2.2)fWDS(i)=100N∑i=1Nwds(i)|ai-oi|,
where(2.3)wds(i)={1.5if(ai-ai-1)(oi-oi-1)≤0,0.5,otherwise,
and N is the total number of observations.Yao and Tan [24, 25] argued that the weight associated with fWDS (i.e., wds(i)) should be heavily adjusted if a wrong direction is predicted for a larger change, while it should be slightly adjusted if a wrong direction is predicted for a smaller change and so on. Based on this argument, they proposed the Directional Profit adjustment factor:(2.4)fDP(i)={c1if(Δai×Δoi)>0,Δai≤σ,c2if(Δai×Δoi)>0,Δai>σ,c3if(Δai×Δoi)<0,Δai≤σ,c4if(Δai×Δoi)<0,Δai>σ,
where Δai=ai-ai-1,  Δoi=oi-oi-1,  and σ  is the standard deviation of the training data (including validation set). For the experiments authors used c1=0.5, c2=0.8, c3=1.2, and c4=1.5 [24, 25]. By giving these weights, they tried to impose a higher penalty the predictions whose direction is wrong and the magnitude of the error is lager, than the other predictions.Based on this Directional Profit adjustment factor (2.4), Yao and Tan [24, 25]  proposed Directional Profit (DP) model [24, 25]:(2.5)EDP=1N∑i=1NfDP(i)(ai-oi)2.
Refenes et al. [27] proposed Discounted Least Squares (LDSs) function by taking the contribution from the historical data into accounts as follows:(2.6)EDLS=1N∑i=1Nwb(i)(ai-oi)2,
where wb(i) is an adjustment relating to the contribution of the ith observation and is described by the following equation:(2.7)wb(i)=11+exp(b-2bi/N).
Discount rate b denotes the contribution from the historical data. Refenes et al. [27] suggested b=6.Yao and Tan [24, 25] proposed another error function, Time Dependent directional Profit (TDP) model, by incorporating the approach suggested by Refenes et al. [27] to their Directional Profit Model (2.5):(2.8)ETDP=1N∑i=1NfTDP(i)(ai-oi)2,
where fTDP(i)=fDP(i)×wb(i).fDP(i) and wb(i) are described by (2.4) and (2.7), respectively.Note. Refenes et al. [27] and Yao and Tan [24, 25] used 1/2N instead of 1/N in the formulas given by (2.5), (2.6), and (2.8).


## 2.2. Modified Error Functions

We are interested in classifying trading signals into three classes: buy, hold, and sell. The hold class includes both positive and negative values (see Criterion A in Section1). Therefore, the least squares functions, in which the cases with incorrectly predicted directions (positive or negative) are penalised (e.g., the error functions given by (2.5) and (2.8), will not give the desired prediction accuracy. For example, suppose that ai=0.0045 and oi=-0.0049. In this case the predicted signal is correct, according to Criterion A. However, the algorithms used in [24, 25] try to minimise error function as Δai×Δoi<0 (refer (2.8). In fact such a minimisation is not necessary, as the predicted signal is correct. Therefore, instead of the weighing schemes suggested by previous studies, we proposed a different scheme of weighing.Unlike the weighing schemes suggested in [24, 25], which impose a higher penalty on the predictions whose sign (i.e., negative or positive) is incorrect, this novel scheme is based on the correctness of the classification of trading signals. If the predicted trading signal is correct, we assign a very small (close to zero) weight and, otherwise, assign a weight equal to 1. Therefore, the proposed weighing scheme is(2.9)wd(i)={δif  the  predicted  trading  signal  is  correct,1,otherwise,
where δ is a very small value. The value of δ needs to be decided according to the distribution of data.


### 2.2.1. Proposed Error Function 1

The weighing scheme,fDP(i), incorporated in the Directional Profit (DP) error function (2.5) considers only two classes, upward and downward trends (direction) which are corresponding to buy and sell signals. In order to deal with three classes, buy, hold, and sell, we modified this error function by replacing fDP(i)  with the new weighing scheme wd(i) (see (2.9). Hence, the new error function (ECC) is defined as(2.10)ECC=1N∑i=1Nwd(i)(ai-oi)2.
When training backpropagation neural networks using (2.10) as the error minimisation function, the error is forced to take a smaller value, if the predicted trading signal is correct. On the other hand, the actual size of the error is considered in the cases of misclassifications.


### 2.2.2. Proposed Error Function 2

The contribution from the historical data also plays an important role in the prediction accuracy of financial time series. Therefore, Yao and Tan [24, 25] went further by combining DP error function (see (2.5) with DLS error function (see (2.6) and proposed Time Dependent Directional Profit (TDP) error function (see (2.8).Following Yao and Tan [23, 24], this study also proposed a similar error function, ETCC, by combining first new error function (ECC) described by (2.10) with the DLS error function (EDLS). Hence the second proposed error function is(2.11)ETCC=1N∑i=1Nwb(i)×wd(i)(ai-oi)2,
where wb(i) and wd(i) are defined by (2.7) and (2.9), respectively.The difference between the TDP error function (see (2.8) and this second new error function (2.11) is that fDP(i) is replaced by wd(i) in order to deal with three classes: buy, hold, and sell.


## 2.2.1. Proposed Error Function 1

The weighing scheme,fDP(i), incorporated in the Directional Profit (DP) error function (2.5) considers only two classes, upward and downward trends (direction) which are corresponding to buy and sell signals. In order to deal with three classes, buy, hold, and sell, we modified this error function by replacing fDP(i)  with the new weighing scheme wd(i) (see (2.9). Hence, the new error function (ECC) is defined as(2.10)ECC=1N∑i=1Nwd(i)(ai-oi)2.
When training backpropagation neural networks using (2.10) as the error minimisation function, the error is forced to take a smaller value, if the predicted trading signal is correct. On the other hand, the actual size of the error is considered in the cases of misclassifications.


## 2.2.2. Proposed Error Function 2

The contribution from the historical data also plays an important role in the prediction accuracy of financial time series. Therefore, Yao and Tan [24, 25] went further by combining DP error function (see (2.5) with DLS error function (see (2.6) and proposed Time Dependent Directional Profit (TDP) error function (see (2.8).Following Yao and Tan [23, 24], this study also proposed a similar error function, ETCC, by combining first new error function (ECC) described by (2.10) with the DLS error function (EDLS). Hence the second proposed error function is(2.11)ETCC=1N∑i=1Nwb(i)×wd(i)(ai-oi)2,
where wb(i) and wd(i) are defined by (2.7) and (2.9), respectively.The difference between the TDP error function (see (2.8) and this second new error function (2.11) is that fDP(i) is replaced by wd(i) in order to deal with three classes: buy, hold, and sell.


## 2.3. Modified Neural Network Algorithms

Modifications to neural network algorithms were done by (i) using the OLS error function as well as the modified least squares error functions; (ii) employing a global optimization algorithm to train the networks.The importance of using global optimization algorithms for the FNN training was discussed in Section1. In this paper, we applied the global optimization algorithm, AGOP (introduced in [28, 29]), for training the proposed network algorithms.As the error function to be minimised, we consideredEOLS (see (2.1) and EDLS (see (2.6) together with the two modified error functions ECC (see (2.10) and ETCC (see (2.11). Based on these four error functions, we proposed the following algorithms:(i)
NNOLS—neural network algorithm based on the Ordinary Least Squares  error function, EOLS (see (2.1);(ii)
NNDLS—neural network algorithm based on the Discounted Least Squares  error function, EDLS (see (2.6);(iii)
NNCC—neural network algorithm based on the newly proposed error function 1, ECC (see (2.10);(iv)
NNTCC—neural network algorithm based on the newly proposed error function 2, ETCC (see (2.11).The layers are connected in the same structure as the FNN (Section2). A tan-sigmoid function was used as the transfer function between the input layer and the hidden layer, while the linear transformation function was employed between the hidden and the output layers.AlgorithmNNOLS differs from the standard FNN algorithm since it employs a new global optimization algorithm for training. Similarly, NNDLS also differs from the respective algorithm used in [24, 25] due to the same reason. In addition to the use of new training algorithm, NNCC and NNTCC are based on two different modified error functions. The only way to examine whether these new modified neural network algorithms perform better than the existing ones (in the literature) is to conduct numerical experiments.


## 3. Network Training and Evaluation

The Australian All Ordinary Index (AORD) was selected as the stock market index whose trading signals are to be predicted. The previous studies done by the authors [22] suggested that the lagged Close prices of the US S∖&P 500 Index (GSPC), the UK FTSE 100 Index (FTSE), French CAC 40 Index (FCHI), and German DAX Index (GDAXI) as well as that of the AORD itself showed an impact on the direction of the Close price of day t of the AORD. Also it was found that only the Close prices at lag 1 of these markets influence the Close price of the AORD [22, 23]. Therefore, this study considered the relative return of the Close prices at lag 1 of two combinations of stock market indices when forming input sets: (i) a combination which includes the GSPC, FTSE, FCHI, and the GDAXI; (ii) a combination which includes the AORD in addition to the markets included in (i).The input sets were formed with and without incorporating the quantified intermarket influence [22, 23, 30] (see Section 3.1). By quantifying intermarket influence, this study tries to identify the influential patterns between the potential influential markets and the AORD. Training the network algorithms with preidentified patterns may enhance their learning. Therefore, it can be expected that the using quantified intermarket influence for training algorithms produces more accurate output.The quantification of intermarket influence is described in Section3.1, while Section 3.2 presents the input sets used for network training.Daily relative returns of the Close prices of the selected stock market indices from 2nd July 1997 to 30th December 2005 were used for this study. If no trading took place on a particular day, the rate of change of price should be zero. Therefore, before calculating the relative returns, the missing values of the Close price were replaced by the corresponding Close price of the last trading day.The minimum and the maximum values of the data (relative returns) used for network training are-0.137 and 0.057, respectively. Therefore, we selected the value of δ (see Section 2.2) as 0.01. If the trading signals are correctly predicted,  0.01 is small enough to set the value of the proposed error functions (see (2.10) and (2.11) to  approximately zero.Since, influential patterns between markets are likely to vary with time [30], the whole study period was divided into a number of moving windows of a fixed length. Overlapping windows of length three trading years were considered (1 trading year ≡ 256 trading days) . A period of three trading years consists of enough data (768 daily relative returns) for neural network experiments. Also the chance that outdated data (which is not relevant for studying current behaviour of the market) being included in the training set is very low.The most recent 10% of data (the last 76 trading days) in each window were accounted for out of sample predictions, while the remaining 90% of data were allocated for network training. We called the part of the window which allocated for training thetraining window. Different number of neurons for the hidden layer was tested when training the networks with each input set.As described in Section2.1, the error function, EDLS (see (2.6), consists of a parameter b (discount rate) which decides the contribution from the historical data of the observations in the time series. Refenes et al. [27] fixed b=6 for their experiments. However, the discount rate may vary from one stock market index to another. Therefore, this study tested different values for b when training network NNDLS. Observing the results, the best value for b was selected, and this best value was used as b when training network NNTCC.


### 3.1. Quantification of Intermarket Influences

Past studies [31–33] confirmed that the most of the world's major stock markets are integrated. Hence, one integrated stock market can be considered as a part of a single global system. The influence from one integrated stock market on a dependent market includes the influence from one or more stock markets on the former.If there is a set of influential markets to a given dependent market, it is not straightforward to separate influence from individual influential markets. Instead of measuring the individual influence from one influential market to a dependent market, the relative strength of the influence from this influential market to the dependent market can be measured compared to the influence from the other influential markets. This study used the approach proposed in [22, 23] to quantify intermarket influences. This approach estimates the combined influence of a set of influential markets and also the contribution from each influential market to the combined influence.Quantification of intermarket influences on the AORD was carried out by finding the coefficients,ξi,  i=1,2,… (see Section 3.1.1), which maximise the median rank correlation between the relative return of the Close of day (t+1) of the AORD market and the sum of ξi multiplied by the relative returns of the Close prices of day t of a combination of influential markets over a number of small nonoverlapping windows of a fixed size. The two combinations of markets, which are previously mentioned this section, were considered. ξi measures the contribution from the ith influential market to the combined influence which is estimated by the optimal correlation.There is a possibility that the maximum value leads to a conclusion about a relationship which does not exist in reality. In contrast, the median is more conservative in this respect. Therefore, instead of selecting the maximum of the optimal rank correlation, the median was considered.Spearman’s rank correlation coefficient was used as the rank correlation measure. For two variablesX and Y, Spearman’s rank correlation coefficient, rs, can be defined as(3.1)rs=n(n2-1)-6∑di2-(Tx-Ty)/2(n(n2-1)-Tx)(n(n2-1)-TY),
where n is the total number of bivariate observations of x and y, di is the difference between the rank of x and the rank of y in the ith observation, and Tx and Ty are the number of tied observations of X and Y, respectively.The same six training windows employed for the network training were considered for the quantification of intermarket influence on the AORD. The correlation structure between stock markets also changes with time [31]. Therefore, each moving window was further divided into a number of small windows of length 22 days. 22 days of a stock market time series represent a trading month. Spearman's rank correlation coefficients (see (3.1) were calculated for these smaller windows within each moving window.The absolute value of the correlation coefficient was considered when finding the median optimal correlation. This is appropriate as the main concern is the strength rather than the direction of the correlation (i.e., either positively or negatively correlated).The objective function to be maximised (see Section3.1.1 given below) is defined by Spearman’s correlation coefficient, which uses ranks of data. Therefore, the objective function is discontinuous. Solving such a global optimization problem is extremely difficult because of the unavailability of gradients. We used the same global optimization algorithm, AGOP, which was used for training the proposed algorithms (see Section 2.3) to solve this optimization problem.


#### 3.1.1. Optimization Problem

LetY(t+1) be the relative return of the Close price of a selected dependent market at time t+1, and  let Xj(t) be the relative return of the Close price of the jth influential market at time t. Define Xξ(t) as(3.2)Xξ(t)=∑jξjXj(t),
where the coefficient ξj≥0, j=1,2,…,m measures the strength of influence from each influential market Xj, while m is the total number of influential markets.The aim is to find the optimal values of the coefficients,ξ=(ξ1,…,ξm), which maximise the rank correlation between Y(t+1) and Xξ(t) for a given window.The correlation can be calculated for a window of a given size. This window can be defined as(3.3)T(t0,l)={t0,t0+1,…,t0+(l-1)},
where t0 is the starting date of the window, and l is its size (in days). This study sets l=22 days.Spearman's correlation (see (3.1) between the variables Y(t+1), Xξ(t), t∈T(t0,l), defined on the window T(t0,l), will be denoted as(3.4)C(ξ)=Corr(Y(t+1),Xξ(t)∥T(t0,l)).
To define optimal values of the coefficients for a long time period, the following method is applied. Let [1,T]={1,2,…,T} be a given period (e.g., a large window). This period is divided into n windows of size l (we assume that  T=l×n, n>1 is an integer) as follows:(3.5)T(tk,l),k=1,2,3,…,n,
so that,(3.6)T(tk,l)∩T(tk',l)=ϕfor∀k≠k',⋃k=1nT(tk,l)=[1,T].
The correlation coefficient between Y(t+1) and Xξ(t) defined on the window T(tk,l) is denoted as
(3.7)Ck(ξ)=Corr(Y(t+1),Xξ(t)∥T(tk,l)),k=1,…,n.
To define an objective function over the period [1,T], the median of the vector, (C1(ξ),…,Cn(ξ)), is used. Therefore, the optimization problem can be defined as(3.8)Maximisef(ξ)=Median(C1(ξ),…,Cn(ξ)),s.t.∑jξj=1,ξj≥0,j=1,2,…,m.
The solution to (3.8) is a vector, ξ=(ξ1,…,ξm), where ξj,j=1,2,…,m denotes the strength of the influence from the jth influential market.In this paper, the quantity,ξjXj, is called the quantified relative return corresponding to the jth influential market.


### 3.2. Input Sets

The following six sets of inputs were used to train the modified network algorithms introduced in Section2.3.(1)
Four input features of the relative returns of the Close prices of dayt  of the market combination (i)  (i.e., GSPC(t), FTSE(t), FCHI(t), and GDAXI(t)—denoted by GFFG.(2)
Four input features of the quantified relative returns of the Close prices of dayt    of the market combination (i) (i.e., ξ1 GSPC(t), ξ2 FTSE(t), ξ3 FCHI(t), and ξ4 GDAXI(t)—denoted by GFFG-q.(3)
Single input feature consists of the sum of the quantified relative returns of the Close prices of dayt  of the market combination (i) (i.e., ξ1 GSPC(t) +ξ2 FTSE(t) +ξ3 FCHI(t) +ξ4 GDAXI(t)—denoted by GFFG-sq.(4)
Five input features of the relative returns of the Close prices of dayt  of the market combination (ii) (i.e., GSPC(t), FTSE(t), FCHI(t), GDAXI(t), and AORD(t)—denoted by GFFGA.(5)
Five input features of the quantified relative returns of the Close prices of dayt of the market combination (ii) (i.e., ξ1A GSPC(t), ξ2A FTSE(t), ξ3A FCHI(t), ξ4A GDAXI(t), and ξ5A AORD(t)—denoted by GFFGA-q.(6)
Single input feature consists of the sum of the quantified relative returns of the Close prices of dayt of the market combination (ii) (i.e., ξ1A GSPC(t) + ξ2A FTSE(t)+ξ3A FCHI(t)+ξ4A GDAXI(t)+ξ5A AORD(t)—denoted by GFFGA-sq.(ξ1, ξ2, ξ3, ξ4) and (ξ1A, ξ2A,ξ3A, ξ4A) are solutions to (3.8) corresponding to the market combinations (i) and (ii), previously mentioned in Section 3. These solutions relating to the market combinations (i) and (ii) are shown in the Tables 1 and 2, respectively. We note that ξi and ξiA,   i=1,2,3,4 are not necessarily be equal.Table 1
Optimal values of quantification coefficients (ξ) and the median optimal Spearman's correlations corresponding to market combination (i) for different training windows.
Training window no.Optimal values ofξOptimal median Spearman’s correlationGSPCFTSEFCHIGDAXI10.570.300.110.020.5782*20.610.180.080.130.5478*30.770.090.130.010.5680*40.790.060.150.000.5790*50.560.170.030.240.5904*60.660.060.080.200.5359** Significant at 5% levelTable 2
Optimal values of quantification coefficients (ξ) and the median optimal Spearman's correlations corresponding to market combination (ii) for different training windows.
Training window no.Optimal values ofξOptimal median Spearman’s correlationGSPCFTSEFCHIGDAXIAORD10.560.290.100.030.020.5805*20.580.110.120.170.020.5500*30.740.000.170.020.070.5697*40.790.070.140.000.000.5799*50.560.170.040.230.000.5904*60.660.040.090.200.010.5368** Significant at 5% level


### 3.3. Evaluation Measures

The networks proposed in Section2.3 output the (t+1)th day relative returns of the Close price of the AORD. Subsequently, the output was classified into trading signals according to Criterion A (see Section 1).The performance of the networks was evaluated by the overall classification rate (rCA) as well as by the overall misclassification rates (rE1 and rE2) which are defined as follows:(3.9)rCA=N0NT×100,
where N0 and NT are the number of test cases with correct predictions and the total number of cases in the test sample, respectively, as follows:(3.10)rE1=N1NT×100,rE2=N2NT×100,
where N1 is the number of test cases where a buy/sell signal is misclassified as a hold signals or vice versa. N2 is the test cases where a sell signal is classified as a buy signal and vice versa.From a trader's point of view, the misclassification of a hold signal as a buy or sell signal is a more serious mistake than misclassifying a buy signal or a sell signal as a hold signal. The reason is in the former case a trader will loses the money by taking part in an unwise investment while in the later case he/she only lose the opportunity of making a profit, but no monetary loss. The most serious monetary loss occurs when a buy signal is misclassified as a sell signal and viceversa. Because of the seriousness of the mistake,rE2 plays a more important role in performance evaluation than rE1.


## 3.1. Quantification of Intermarket Influences

Past studies [31–33] confirmed that the most of the world's major stock markets are integrated. Hence, one integrated stock market can be considered as a part of a single global system. The influence from one integrated stock market on a dependent market includes the influence from one or more stock markets on the former.If there is a set of influential markets to a given dependent market, it is not straightforward to separate influence from individual influential markets. Instead of measuring the individual influence from one influential market to a dependent market, the relative strength of the influence from this influential market to the dependent market can be measured compared to the influence from the other influential markets. This study used the approach proposed in [22, 23] to quantify intermarket influences. This approach estimates the combined influence of a set of influential markets and also the contribution from each influential market to the combined influence.Quantification of intermarket influences on the AORD was carried out by finding the coefficients,ξi,  i=1,2,… (see Section 3.1.1), which maximise the median rank correlation between the relative return of the Close of day (t+1) of the AORD market and the sum of ξi multiplied by the relative returns of the Close prices of day t of a combination of influential markets over a number of small nonoverlapping windows of a fixed size. The two combinations of markets, which are previously mentioned this section, were considered. ξi measures the contribution from the ith influential market to the combined influence which is estimated by the optimal correlation.There is a possibility that the maximum value leads to a conclusion about a relationship which does not exist in reality. In contrast, the median is more conservative in this respect. Therefore, instead of selecting the maximum of the optimal rank correlation, the median was considered.Spearman’s rank correlation coefficient was used as the rank correlation measure. For two variablesX and Y, Spearman’s rank correlation coefficient, rs, can be defined as(3.1)rs=n(n2-1)-6∑di2-(Tx-Ty)/2(n(n2-1)-Tx)(n(n2-1)-TY),
where n is the total number of bivariate observations of x and y, di is the difference between the rank of x and the rank of y in the ith observation, and Tx and Ty are the number of tied observations of X and Y, respectively.The same six training windows employed for the network training were considered for the quantification of intermarket influence on the AORD. The correlation structure between stock markets also changes with time [31]. Therefore, each moving window was further divided into a number of small windows of length 22 days. 22 days of a stock market time series represent a trading month. Spearman's rank correlation coefficients (see (3.1) were calculated for these smaller windows within each moving window.The absolute value of the correlation coefficient was considered when finding the median optimal correlation. This is appropriate as the main concern is the strength rather than the direction of the correlation (i.e., either positively or negatively correlated).The objective function to be maximised (see Section3.1.1 given below) is defined by Spearman’s correlation coefficient, which uses ranks of data. Therefore, the objective function is discontinuous. Solving such a global optimization problem is extremely difficult because of the unavailability of gradients. We used the same global optimization algorithm, AGOP, which was used for training the proposed algorithms (see Section 2.3) to solve this optimization problem.


### 3.1.1. Optimization Problem

LetY(t+1) be the relative return of the Close price of a selected dependent market at time t+1, and  let Xj(t) be the relative return of the Close price of the jth influential market at time t. Define Xξ(t) as(3.2)Xξ(t)=∑jξjXj(t),
where the coefficient ξj≥0, j=1,2,…,m measures the strength of influence from each influential market Xj, while m is the total number of influential markets.The aim is to find the optimal values of the coefficients,ξ=(ξ1,…,ξm), which maximise the rank correlation between Y(t+1) and Xξ(t) for a given window.The correlation can be calculated for a window of a given size. This window can be defined as(3.3)T(t0,l)={t0,t0+1,…,t0+(l-1)},
where t0 is the starting date of the window, and l is its size (in days). This study sets l=22 days.Spearman's correlation (see (3.1) between the variables Y(t+1), Xξ(t), t∈T(t0,l), defined on the window T(t0,l), will be denoted as(3.4)C(ξ)=Corr(Y(t+1),Xξ(t)∥T(t0,l)).
To define optimal values of the coefficients for a long time period, the following method is applied. Let [1,T]={1,2,…,T} be a given period (e.g., a large window). This period is divided into n windows of size l (we assume that  T=l×n, n>1 is an integer) as follows:(3.5)T(tk,l),k=1,2,3,…,n,
so that,(3.6)T(tk,l)∩T(tk',l)=ϕfor∀k≠k',⋃k=1nT(tk,l)=[1,T].
The correlation coefficient between Y(t+1) and Xξ(t) defined on the window T(tk,l) is denoted as
(3.7)Ck(ξ)=Corr(Y(t+1),Xξ(t)∥T(tk,l)),k=1,…,n.
To define an objective function over the period [1,T], the median of the vector, (C1(ξ),…,Cn(ξ)), is used. Therefore, the optimization problem can be defined as(3.8)Maximisef(ξ)=Median(C1(ξ),…,Cn(ξ)),s.t.∑jξj=1,ξj≥0,j=1,2,…,m.
The solution to (3.8) is a vector, ξ=(ξ1,…,ξm), where ξj,j=1,2,…,m denotes the strength of the influence from the jth influential market.In this paper, the quantity,ξjXj, is called the quantified relative return corresponding to the jth influential market.


## 3.1.1. Optimization Problem

LetY(t+1) be the relative return of the Close price of a selected dependent market at time t+1, and  let Xj(t) be the relative return of the Close price of the jth influential market at time t. Define Xξ(t) as(3.2)Xξ(t)=∑jξjXj(t),
where the coefficient ξj≥0, j=1,2,…,m measures the strength of influence from each influential market Xj, while m is the total number of influential markets.The aim is to find the optimal values of the coefficients,ξ=(ξ1,…,ξm), which maximise the rank correlation between Y(t+1) and Xξ(t) for a given window.The correlation can be calculated for a window of a given size. This window can be defined as(3.3)T(t0,l)={t0,t0+1,…,t0+(l-1)},
where t0 is the starting date of the window, and l is its size (in days). This study sets l=22 days.Spearman's correlation (see (3.1) between the variables Y(t+1), Xξ(t), t∈T(t0,l), defined on the window T(t0,l), will be denoted as(3.4)C(ξ)=Corr(Y(t+1),Xξ(t)∥T(t0,l)).
To define optimal values of the coefficients for a long time period, the following method is applied. Let [1,T]={1,2,…,T} be a given period (e.g., a large window). This period is divided into n windows of size l (we assume that  T=l×n, n>1 is an integer) as follows:(3.5)T(tk,l),k=1,2,3,…,n,
so that,(3.6)T(tk,l)∩T(tk',l)=ϕfor∀k≠k',⋃k=1nT(tk,l)=[1,T].
The correlation coefficient between Y(t+1) and Xξ(t) defined on the window T(tk,l) is denoted as
(3.7)Ck(ξ)=Corr(Y(t+1),Xξ(t)∥T(tk,l)),k=1,…,n.
To define an objective function over the period [1,T], the median of the vector, (C1(ξ),…,Cn(ξ)), is used. Therefore, the optimization problem can be defined as(3.8)Maximisef(ξ)=Median(C1(ξ),…,Cn(ξ)),s.t.∑jξj=1,ξj≥0,j=1,2,…,m.
The solution to (3.8) is a vector, ξ=(ξ1,…,ξm), where ξj,j=1,2,…,m denotes the strength of the influence from the jth influential market.In this paper, the quantity,ξjXj, is called the quantified relative return corresponding to the jth influential market.


## 3.2. Input Sets

The following six sets of inputs were used to train the modified network algorithms introduced in Section2.3.(1)
Four input features of the relative returns of the Close prices of dayt  of the market combination (i)  (i.e., GSPC(t), FTSE(t), FCHI(t), and GDAXI(t)—denoted by GFFG.(2)
Four input features of the quantified relative returns of the Close prices of dayt    of the market combination (i) (i.e., ξ1 GSPC(t), ξ2 FTSE(t), ξ3 FCHI(t), and ξ4 GDAXI(t)—denoted by GFFG-q.(3)
Single input feature consists of the sum of the quantified relative returns of the Close prices of dayt  of the market combination (i) (i.e., ξ1 GSPC(t) +ξ2 FTSE(t) +ξ3 FCHI(t) +ξ4 GDAXI(t)—denoted by GFFG-sq.(4)
Five input features of the relative returns of the Close prices of dayt  of the market combination (ii) (i.e., GSPC(t), FTSE(t), FCHI(t), GDAXI(t), and AORD(t)—denoted by GFFGA.(5)
Five input features of the quantified relative returns of the Close prices of dayt of the market combination (ii) (i.e., ξ1A GSPC(t), ξ2A FTSE(t), ξ3A FCHI(t), ξ4A GDAXI(t), and ξ5A AORD(t)—denoted by GFFGA-q.(6)
Single input feature consists of the sum of the quantified relative returns of the Close prices of dayt of the market combination (ii) (i.e., ξ1A GSPC(t) + ξ2A FTSE(t)+ξ3A FCHI(t)+ξ4A GDAXI(t)+ξ5A AORD(t)—denoted by GFFGA-sq.(ξ1, ξ2, ξ3, ξ4) and (ξ1A, ξ2A,ξ3A, ξ4A) are solutions to (3.8) corresponding to the market combinations (i) and (ii), previously mentioned in Section 3. These solutions relating to the market combinations (i) and (ii) are shown in the Tables 1 and 2, respectively. We note that ξi and ξiA,   i=1,2,3,4 are not necessarily be equal.Table 1
Optimal values of quantification coefficients (ξ) and the median optimal Spearman's correlations corresponding to market combination (i) for different training windows.
Training window no.Optimal values ofξOptimal median Spearman’s correlationGSPCFTSEFCHIGDAXI10.570.300.110.020.5782*20.610.180.080.130.5478*30.770.090.130.010.5680*40.790.060.150.000.5790*50.560.170.030.240.5904*60.660.060.080.200.5359** Significant at 5% levelTable 2
Optimal values of quantification coefficients (ξ) and the median optimal Spearman's correlations corresponding to market combination (ii) for different training windows.
Training window no.Optimal values ofξOptimal median Spearman’s correlationGSPCFTSEFCHIGDAXIAORD10.560.290.100.030.020.5805*20.580.110.120.170.020.5500*30.740.000.170.020.070.5697*40.790.070.140.000.000.5799*50.560.170.040.230.000.5904*60.660.040.090.200.010.5368** Significant at 5% level


## 3.3. Evaluation Measures

The networks proposed in Section2.3 output the (t+1)th day relative returns of the Close price of the AORD. Subsequently, the output was classified into trading signals according to Criterion A (see Section 1).The performance of the networks was evaluated by the overall classification rate (rCA) as well as by the overall misclassification rates (rE1 and rE2) which are defined as follows:(3.9)rCA=N0NT×100,
where N0 and NT are the number of test cases with correct predictions and the total number of cases in the test sample, respectively, as follows:(3.10)rE1=N1NT×100,rE2=N2NT×100,
where N1 is the number of test cases where a buy/sell signal is misclassified as a hold signals or vice versa. N2 is the test cases where a sell signal is classified as a buy signal and vice versa.From a trader's point of view, the misclassification of a hold signal as a buy or sell signal is a more serious mistake than misclassifying a buy signal or a sell signal as a hold signal. The reason is in the former case a trader will loses the money by taking part in an unwise investment while in the later case he/she only lose the opportunity of making a profit, but no monetary loss. The most serious monetary loss occurs when a buy signal is misclassified as a sell signal and viceversa. Because of the seriousness of the mistake,rE2 plays a more important role in performance evaluation than rE1.


## 4. Results Obtained from Network Training

As mentioned in Section3, different values for the discount rate, b, were tested. b=1,2,…,12 was considered when training NNDLS. The prediction results improved with the value of b up to 5. For b>5 the prediction results remained unchanged. Therefore, the value of b was fixed at 5. As previously mentioned (see Section 3), b=5 was used as the discount rate also in NNTCC algorithm.We trained the four neural network algorithms by varying the structure of the network; that is by changing the number of hidden layers as well as the number of neurons per hidden layer. The best four prediction results corresponding to the four  networks were obtained when the number of hidden layers equal to one is and, the number of neurons per hidden layer is equal to two (results are shown in Tables12,  13, 14, 15).  Therefore, only the results relevant to networks with two hidden neurons are presented in this section. Table 3 to Table 6 present the results relating to neural networks, NNOLS, NNDLS, NNCC, and NNTCC, respectively.Table 3
Results obtained from training neural network,NNOLS.  The best prediction results are shown in bold colour.
Input setAveragerCAAveragerE2AveragerE1GFFG64.250.0035.75GFFGA64.250.0035.75GFFG-q64.690.0035.31GFFGA-q64.040.0035.96GFFG-sq63.820.0036.18GFFGA-sq63.600.0036.40The best prediction results fromNNOLS were obtained when the input set GFFG-q (see Section 3.2) was used as the input features (see Table 3). This input set consists of four inputs of the quantified relative returns of the Close price of day t of the GSPC and the three European stock indices.NNDLS yielded nonzero values for the more serious classification error, rE2, when the multiple inputs (either quantified or not) were used as the input features (see Table 4). The best results were obtained when the networks were trained with the single input representing the sum of the quantified relative returns of the Close prices of day t of the GSPC, the European market indices, and the AORD (input set GFFGA-sq; see Section 3.2). When the networks were trained with the single inputs (input sets GFFG-sq and GFFGA-sq; see Section 3.2) the serious misclassifications were prevented.Table 4
Results obtained from training neural network,NNDLS. The best prediction results are shown in bold colour.
Input setAveragerCAAveragerE2AveragerE1GFFG64.250.4435.31GFFGA64.040.4435.53GFFG-q64.470.2235.31GFFGA-q64.250.2235.53GFFG-sq63.820.0036.18GFFGA-sq64.040.0035.96The overall prediction results obtained from theNNOLS seem to be better than those relating to NNDLS,  (see Tables 3 and 4).Compared to the predictions obtained fromNNDLS, those relating to NNCC are better (see Tables 4 and 5). In this case the best prediction results were obtained when the relative returns of day t of the GSPC and the three European stock market indices (input set GFFG) were used as the input features (see Table 5). The classification rate was increased by 1.02% compared to that of the best prediction results produced by NNOLS (see Tables 3 and 5).Table 5
Results obtained from training neural network,NNCC.  The best prediction results are shown in bold colour.
Input setAveragerCAAveragerE2AveragerE1GFFG65.350.0034.65GFFGA64.040.2235.75GFFG-q63.820.0036.18GFFGA-q64.040.0035.96GFFG-sq64.250.0035.75GFFGA-sq63.820.0036.18Table 6
Results obtained from training neural network,NNTCC.  The best prediction results are shown in bold colour.
Input setAveragerCAAveragerE2AveragerE1GFFG66.670.4432.89GFFGA64.910.2234.87GFFG-q66.230.0033.37GFFGA-q63.820.2235.96GFFG-sq64.250.4435.31GFFGA-sq64.690.2235.09Table6 shows that NNTCC also produced serious misclassifications. However, these networks produced high overall classification accuracy and also prevented serious misclassifications when the quantified relative returns of the Close prices of day t of the GSPC and the European stock market indices (input set GFFG-q) were used as the input features. The accuracy was the best among all four types of neural network algorithms considered in this study.NNTCC provided 1.34% increase in the overall classification rate compared to NNCC. When compared with the NNOLS, NNTCC showed a 2.37% increase in the overall classification rate, and this can be considered as a good improvement in predicting trading signals.


### 4.1. Comparison of the Performance of Modified Algorithms with that of the Standard FNN Algorithm

Table7 presents the average (over six windows) classification rates, and misclassification rates related to prediction results obtained by training the standard FNN algorithm which consists of one hidden layer with two neurons. In order to compare the prediction results with those of the modified neural network algorithms, the number of hidden layers was fixed as one, while the number of hidden neurons were fixed as two. These FNNs was trained for the same six windows (see Section 3) with the same six input sets (see Section 3.2). The transfer functions employed are same as those of the modified neural network algorithms (see Section 2.3).Table 7
Results obtained from training standard FNN algorithms.  The best prediction results are shown in bold colour.
Input setAveragerCAAveragerE2AveragerE1GFFG62.060.2237.72GFFGA62.060.2237.72GFFG-q62.720.0037.28GFFGA-q62.720.0037.28GFFG-sq62.280.0037.72GFFGA-sq62.500.0037.50When the overall classification and overall misclassification rates given in Table7 are compared with the respective rates (see Tables 3 to 6) corresponding to the modified neural network algorithms, it is clear that the standard FNN algorithm shows poorer performance than those of all four modified neural network algorithms. Therefore, it can be suggested that all modified neural network algorithms perform better when predicting the trading signals of the AORD.


### 4.2. Comparison of the Performance of the Modified Algorithms

The best predictions obtained by each algorithm were compared by using classification and misclassification rates. The classification rate indicates the proportion of correctly classified signals to a particular class out of the total number of actual signals in that class whereas, the misclassification rate indicates the proportion of incorrectly classified signals from a particular class to another class out of the total number of actual signals in the former class.


#### 4.2.1. Prediction Accuracy

The average (over six windows) classification and misclassification rates related to the best prediction results obtained fromNNOLS, NNDLS, NNCC, and NNTCC are shown in Tables 8 to 11, respectively.Table 8
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNOLS (trained with input set GFFG-q; refer Table 3).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy23.46%(76.54%)(0.00%)Hold(5.00%)88.74%(6.27%)Sell(0.00%)(79.79%)20.21%Table 9
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNDLS (trained with input set  GFFGA-sq; refer Table 4).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy22.10%(77.90%)(0.00%)Hold(4.97%)89.20%(5.83%)Sell(0.00%)(83.06%)16.94%Among the best networks corresponding to the four algorithms considered, the best network of the algorithm based on the proposed error function 2 (see (2.11) showed the best classification accuracies relating to buy and sell signals (27% and 25%, resp.; see Tables 8 to 11). Also this network classified more than 89% of the hold signals accurately and it is the second best rate for the hold signal. The rate of misclassification from hold signals to buy is the lowest when this network was used for prediction. The rate of misclassification from hold class to sell class is also comparatively low (6.22%, which is the second lowest among the four best predictions).The network corresponding to the algorithm based on the proposed error function 1 (see (2.10) produced the second best prediction results. This network accounted for the second best prediction accuracies relating to buy and sell signals while it produced the best predictions relating to hold signals (Table 10).Table 10
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNCC  (trained with input set GFFG; refer Table 5).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy23.94%(76.06%)(0.00%)Hold(5.00%)89.59%(6.66%)Sell(0.00%)(77.71%)22.29%Table 11
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNTCC (trained with input set GFFG-q; refer Table 6).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy27.00%(73.00%)(0.00%)Hold(4.56%)89.22%(6.22%)Sell(0.00%)(75.49%)24.51%Table 12
Results obtained from training neural network,NNOLS,  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE2GFFG164.250.0035.75264.250.0035.75364.250.0035.75464.250.2235.53564.250.0035.75664.250.0035.75GFFGA164.250.0035.75264.250.0035.75364.040.0035.96464.250.0035.75564.250.0035.75664.250.0035.75GFFG-q164.470.0035.53264.690.0035.31364.470.0035.53464.040.0035.96564.690.0035.31664.250.0035.75GFFGA-q164.250.0035.75264.040.0035.96363.600.2236.18464.040.0035.96564.250.0035.75663.820.0036.18GFFG-sq163.820.0036.18263.820.0036.18363.820.0036.18463.820.0036.18563.820.0036.18663.820.0036.18GFFGA-sq163.600.0036.40263.600.0036.40363.600.0036.40463.600.0036.40563.600.0036.40663.600.0036.40Table 13
Results obtained from training neural network,NNDLS  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE1GFFG164.470.4435.09264.250.4435.71364.030.4435.53464.250.4435.31564.250.4435.31664.250.4435.31GFFGA164.030.4435.53264.030.4435.53364.030.4435.53464.030.4435.53564.030.4435.53664.030.4435.53GFFG-q164.470.2235.31264.470.2235.31364.690.2235.09464.470.2235.31564.250.2235.53664.470.2235.31GFFGA-q164.690.2235.09264.250.2235.53363.820.2235.96464.250.4435.31564.470.4435.09664.250.2235.53GFFG-sq163.820.0036.18263.820.0036.18363.820.0036.18463.820.0036.18563.820.0036.18663.820.0036.18GFFGA-sq164.040.0035.96264.040.0035.96364.040.0035.96464.040.0035.96564.040.0035.96664.040.0035.96Table 14
Results obtained from training neural network,NNCC  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE1GFFG162.720.6636.62265.350.0034.65363.600.0036.40463.380.2236.40564.250.0035.75664.690.0035.31GFFGA164.040.0035.96264.030.2235.75363.160.0036.84464.040.0035.96564.030.4435.53664.040.0035.96GFFG-q163.380.0036.62263.820.0036.18363.600.0036.40464.910.2234.87564.030.2235.75664.690.0035.31GFFGA-q165.350.2234.43264.040.0035.96364.040.0035.96463.380.0036.62565.130.0034.87663.820.0036.18GFFG-sq164.250.0035.75264.250.0035.75364.040.0035.96464.040.0035.96564.250.0035.75664.040.0035.96GFFGA-sq163.820.0036.18263.820.0036.18363.820.0036.18463.820.0036.18563.820.0036.18663.820.0036.18Table 15
Results obtained from training neural network,NNTCC  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE1GFFG165.570.4433.99266.670.4432.89364.470.4435.09465.570.2234.21565.130.2234.65664.910.2234.87GFFGA164.690.2235.09264.910.2234.87365.130.0034.87465.130.2234.35564.130.2234.65665.570.2234.21GFFG-q164.910.2234.87266.230.0033.77365.570.0034.43465.790.2233.99565.130.2234.65666.230.2233.55GFFGA-q165.570.2234.21263.820.2235.96364.910.0035.09463.820.2235.96564.690.2235.09664.470.0035.53GFFG-sq165.130.4434.43264.250.4435.31364.910.4434.65464.470.4435.09564.690.4434.87664.690.4434.87GFFGA-sq164.690.2235.09264.690.2235.09364.690.2235.09464.910.2234.87564.910.2234.87664.690.2235.09


### 4.3. Comparisons of Results with Other Similar Studies

Most of the studies [8, 9, 11, 13, 22], which used FNN algorithms for predictions, are aimed at predicting the direction (up or down) of a stock market index. Only a few studies [14, 17], which used the AORD as the target market index, predicted whether to buy, hold or sell stocks. These studies employed the standard FNN algorithm (that is with OLS error function) for prediction. However, the comparison of results obtained from this study with the above mentioned two studies is impossible as they are not in the same form.


## 4.1. Comparison of the Performance of Modified Algorithms with that of the Standard FNN Algorithm

Table7 presents the average (over six windows) classification rates, and misclassification rates related to prediction results obtained by training the standard FNN algorithm which consists of one hidden layer with two neurons. In order to compare the prediction results with those of the modified neural network algorithms, the number of hidden layers was fixed as one, while the number of hidden neurons were fixed as two. These FNNs was trained for the same six windows (see Section 3) with the same six input sets (see Section 3.2). The transfer functions employed are same as those of the modified neural network algorithms (see Section 2.3).Table 7
Results obtained from training standard FNN algorithms.  The best prediction results are shown in bold colour.
Input setAveragerCAAveragerE2AveragerE1GFFG62.060.2237.72GFFGA62.060.2237.72GFFG-q62.720.0037.28GFFGA-q62.720.0037.28GFFG-sq62.280.0037.72GFFGA-sq62.500.0037.50When the overall classification and overall misclassification rates given in Table7 are compared with the respective rates (see Tables 3 to 6) corresponding to the modified neural network algorithms, it is clear that the standard FNN algorithm shows poorer performance than those of all four modified neural network algorithms. Therefore, it can be suggested that all modified neural network algorithms perform better when predicting the trading signals of the AORD.


## 4.2. Comparison of the Performance of the Modified Algorithms

The best predictions obtained by each algorithm were compared by using classification and misclassification rates. The classification rate indicates the proportion of correctly classified signals to a particular class out of the total number of actual signals in that class whereas, the misclassification rate indicates the proportion of incorrectly classified signals from a particular class to another class out of the total number of actual signals in the former class.


### 4.2.1. Prediction Accuracy

The average (over six windows) classification and misclassification rates related to the best prediction results obtained fromNNOLS, NNDLS, NNCC, and NNTCC are shown in Tables 8 to 11, respectively.Table 8
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNOLS (trained with input set GFFG-q; refer Table 3).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy23.46%(76.54%)(0.00%)Hold(5.00%)88.74%(6.27%)Sell(0.00%)(79.79%)20.21%Table 9
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNDLS (trained with input set  GFFGA-sq; refer Table 4).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy22.10%(77.90%)(0.00%)Hold(4.97%)89.20%(5.83%)Sell(0.00%)(83.06%)16.94%Among the best networks corresponding to the four algorithms considered, the best network of the algorithm based on the proposed error function 2 (see (2.11) showed the best classification accuracies relating to buy and sell signals (27% and 25%, resp.; see Tables 8 to 11). Also this network classified more than 89% of the hold signals accurately and it is the second best rate for the hold signal. The rate of misclassification from hold signals to buy is the lowest when this network was used for prediction. The rate of misclassification from hold class to sell class is also comparatively low (6.22%, which is the second lowest among the four best predictions).The network corresponding to the algorithm based on the proposed error function 1 (see (2.10) produced the second best prediction results. This network accounted for the second best prediction accuracies relating to buy and sell signals while it produced the best predictions relating to hold signals (Table 10).Table 10
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNCC  (trained with input set GFFG; refer Table 5).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy23.94%(76.06%)(0.00%)Hold(5.00%)89.59%(6.66%)Sell(0.00%)(77.71%)22.29%Table 11
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNTCC (trained with input set GFFG-q; refer Table 6).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy27.00%(73.00%)(0.00%)Hold(4.56%)89.22%(6.22%)Sell(0.00%)(75.49%)24.51%Table 12
Results obtained from training neural network,NNOLS,  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE2GFFG164.250.0035.75264.250.0035.75364.250.0035.75464.250.2235.53564.250.0035.75664.250.0035.75GFFGA164.250.0035.75264.250.0035.75364.040.0035.96464.250.0035.75564.250.0035.75664.250.0035.75GFFG-q164.470.0035.53264.690.0035.31364.470.0035.53464.040.0035.96564.690.0035.31664.250.0035.75GFFGA-q164.250.0035.75264.040.0035.96363.600.2236.18464.040.0035.96564.250.0035.75663.820.0036.18GFFG-sq163.820.0036.18263.820.0036.18363.820.0036.18463.820.0036.18563.820.0036.18663.820.0036.18GFFGA-sq163.600.0036.40263.600.0036.40363.600.0036.40463.600.0036.40563.600.0036.40663.600.0036.40Table 13
Results obtained from training neural network,NNDLS  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE1GFFG164.470.4435.09264.250.4435.71364.030.4435.53464.250.4435.31564.250.4435.31664.250.4435.31GFFGA164.030.4435.53264.030.4435.53364.030.4435.53464.030.4435.53564.030.4435.53664.030.4435.53GFFG-q164.470.2235.31264.470.2235.31364.690.2235.09464.470.2235.31564.250.2235.53664.470.2235.31GFFGA-q164.690.2235.09264.250.2235.53363.820.2235.96464.250.4435.31564.470.4435.09664.250.2235.53GFFG-sq163.820.0036.18263.820.0036.18363.820.0036.18463.820.0036.18563.820.0036.18663.820.0036.18GFFGA-sq164.040.0035.96264.040.0035.96364.040.0035.96464.040.0035.96564.040.0035.96664.040.0035.96Table 14
Results obtained from training neural network,NNCC  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE1GFFG162.720.6636.62265.350.0034.65363.600.0036.40463.380.2236.40564.250.0035.75664.690.0035.31GFFGA164.040.0035.96264.030.2235.75363.160.0036.84464.040.0035.96564.030.4435.53664.040.0035.96GFFG-q163.380.0036.62263.820.0036.18363.600.0036.40464.910.2234.87564.030.2235.75664.690.0035.31GFFGA-q165.350.2234.43264.040.0035.96364.040.0035.96463.380.0036.62565.130.0034.87663.820.0036.18GFFG-sq164.250.0035.75264.250.0035.75364.040.0035.96464.040.0035.96564.250.0035.75664.040.0035.96GFFGA-sq163.820.0036.18263.820.0036.18363.820.0036.18463.820.0036.18563.820.0036.18663.820.0036.18Table 15
Results obtained from training neural network,NNTCC  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE1GFFG165.570.4433.99266.670.4432.89364.470.4435.09465.570.2234.21565.130.2234.65664.910.2234.87GFFGA164.690.2235.09264.910.2234.87365.130.0034.87465.130.2234.35564.130.2234.65665.570.2234.21GFFG-q164.910.2234.87266.230.0033.77365.570.0034.43465.790.2233.99565.130.2234.65666.230.2233.55GFFGA-q165.570.2234.21263.820.2235.96364.910.0035.09463.820.2235.96564.690.2235.09664.470.0035.53GFFG-sq165.130.4434.43264.250.4435.31364.910.4434.65464.470.4435.09564.690.4434.87664.690.4434.87GFFGA-sq164.690.2235.09264.690.2235.09364.690.2235.09464.910.2234.87564.910.2234.87664.690.2235.09


## 4.2.1. Prediction Accuracy

The average (over six windows) classification and misclassification rates related to the best prediction results obtained fromNNOLS, NNDLS, NNCC, and NNTCC are shown in Tables 8 to 11, respectively.Table 8
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNOLS (trained with input set GFFG-q; refer Table 3).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy23.46%(76.54%)(0.00%)Hold(5.00%)88.74%(6.27%)Sell(0.00%)(79.79%)20.21%Table 9
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNDLS (trained with input set  GFFGA-sq; refer Table 4).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy22.10%(77.90%)(0.00%)Hold(4.97%)89.20%(5.83%)Sell(0.00%)(83.06%)16.94%Among the best networks corresponding to the four algorithms considered, the best network of the algorithm based on the proposed error function 2 (see (2.11) showed the best classification accuracies relating to buy and sell signals (27% and 25%, resp.; see Tables 8 to 11). Also this network classified more than 89% of the hold signals accurately and it is the second best rate for the hold signal. The rate of misclassification from hold signals to buy is the lowest when this network was used for prediction. The rate of misclassification from hold class to sell class is also comparatively low (6.22%, which is the second lowest among the four best predictions).The network corresponding to the algorithm based on the proposed error function 1 (see (2.10) produced the second best prediction results. This network accounted for the second best prediction accuracies relating to buy and sell signals while it produced the best predictions relating to hold signals (Table 10).Table 10
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNCC  (trained with input set GFFG; refer Table 5).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy23.94%(76.06%)(0.00%)Hold(5.00%)89.59%(6.66%)Sell(0.00%)(77.71%)22.29%Table 11
Average (over six windows) classification and misclassification rates of the best prediction results corresponding toNNTCC (trained with input set GFFG-q; refer Table 6).
Actual classAverage classification (misclassification) ratesPredicted classBuyHoldSellBuy27.00%(73.00%)(0.00%)Hold(4.56%)89.22%(6.22%)Sell(0.00%)(75.49%)24.51%Table 12
Results obtained from training neural network,NNOLS,  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE2GFFG164.250.0035.75264.250.0035.75364.250.0035.75464.250.2235.53564.250.0035.75664.250.0035.75GFFGA164.250.0035.75264.250.0035.75364.040.0035.96464.250.0035.75564.250.0035.75664.250.0035.75GFFG-q164.470.0035.53264.690.0035.31364.470.0035.53464.040.0035.96564.690.0035.31664.250.0035.75GFFGA-q164.250.0035.75264.040.0035.96363.600.2236.18464.040.0035.96564.250.0035.75663.820.0036.18GFFG-sq163.820.0036.18263.820.0036.18363.820.0036.18463.820.0036.18563.820.0036.18663.820.0036.18GFFGA-sq163.600.0036.40263.600.0036.40363.600.0036.40463.600.0036.40563.600.0036.40663.600.0036.40Table 13
Results obtained from training neural network,NNDLS  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE1GFFG164.470.4435.09264.250.4435.71364.030.4435.53464.250.4435.31564.250.4435.31664.250.4435.31GFFGA164.030.4435.53264.030.4435.53364.030.4435.53464.030.4435.53564.030.4435.53664.030.4435.53GFFG-q164.470.2235.31264.470.2235.31364.690.2235.09464.470.2235.31564.250.2235.53664.470.2235.31GFFGA-q164.690.2235.09264.250.2235.53363.820.2235.96464.250.4435.31564.470.4435.09664.250.2235.53GFFG-sq163.820.0036.18263.820.0036.18363.820.0036.18463.820.0036.18563.820.0036.18663.820.0036.18GFFGA-sq164.040.0035.96264.040.0035.96364.040.0035.96464.040.0035.96564.040.0035.96664.040.0035.96Table 14
Results obtained from training neural network,NNCC  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE1GFFG162.720.6636.62265.350.0034.65363.600.0036.40463.380.2236.40564.250.0035.75664.690.0035.31GFFGA164.040.0035.96264.030.2235.75363.160.0036.84464.040.0035.96564.030.4435.53664.040.0035.96GFFG-q163.380.0036.62263.820.0036.18363.600.0036.40464.910.2234.87564.030.2235.75664.690.0035.31GFFGA-q165.350.2234.43264.040.0035.96364.040.0035.96463.380.0036.62565.130.0034.87663.820.0036.18GFFG-sq164.250.0035.75264.250.0035.75364.040.0035.96464.040.0035.96564.250.0035.75664.040.0035.96GFFGA-sq163.820.0036.18263.820.0036.18363.820.0036.18463.820.0036.18563.820.0036.18663.820.0036.18Table 15
Results obtained from training neural network,NNTCC  with different number of hidden neurons.
Input setNo. of hidden neuronsAveragerCAAveragerE2AveragerE1GFFG165.570.4433.99266.670.4432.89364.470.4435.09465.570.2234.21565.130.2234.65664.910.2234.87GFFGA164.690.2235.09264.910.2234.87365.130.0034.87465.130.2234.35564.130.2234.65665.570.2234.21GFFG-q164.910.2234.87266.230.0033.77365.570.0034.43465.790.2233.99565.130.2234.65666.230.2233.55GFFGA-q165.570.2234.21263.820.2235.96364.910.0035.09463.820.2235.96564.690.2235.09664.470.0035.53GFFG-sq165.130.4434.43264.250.4435.31364.910.4434.65464.470.4435.09564.690.4434.87664.690.4434.87GFFGA-sq164.690.2235.09264.690.2235.09364.690.2235.09464.910.2234.87564.910.2234.87664.690.2235.09


## 4.3. Comparisons of Results with Other Similar Studies

Most of the studies [8, 9, 11, 13, 22], which used FNN algorithms for predictions, are aimed at predicting the direction (up or down) of a stock market index. Only a few studies [14, 17], which used the AORD as the target market index, predicted whether to buy, hold or sell stocks. These studies employed the standard FNN algorithm (that is with OLS error function) for prediction. However, the comparison of results obtained from this study with the above mentioned two studies is impossible as they are not in the same form.


## 5. Conclusions

The results obtained from the experiments show that the modified neural network algorithms introduced by this study perform better than the standard FNN algorithm in predicting the trading signals of the AORD. Furthermore, the neural network algorithms, based on the modified OLS error functions introduced by this study (see (2.10) and (2.11), produced better predictions of trading signals of the AORD. Of these two algorithms, the one-based on (2.11) showed the better performance. This algorithm produced the best predictions when the network consisted of one hidden layer with two neurons. The quantified relative returns of the Close prices of the GSPC and the three European stock market indices were used as the input features. This network prevented serious misclassifications such as misclassification of buy signals to sell signals and viceversa and also predicted trading signals with a higher degree of accuracy.Also it can be suggested that the quantified intermarket influence on the AORD can be effectively used to predict its trading signals.The algorithms proposed in this paper can also be used to predict whether it is best to buy, hold, or sell shares of any company listed under a given sector of the Australian Stock Exchange. For this case, the potential influential variables will be the share price indices of the companies listed under the stock of interest.Furthermore, the approach proposed by this study can be applied to predict trading signals of any other global stock market index. Such a research direction would be very interesting especially in a period of economic recession, as the stock indices of the world’s major economies are strongly correlated during such periods.Another useful research direction can be found in the area of marketing research. That is the modification of the proposed prediction approach to predict whether market share of a certain product goes up or not. In this case market shares of the competitive brands could be considered as the influential variables.



---

*Source: 125308-2009-06-17.xml*