Keywords

1 Introduction

Copper is one of the basic metal products listed on major exchanges in the world: the LME, Commodity Exchange of New York (COMEX) and Shanghai Futures Exchange (SHFE). Prices in these exchanges reflect the balance between the supply and demand of copper worldwide, although they may be strongly influenced by the rates of currency exchange and investment flows, factors that may cause fluctuations of volatile prices partially linked to changes in the economic cycle activity [1].

The price of copper is a sensitive issue for major producers such as Codelco, Freeport-McMoRan Copper & Gold, Glencore Xstrata, BHP Billiton, Southern Copper Corporation, American Smelting and Refining Company. Economies such as those of Chile and Zambia rely heavily on copper production and, subsequently, in the evolution of the prices of the same [2], being Chile the largest producer and exporter of the world.

Several studies include copper as one of the products of interest in the evaluations of the forecast to improve the prediction of prices. They employ a variety of different methods and mathematical models: time series [3,4,5], combined with wavelet [6, 7], transformed of Fourier [8], swarm optimisation algorithm [9], and models of multi-products [10].

A fairly accurate time series model could predict several years forward, whose skill is an advantage for the planning of future requirements. Research on nonlinear dynamical systems has allowed in recent years significantly improve the impact of the predictive capacity of the times series. Chaos is a universal complex dynamic phenomenon that exists in different natural and social systems such as communication, economics and biology. The auto-correlation of chaotic behaviour in the economy began in the decade of 1980, applied to macroeconomic variables such as the gross domestic product (GDP) and monetary aggregates [11]. Since then, several studies have been conducted to search chaotic behaviour in economic and financial series [12, 13].

In this context, amongst the most used techniques and tools are graphics analysis of recurrence, Temporal Space Entropy (STE) Hurst coefficient and exponent of the Lyapunov dimension of correlation for the matching of chaotic behaviour in these series [14]. Additionally, the existence of chaotic behaviour in the commodities of copper was corroborated in [15].

The motivations and the need to carry out this research is to evaluate the ANN by different dimensions, type of networks, functions and structures.

2 Methodology

The continuous increase of the power of calculation and availability of data has grown the attention in the use of ANN in many types of problems of prediction. The ANN can model and predict linear and nonlinear time-series with a high degree of accuracy, to capture any relationship between the data without prior knowledge of the problem which is modelled [16].

The methodology used for visual and statistical analysis is summarised according to the Fig. 1 adapted the Loshin [17].

Fig. 1.
figure 1

Methodological graph based on methodology of Business Intelligence (BI).

The closing prices of copper traded on the LME were used with the different functions of learning, optimisation and transfer as input. Then, the quality of the forecast of the ANN performed in MatLab R2014a simulation tool was evaluated with Root Mean Square (RMS) and the Adequacy Index (IA). The saved data goes through the process of Extract, Transform and Load (ETL) to be stored in the Data Warehouse (DW) in a multi-dimensional form, using SQL Server 2008. The visual analysis of the results is done by the software BI Tableau Desktop 8.3 as Frontend, and the R version 3.1.2 software to perform the corresponding statistical analysis.

2.1 Segmentation of Data

Data were segmented into two sizes of batches. The former with 100 and the later with thousand data. Periods from 22/01/2015 to 16/06/2015 and the 01/07/2011 to 16/06/2015 respectively.

Segmentation according to the evaluated batch records is according to the Table 1.

Table 1. Segmentation’s records.

2.2 Artificial Neural Networks

Represented FFNN has been taken to this work in the Fig. 2(a) and the represented CFNN in the Fig. 2(b). We have selected some of the features available in the toolbox of Matlab software.

Fig. 2.
figure 2

(a) FFNN of 1–20 neurons in the hidden layer. (b) CFNN of 1–20 neurons in the hidden layer [18].

The inputs used in the system correspond to \( t_{ - 1} \), \( t_{ - 2} \), \( t_{ - 3} \), \( t_{ - 4} \), \( t_{ - 1} \), \( t_{ - 6} \) and target \( t_{0} \) the copper price time series.

2.3 Alternatives of Evaluation

The different alternatives of a network are given according to different combinations between their functions as shown in Eq. (1).

$$ M = E*R*F*n $$
(1)

where,

  • \( M \), It is an alternative for a network number.

  • \( E \), It is the number of training functions.

  • \( R \), It is the number of performance functions.

  • \( F \), It is the number of transfer functions.

  • n, It is the number of neurons in the hidden layer.

