Abstract
Predicting future price of gold has always been an intriguing field of investigation for researchers as well as investors who desire to invest in present and gain profit in the future. Since ancient time, ibidem is being arbitrated as a leading asset in monetary business. As the worth of gold changes within confined boundaries, reducing the effect of inflation, so it is a beneficial property favoured by many stakeholders. Hence, there is always an urge of a more authenticate model for forecasting the gold price based upon the changes in it in a previous time frame. This study focuses on designing an efficient predictor model using a Pi-Sigma Neural Network (PSNN) for forecasting future gold. The underlying motivation of using PSNN is its quick learning and easy implementation compared to other neural networks. The fixed unit weights used in between hidden and output layer of PSNN helps it in achieving faster learning speed compared to other similar types of networks. But estimating the unknown weights used in between the input and hidden layer is still a major challenge in its design phase. As final outcome of the network is highly influenced by its weight, so a novel Crow Search based nature inspired optimization algorithm (CSA) is proposed to estimate these adjustable weights of the network. The proposed model is also compared with Particle Swarm Optimization (PSO) and Differential Evolution (DE) based learning of PSNN. The model is validated over two historical datasets such as Gold/INR and Gold/AED by considering three statistical errors such as Mean Square Error (MSE), Root Mean Square Error (RMSE) and Mean Absolute Error (MAE). Empirical observations clearly show that, the developed CSA-PSNN predictor model is providing better prediction results compared to PSO-PSNN and DE-PSNN model.
Keywords
Introduction
Since ancient day, ibidem is always considered as a treasured metal and a major asset in economic and monetary market. It is treated as a valuable product for investment preferred by many stockholders, due to its variation in prices within confined ranges, reducing the effect of inflation. Therefore it is crucial for investors and decision makers, who desire to maximize their profit from investment in gold with the aim of protection from inflation, risks, crisis, and price fluctuations to foretell the price of gold more accurately. Several models including the pure time series based, artificial intelligence based or hybridization of them are proposed by different researchers for prediction of gold price. But still, there is always a need of developing a more accurate model.
Artificial neural networks (ANN), that are designed based on the learning behavior of human brain, has been appeared as one of the convincing forecaster compared to conventional models in prediction of gold price time series data [1, 2, 3]. A type-2 neuro fuzzy model suggested for modelling and forecasting of future gold price using has shown better attainment than an ARIMA model in [4]. An ELM based feed forward network proposed in [5] is providing improved prediction accuracy in gold price prediction compared to BPNN, ELMAN, RBFN and recurrent network. In last decagon, high order NNs are gathering leading accent in several domains such as pattern recognition, classification, forecasting and soon [6, 7, 8]. This study has explained how a PSNN can be suitably designed using the historical gold prices to foretell its one day ahead price. PSNN is a simple NN, having linear summation units in the second layer and a product unit in the third layer. The fixed unit weights used in between hidden and output layer helps in achieving faster learning speed by the NN compared to other similar types of MLPs. But estimating the unknown weights used in between the input and hidden layer is still a major challenge in its design phase. As a solution to this problem, few research has been done by applying a small number of optimization algorithms such as PSO, DE, Fire fly, Genetic algorithm (GA) and soon [9, 10, 11]. Still many more algorithms are not yet explored. This study focuses on the application of a crow search algorithm (CSA) for identifying the adjustable weights of PSNN. Working of CSA mimics the communal intellect of crow flock used in their food assembling process. CSA has also appeared as a suitable alternative to other conventional nature based algorithms, such as PSO, DE, GA and harmony search (HS) in other application domain [12, 13, 14, 15, 16, 17]. In this study for the first time, it is used as a learning technique for PSNN in application to gold price prediction. PSO and DE are two popular meta heuristic algorithms, which have been successfully applied for weight estimation of neural network based predictor models [18, 19]. Hence the ability of PSNN is also judged by considering these two learning algorithms. The model is empirically validated over the daily gold prices of Gold/INR and Gold/AED data set, accumulated within 1st January 2015 to 13th July 2017. Preliminary analysis of observations clearly prefers the better prediction result of PSNN with CSA compared to PSO and DE.
The remaining layout of the paper is along these lines: Section 3 mentions the explanation of CSA and PSNN model following a literature survey in Section 2. In the following section the proposed model is explained in details. The computational complexity is analyzed in Section 5. Then the Section 6 illustrates the experimental outcomes of prediction followed by conclusion in Section 7.
Literature survey
The advancement in technology, computing power and complex yet good algorithms have made the work of prediction more effective than ever. Some promising works done by various researchers in the field of gold price prediction are reviewed here. In [1] authors have developed an ANN based gold price predictor model. They have used back propagation algorithm for traing of the network. The model performance is found to better compared with a GARCH time series model. In [2] authors have developed IEMD-BPNN-PMR model for forecasting gold prices. The model performance is compared with FNN, EMD-FNN-ALNN and BPNN using MAE and Dstat as the assessment metrics. The experimental analysis demonstrates the better prediction results of the model in comparison to others. In [3] authors have suggested another ANN based gold price predictor model trained using BPNN. By evaluating model performance over RMSE, MAE values the model was showing better results compared to ARIMA based time series model. Sivalingam etal., have proposed a singular hidden layer feed forward network trained using ELM for gold price prediction in [5]. An integrated construct combining ANN with GARCH is proposed in [20] for predicting the nonlinearity characteristics of gold price. The experimental analysis showed that the hybrid model improved the forecasting results and outperformed the base models. By assessing the existing literature on gold price forecasting, we perceived that developing more accurate model with less computational complexity is still efficacious.
Comparative study of proposed model with some promising works done by various researchers in the field of gold price prediction
Comparative study of proposed model with some promising works done by various researchers in the field of gold price prediction
In last decades, PSNN having a simple structure with linear summation units in the second layer and a product unit in the third layer is receiving higher attention in several application domains. A PSNN based classifier is designed in [9]. The authors have proposed a hybrid learning algorithm using PSO and GA for the network. The superior performance of the model compared with other models included in the study is validated through a statistical ANOVA test. Another application of PSNN for non linear data classification problm is addressed in [10]. In this study an improved PSO is suggested for the traing of PSNN. The network was showing better accuracy compared to PSO and GA based learning. Successful application of PSNN is also found in currency exchange rate prediction. In [21] the author has applied PSNN for exchange rate forecasting. The Network is trained using GA and PSO. The model performance is analyzed through MAPE, ARV, and U of Thiels values. Compared to MLP, MLR and RBFNN the proposed model is found to be a better predictor. Another PSNN based forecaster is tested in [7] to observe the daily exchange rates of US Dollar analogous to three globally traded cash. In this research an improved shuffled frog leaping algorithm is proposed for weight estimation of the network. Empirical analysis of statistical error and hypothesis test consequences, clearly suggest PSNN as a promising predictor model. The model is further improved by using a hybrid Shuffled Differential Evolution (SDE) algorithm in learning phase of PSNN in [11]. The application of PSNN for gold price prediction is still too narrow. In response to that, in this study, the efficacy of the PSNN is explored for generating future gold prices based on past observations. A novel Crow Search based nature inspired optimization algorithm (CSA) is incorporated with PSNN to enhance the predictability of the model. The detailed description model is presented in the next section. A comparative study of the proposed model with some promising works done by various researchers in the field of gold price prediction is presented in Table 1.
This section briefly describes the working principle of PSNN along with the proposed meta-heuristic learning algorithm for it.
Pi-sigma neural network
PSNN is a kind of ANN, with three layers representing one input layer, a single hidden layer of summation units and one output layer with product units. The connections between input and hidden layer include trainable weights whereas the hidden layer is connected to output layer with a unity weight. Because of this reasoning the intricacy of the hidden layer is startlingly diminished by the number of adaptable weights, for which the NN can be easily executable. In PSNN the input vector simply passes through the input neurons to the summation units of hidden layer. Each summation unit
where
At the end, the output is obtained by multiplying the outcome of summation units and passing it through an activation function. The lapse between the predicted and actual output is then passed down to a weight updating algorithm for training of the NN. Figure 1 depicts the structure of a PSNN.
Structure of PSNN.
CSA is a nature based algorithm, built on the social intellect of crows. Crows gather their surplus food in hiding region and retrieve it whenever required. They have the memorizing capacity to remember the location of their own stored food. They look on other crows and inspect where they are hiding their food. Once they find the owner has left its place, they steal the food from there. However they protect their own food by using their own experience of thievery. In CSA, each crow in a flock has a position referring to a possible solution in the search space. Initially N members of the crow flock are positioned in a search space randomly with their memory component. At first, the initial random positions contain food for the crows. Further new positions are generated by tracking the food hidden location of randomly selected crows using following equation:
where
If the derived location of crow is viable and generates better fitness value compared to its memorized position, then the memory of the crow is updated using the following equation:
The process of generating new location and memory updation of crows are continued till some stopping criteria such as predefined number of iterations is reached. After specified iterations, the crow position that produces minimum fitness value is supposed as the global optimal solution.
The search space exploration steps of CSA are as follows:
Initialize the parameters of CSA such as number of crows in the flock ( According to flock size, initialize the position of each crow and meory of each flock randomly. The crows do not have any experience initially. So, it is assumed that crows have hidden their food at an initial position. Evaluate the objective function value of individual crow. Generate new position for each crow in the search space using Eq. (3). Update the position of the crow checking its feasibility. Calculate the objective function value of the new position of the crows. Update the memory of the crows using Eq. (4).
Proposed CSA-PSNN predictor model.
Repeat the Steps 3 to 7 until the termination condition is reached. Finally, the best position of memory is selected as the solution to the optimization problem when the termination criterion is reached.
This passage describes the details of gold price prediction using a CSA based PSNN model. Figure 2 represents the framework of the suggested CSA-PSNN model.
Data collection and preprocessing. Initially the gold prices on daily basis are gathered within a particular time interval. Then the raw gold price time series values are normalized in the range 0 to 1 using the min max normalization as follows:
where After normalization, the input and output vectors of PSNN are formed by a sliding window technique with a window size of 5 and prediction horizon of 1. Creation of PSNN predictor model. In this stage a three layer PSNN is built with 5 neurons in input layer, a single hidden layer and 1 product unit in output layer. The predictability of the PSNN network is greatly impelled by the number of summation nodes used in middle layer. Based on these nodes, a set of weights need to be tuned. Hence observations are collected with different number of summation nodes. In each case, setting the weights between the hidden and output layer to one, other weights of the network which are the trainable ones are randomly initialized. In the next step, these trainable weights are estimated through a weight updating algorithm. Training of PSNN using CSA. Training is a phase of bettering the performance of PSNN by adapting itself. This process involves adjustment of unidentified weights of PSNN used in between the input and hidden layer, reducing the forecasting error. Hence training of PSNN is heaved as an optimization problem considering an error criterion for the objective function. This study focuses on application of CSA for identifying the adjustable weights of PSNN. In this application, minimizing Mean Squared Error (MSE) is set as an objective function, which is defined as follows:
where By repeatedly applying search space exploration steps of CSA, the weight vectors specified by the positions of the crow in the flock are updated iteratively. Finally, the best vector position is fixed as the weights of PSNN and the network is used for testing. Performance evaluation of trained PSNN predictor model. The predictive ability of the PSNN gold price predictor model is accessed based on certain performance evaluation criteria such as Mean Square Error (MSE), Root Mean Square Error (RMSE) and Mean Absolute Error (MAE) described as follows:
PSNN having a single layer neural network structure provides a great advantage in reduced computational complexity compared to traditional MLP. Due to the use of unity weights between hidden and output layer, the intricacy of the hidden layer is startlingly diminished by the number of adaptable weights, for which the NN can be easily executable. For a simple MLP having a single hidden layer with
Empirical analysis
The goal of this study is to investigate the achievement of the proposed CSA-PSNN predictor model for forecasting future gold price values for next day ahead. Historical daily closing price of gold corresponding to 664 trading days spanning from
Suggested parameters of different algorithms
Suggested parameters of different algorithms
Sensitivity analysis of proposed CSA-PSNN model
Prediction output of CSA-PSNN with different hidden layer size for Gold/INR data set
Prediction output of CSA-PSNN with different hidden layer size for Gold/AED dataset
The optimization performance of CSA is significantly influenced by the three control parameters, i.e., Flock size (C), flight length (Fl), Awareness probability (Ap). Thus tuning these parameters properly is essential to demonstrate the efficacy of CSA as a problem solver. Control parameter tuning is the process where different combinations of parameters are assessed to achieve a best performance in terms of solution quality and/or computational complexity. Hence a parameter sensitivity analysis is presented in Table 3 to fully exploit the searching power of CSA in the proposed CSA-PSNN model. In order to verify the effect of Flock size, flight length and Awareness probability on the performance of algorithm, total 48 combinations are tested by varying C from 20 to 50 in steps of 10, Fl from 1.5 to 3 in steps of 0.5 and Ap from 0.1 to 0.3 in steps of 0.1. Maximum number of iteration is set at 100 for each combination. For every combination 10 independent runs are carried out and average values of the MSE and the computing time is presented in Table 3 for both the dataset. From the simulation it is observed that the minimum MSE is observed for the C, Fl, Ap combinations of (20, 2.5, 0.2), (50, 2, 0.2), (30, 3, 0.2) and (50, 3, 0.2) for Gold/INR dataset. But again comparing their computing time in seconds it is found that the combination (20, 2.5, 0.2) results in minimum computing time. Similarly for Gold/AED dataset the C, Fl, Ap combinations of (20, 2.5, 0.2), (50, 2.5, 0.2), (50, 3, 0.1), (40, 3, 0.2), (50, 3, 0.2) and (50, 3, 0.3) are showing minimum MSE value and after comparing their computing time in seconds it is found that the combination (20, 2.5, 0.2) results in minimum computing time.
Error statistics of PSNN with different learning algorithms over test data set
Prediction output of CSA-PSNN for Gold/INR dataset.
Prediction output of CSA-PSNN for Gold/AED dataset.
Tables 4 and 5 represent the average and standard deviation of errors obtained from 10 independent runs for PSNN with CSA learning algorithm with hidden layer size 2, 3, 4 and 5 for Gold/INR and Gold/AED dataset respectively. For both the data sets PSNN is showing better results in terms of minimum error values and computing time with CSA based learning algorithm for hidden layer size 2. So other prediction results are observed with hidden layer size 2. Table 6 shows statistical error obtained by PSNN with CSA, PSO and DE based learning over test samples, with the hidden layer size fixed to 2 for both dataset. The results clearly illustrate that the proposed CSA-PSNN predictor model is providing better prediction results and less computing time in comparison to PSO-PSNN and DE-PSNN predictor model. Finally Figs 3 and 4 depict the predicted and actual gold price of both the data set, obtained by the CSA-PSNN predictor model. The adjacency gap of the predicted prices to the actual prices depicted in those figures also represents the efficient predictability of the proposed methodology.
There are two contributions of this research. The first contribution is to develop a high order network named as PSNN for prediction of daily gold price data. By keeping the equivalent structure as that of the feed forward networks, but using a set of product units in the hidden layer and fixing the weights between hidden and output layer to unity, PSNN has the advantage of reduced computational complexity compared to other similar type of ANNs. The product units of PSNN help to increase the information capacity of the nodes in the network, whereas they possess fast learning rates due to the involvement of some higher order inequalities. The second contribution of the work is to show the effectiveness of the CSA algorithm in fine tuning the adjustable weights of PSNN so as to improve its predictability, which is also a new innovation in the domain of gold price prediction. The controlling parameters of the CSA are also determined through a sensitivity analysis. The efficacy of the PSNN based predictor model is examined with two other nature inspired learning algorithms such as PSO, DE along with proposed CSA learning by applying it on gold price values in India and United Arab Emirates Dirham. The gold price data collected from 1st January 2015 to 13th July 2017 are used for validation of the predictor models. The predictor model is evaluated by considering the computing time and three evaluation measures such as MSE, RMSE and MAE.
Empirical observations clearly show that, the developed CSA-PSNN predictor model is providing better computing time and prediction results compared to PSO-PSNN and DE-PSNN model. So it can be affirmed as an acceptable predictor model for other time series prediction problems.
Though the proposed CSA leads to an improvement of the learning as well as the predictive ability of the PSNN network, but it has also some limitations. The proposed model is tested only with a fixed window size of 5. Here the results may be dependent on the historic data as well as the forecasting models. Also the model has not been explored for multistep ahead prediction. So the future research will focus on exploring other feature engineering techniques for selecting suitable input vectors for the proposed predictor model. The model will also be experimented for multistep ahead prediction of gold price data, prediction of its volatility, its return value and soon. The work may be extended by developing hybrid learning algorithms using CSA with some other recently developed meta-heuristic techniques.
