# Copper Price Prediction Using Support Vector Regression Technique
## 5 Methodology
### Step 4: Performance Measures  
For each prediction interval, the effectiveness of the prediction model will be determined through performance measures such as MSE and RMSE. These performance measures have been used in previous prediction work [33; 34; 35]. Furthermore, the correlation coefficient between the predicted value and the actual value will be used. The computational design of step 3 and step 4 is shown in Algorithm 2. ``` Input :training time series (\(R\)); testing time series (\(T\)) Output :array of the best models with minimum prediction error (\(BPM\)) FindBestPredictionModels (\(R,T\)) \(BTM\gets FindBestTest



The best prediction capacity is obtained during the training with the series \(S_{a}\), which is temporarily the oldest. The training could have been enhanced due to the level of noise of this series. The RMS value of the noise of series \(S_{a}\) is \(RMS_{N_{a}}=0.0848\), which is higher than the one of the series \(S_{b}\), \(RMS_{N_{b}}=0.0318\). For example, for a five-day prediction, training with \(S_{a}\) gives \(MSE=0.0003\) if training with \(S_{b}\), \(MSE=0.0012\). Furthermore, the dispersion of the MSE is less compared to the training based on the most recent part of the series (see Figure 4a). In Figure 4a, we show the distribution of the MSE obtained in the predictions summarized in Table 2, which will allow us to evaluate the capabilities of prediction statistically. In addition, the confidence intervals are shown in Figure 4b, with a 5% significance for the mean estimation of the MSE of the sample obtained from the simulation--that is, intervals built at 95% confidence. Table 3 presents the differences of means of the MSE between groups in the lower triangle, and the symbols of confidence indicators in the upper triangle. With concern to the combination of pairs in the test of the hypothesis of mean differences for MSE, it is obtained in the simulation for the different prediction time intervals and the two time series \(S_{a}\) and \(S_{b}\). Furthermore, the average difference of the MSE can be visually appreciated according to the 95% confidence interval (see Figure 4b). The previous results are presented in Figure 4b and Table 3. For the comparison of means of the MSE between groups, the Wilcoxon rank-sum test was used, because according to the Shapiro-Wilk test, they do not fit a normal distribution, with \(p\)-value \(\leq\) 1.73 \(\times\) 10\({}^{-6}\) for all groups. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{_P_} & \multicolumn{1}{c}{} & \multicolumn{4}{c}{\(S_{a}\xrightarrow{P}S_{b}\)} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{} \\  & \(L\) & \(\epsilon\) & \(\epsilon\) & \(\gamma\) & \(\rho\) & **MSE** & **RMSE** & \(L\) & \(\epsilon\) & \(\epsilon\) & \(\gamma\) & \(\rho\) & **MSE** & **RMSE** \\ \hline
5 & 3 & 32 & 0.11 & \(2^{-7}\) & 0.9582 & 0.0003130 & 0.01769181 & 4 & 64 & 0.11 & \(2^{-7}\) & 0.9471 & 0.00





## 7 Discussion

As a result of the search for training parameters for the SVR models and the search for the best prediction models for different forecasting intervals, it was determined that the amount of previous data of the time series that are needed (\(L=3\) for the best models) is independent of the prediction interval. Similar values have been used in the literature in similar time series, but without justification based on a parameter search that minimizes the prediction error. For example, a value of \(L=2\) is used in [8; 9], \(L=3\) in [5] and \(L=5\) in [15]. Our results show that the presented model is able to predict copper price volatilities near reality (see Figure 3). Similar results are obtained compared to other works, such as:

* In [9], an analysis on the dynamics of real prices for main industrial metals is presented.