Replacing values in the Eq. (1) gets the number of alternatives for a network.

$$ {\text{M}} = 9*2*3*20 = 1080 $$

To calculate the total number of alternatives evaluated in this work is obtained from the Eq. (2).

$$ T = M*N*L $$
(2)

where,

  • \( T \), It is the number of evaluated alternatives.

  • \( N \), It is the number of networks (structure of similar functions).

  • \( L \), It is the number of batches of data.

Replacing values in the Eq. (2) obtained 4320 alternative evaluated in this work.

$$ T = 1080*2*2 = 4320 $$

Were 27 simulations for each of the 4320 alternatives evaluated in this work with a total of 116640 simulations according to the Eq. (3).

$$ T_{s} = T*S $$
(3)

Where,

  • \( T_{s} \), It is the total number of simulations carried out.

  • \( S \), It is the number of simulations for each alternative.

2.4 Multidimensional Model

This research focuses on the evaluation of two networks simultaneously from different dimensions. The FFNN and the CFNN in dimRed, training features (trainbfg, traincgb, traincgf, traincgp, traingd, traingdm, traingda, traingdx, trainlm) in dimFuncTrain, in dimFuncTransfer (logsig, tansig, purelin) transfer functions, functions (mse, sse) performance in dimFuncPerform. Number them 1 to 20 neurons, with batches of 100 and 1,000 data. The function of learning was the learngdm and the metrics of evaluation [RMS, IA, bestEpoch, duration] in fact table.

Figure 3 shows the “star model” [19] used to perform multidimensional analysis according to the methodology proposed by Kimball [20]. The construction of the DW was based on multidimensional modelling, in which the structures of the information on table are facts and dimensions [21].

Fig. 3.
figure 3

Star model for multidimensional analysis of project.

2.5 Performance Measures

$$ RMS = \sqrt {\frac{{\mathop \sum \nolimits_{i = 1}^{n} \left( {o_{i} - p_{i} } \right)^{2} }}{{\mathop \sum \nolimits_{i = 1}^{n} o_{i}^{2} }}} $$
(4)
$$ IA = 1 - \frac{{\mathop \sum \nolimits_{i = 1}^{n} \left( {o_{i}^{'} - p_{i}^{'} } \right)^{2} }}{{\mathop \sum \nolimits_{i = 1}^{n} \left( {\left| {o_{i}^{'} } \right| - \left| {p_{i}^{'} } \right|} \right)^{2} }} $$
(5)

The results were validated using performance measures that allow indicating the degree of generalisation of the model used. The indexes are the average quadratic Error (RMS), and the index of adequacy (IA). Both are shown in the Eqs. (4) and (5), respectively, where \( o_{i} \) and \( p_{i} \) are the values observed and predicted respectively at the time \( i \), and \( N \) is the total number of data. In addition, \( p_{i}^{'} = p_{i} - o_{m} \) and \( o_{i}^{'} = o_{i} - o_{m} \), being \( o_{m} \) value average of the observations [22].

IA indicates the degree of adjustment that has the values estimated with the actual values of a variable. A value close to 1 indicates a good estimate. On the other hand, near-zero RMS indicate a good quality setting.

3 Results

3.1 Knowledge Discovery

The knowledge is in the data, however, must be extracted and built for the consumption of the users. New technological solutions are required for data management. The new software and methodologies are the solution to make sense of the data, allowing to extract useful information for the construction of knowledge, supporting decision making. Data from markets together with the new data generated from different data mining techniques, can help to the analysis and the management of Big Data [23, 24]. In this case, the business intelligence tool enables the discovery of knowledge.

Figure 4 shows the best results obtained in the average assessment (RMS) ̅ in lots of 100 data FFNN. The indexes are shown in a scale of colors, where the blue colour indicates better value performances corresponding to the minimum of the RMS and the red colour lower performance. After several iterations were obtained the best results to correspond to functions purelin, traincgb, traincgf, traincgp, mse and sse between 1 and 5 neurons.

Fig. 4.
figure 4

Final result and visual analysis of the FFNN, batch = 100. (Color figure online)

(\( AI \)) in the FFNN average assessment indicates a better fit in the curves, for this case are kept the same functions and expands the range of neurons from 1 to 20.

In the case of the FFNN network for batches of 1000 data, the best results of \( \overline{RMS} \) and \( \overline{AI} \) they correspond to the functions purelin, trainlm, mse and sse with ranges of neurons from 6 to 10 in Table 2.

Table 2. FFNN for batches of 1000, functions purelin, trainlm, mse and sse with ranges of neurons from 6 to 10.

In the case of CFNN for batches of 100 data, the best results for the averages of \( \overline{RMS} \) and \( \overline{AI} \) they correspond to the functions purelin, traincgb, traincgf, traincgp, mse and sse between 1 and 2 neurons in Table 3.

Table 3. CFNN for batches of 100, purelin, traincgb, traincgf, traincgp, mse and sse between 1 and 2 neurons functions.

CFNN batches of 1000 data, for best results unemployment averages \( \overline{RMS} \) and \( \overline{AI} \) they correspond to the functions purelin, trainlm, mse and sse with ranges from 3 to 4 neurons in Table 4.

Table 4. CFNN for 1000 batches, functions purelin, trainlm, mse and sse with ranges from 3 to 5 neurons.

We found that FFNN and CFNN for batches of 100 data obtained the best results with the training functions named traincgf, traincgb, and traincgp. On the other hand, for batches of 1000 data, the best function of training was the trainlm in FFNN and CFNN.

3.2 Forecast

The charts show the forecast made by the FFNN and chaotic CFNN in series of the copper’s price (Fig. 5a, b, c and d). FFNN and CFNN show similar values in his performance’s ratings.

Fig. 5.
figure 5

(a) Forecast of the FFNN for data verification with lot of 100, purelin, traincgp and sse of 5 neurons functions; (b) Forecast of the FFNN for data verification with lot of 1000, purelin, trainlm and sse of 7 neurons functions; (c) Forecast of CFNN for data verification with lot of 100, purelin, traincgb and sse of 1 neurons functions; (d) Forecast of CFNN for data verification with lot of 1000, purelin, trainlm and mse of 3 neurons functions.

3.3 Statistic Analysis

The CFNN (trainFcn = trainlm, performFcn = sse, transferFcn = purelin, learnFcn = learngdm, lot = 1000, numNeuronas = 3) simulo up to 10000 simulations, where obtained good results in the performance of the network, with average measures of RMS of 0.00767957, IA of 0.9725127 and best_epoch of 3.1376; minimum values of 0.007535554; 0.9698627 and 1 respectively, maximum values of 0.007712344; 0.9731063 and 11 respectively, in the Table 5 the statistical summary of the simulation.

Table 5. Statistical simulation.

To review the distribution of RMS performance measures is observed which is skewed to the left Fig. 6a, Therefore, the bias is negative (less than the median average); Instead the IA is skewed to the right index Fig. 6b, therefore, the bias is positive (greater than the median average) and the best_epoch this biased right in Fig. 6c. On the other hand the correlations (Pearson) graph shows a high negative correlation of −0.79 between RMS and the IA which shows the good performance of the ANN indicated by RMS will also be it according to the IA. On the other hand presents a negative correlation of −0.49 between IA and best_epoch; and a positive correlation of 0.52 between RMS and best_epoch.

Fig. 6.
figure 6

(a) Distribution of RMS, (b) distribution of IA, (c) distribution of best_epoch and (d) plot of correlations between IA and RMS best_epoch.

4 Conclusions

Forecasts based on neural network, nonlinear models achieved better results compared with linear forecasting models. Combinations of two neural network models, with nine training functions, two functions of performance, lots of 100 to 1000 data and ranges from 1 to 20 neurons and three transfer functions have been studied.

For different batch size of data it is to be more sensitive to the functions of training on the functions of transfer, performance, number of neurons.

The results of the simulations predict in the case of the copper price series; the best combinations of functions are vector (trainFcn = trainlm, performFcn = sse, transferFcn = purelin, learnFcn = learngdm, lot = 1000, number neurons = 3) for batch 1000 network CFNN and vector (trainFcn = traincgp, performFcn = mse, transferFcn = purelin, learnFcn = learngdm, lot = 100, numNeuronas = 1) to the FFNN.

Found a high negative correlation of −0.79 in the performance indicators used RMS e IA.

In future work, it is necessary to review the contribution of other macroeconomic variables in the performance of the model, in particular, market of capitals of other commodities.

Finally, the characteristics of these time series, should be analysed the same set of combinations of functions in other economic series of price, to assess the possible relationships of the systems involved.