Key words

5.1 Introduction

Gold is one of the most important precious metals for investment, as it maintains its value over time and can be used for hedging against risks (Khan, 2013; Shafiee & Topal, 2010). Many investment instruments such as accounts, stocks, derivative certificates, and contracts for differences have been created based on this precious metal. For this reason, the ability to forecast gold prices and gold price volatility has immense importance for the finance community. To this aim, we used a novel approach called synergistic forecasting modeling. This model expands upon previous methods by combining information obtained from technical analysis indicators and fundamental variables using Kalman filtering to improve forecasting accuracy.

Most changes in gold prices are attributed to demand-side factors. In this respect, demand for gold is affected by many variables. First, changes in the gold demand result from changes in sentiments and speculation, which cause daily movement in gold prices. Sentiments can be measured by technical analysis indicators (Potoski, 2013). Also, several fundamental factors are influential: Intermarket variables such as the oil price (Zhang & Wei, 2010), financial stress, political uncertainty (Reboredo & Uddin, 2016), and interest rates (Ul Sami & Junejo, 2017) are considered to be the most important fundamental factors that affect gold prices (Das et al., 2018).

Following the 2008 economic crisis, gold was considered a safe haven for investment, and the role of the gold market in the economy increased. Accordingly, forecasting the price and volatility of gold broadly attracted the interest of researchers and led researchers to propose a variety of mathematical and hybrid prediction models (Shafiee & Topal, 2010). Parisi et al. (2008) proposed a recursive and rolling neural network model to predict the sign variation of gold prices one step ahead by considering lags in changes to gold prices as well as lags in the Dow Jones industrial production index. Their method captured 60.68% of true sign variation. Yazdani-Chamzini et al. (2012) developed an adaptive neuro-fuzzy network based on oil and silver prices to predict changes in the gold price; this method outperformed the ANN and ARIMA model, generating a lower root-mean-square error (RMSE) and higher R-square. Khan (2013) also found that the Box Jenkins ARIMA (0,1,1) method is suitable for forecasting gold prices. Meanwhile, Kristjanpoller and Minutolo (2015) applied a hybrid ANN-GARCH model to forecast gold price volatility using foreign exchanges, the oil price, the Dow Jones index, the London stock exchange index, and the oil price return as inputs. They found that their hybrid model improved the mean absolute percentage error in the model compared to the standalone GARCH and ANN models. Finally, Fang et al. (2018) investigated the impact of macroeconomic variables on the volatility of US gold futures using the GARCH-MIDAS model. Their empirical results confirmed that the consideration of macroeconomic variables significantly improves the ability to predict long-term volatility in the US gold market.

The present research describes a hybrid prediction method: a synergistic forecasting model. This model performs a techno-fundamental analysis that fuses a structural model of technical analysis indicators with the exponential GARCH (EGARCH) model of fundamental variables, both of which have a significant impact on the price return volatility of gold. The aim is to create a better forecasting model that can determine gold price returns one step ahead. The data fusion was performed by applying a modified, extended Kalman filter to the indicators, wherein the operational parameters of the Kalman filter were calculated by a support vector regression (SVR) neural network.

5.2 Data

We applied the proposed model to a sample consisting of daily observations of fundamental variables and technical analysis indicators from March 2014 to March 2018. The historical returns of gold spot prices in US dollars (XAUUSD) were used as the dependent variable of the model. Two types of independent variables were used in the synergistic forecasting model, namely fundamental analysis and technical analysis indicators. For the fundamental indicators, the Cleveland Financial Stress Index (CFSI) was used as a proxy of investor sentiment; this index is released by the Federal Reserve Bank of St. Louis. Three-month treasury bill (DTB3MS) interest rates were also used and are considered to be indicators of short-term interest rates. Two CBOE® volatility indexes, the Gold Volatility Index (GVZ) and the Crude Oil Volatility Index (OVX), were used as proxies of the implied volatility of gold and oil options on the Standard & Poor’s depositary receipt (SPDR®) and the United States Oil Fund (USO®), respectively.

Technical analysis indicators contain rich information about market dynamics in terms of price and volume and are widely used as inputs in different models for predicting price turning points and price trends. The lagged values of these variables have significant forecasting power (Bekiros, 2015; Neely & Weller, 2012). Specifically, the Relative Strength Index (RSI), stochastic indicator (%K), on-balanced volume (OBV), and standard division indicator (STD) were used in this research. RSI shows the strength or weakness of trends by measuring the acceleration of price movement. %K measures the velocity of price by considering the tendency of close prices. OBV indicates whether the demand or supply side is increasing in the market. Finally, STD shows the volatility of the gold price.

The descriptive statistics of these variables are listed in Table 5.1Footnote 1. According to the Jarque-Bera test, with the exception of LGVZ, the variables are not normally distributed. So, the modified version of the Kalman filter must be applied (Mirza, 2011). Figure 5.1 shows the actual gold price returns in XAUUSD for the forecasting period.

Table 5.1 Descriptive statistics of the fundamental and technical analysis indicators
Fig. 5.1
figure 1

Gold price (XAUUSD) returns

5.3 Methodology

The applied synergistic forecasting approach is a type of time-series forecasting model that combines technical and fundamental models for more accurate prediction (Ebrahimijam et al., 2018). Appendix shows the synergistic model. The first input is the EGARCH regression, a fundamental model that estimates the impact of economic and financial variables on the volatility of gold price returns. Before performing GARCH-type estimations, the presence of an ARCH effect (Engle, 1982) should be verified. As the logarithm of variance is modeled by EGARCH, there is no need to artificially impose nonnegativity constraints on the negative model parameter and asymmetries are allowed. In the following, Eq. 5.1 describes the EGARCH model (Nelson, 1991):

$$ \ln \left({\sigma}_t^2\right)=\omega +\beta \ln \left({\sigma}_{t-1}^2\right)+\gamma \frac{u_{t-1}}{\sqrt{\sigma_{t-1}^2}}+\alpha \left[\frac{\left|{u}_{t-1}\right|}{\sqrt{\sigma_{t-1}^2}}-\sqrt{\frac{2}{\pi }}\right] $$
(5.1)

where σ_t^2 is the conditional variance and u_(t-1) is the error distribution.

The economic and financial variables, short-term T-bills, and the OVX, GVZ, and CFSI were utilized as exogenous variables by the model to investigate the impact of these variables on the volatility of XAUUSD. The second input of the synergistic forecasting model was the prediction of standard deviation obtained from the structural time-series model of technical analysis indicators, which indicates the impact of lags in the technical analysis indicators on gold market price volatility.

The third input was the estimated covariance of process noise (Q) for the Kalman (1961) filter at the center of the analysis. The Kalman filter is a two-step process of prediction and correction stages (Welch & Bishop, 2001). First, an estimation of the current state is generated based on uncertainties in the prediction stage; then, it is updated using a weighted average from the prediction and observation stages, with more weight being given to the more certain one.

  • Prediction stage:

$$ {\hat{x}}_k^{-}=f\left({\hat{x}}_{k-1},{u}_{k-1},{w}_{k-1}\right) $$
(5.2)
$$ {P}_k^{-}={A}_k{P}_{k-1}{A}_k^T+{Q}_{k-1} $$
(5.3)
$$ {\hat{z}}_k=h\left({x}_k,{v}_k\right) $$
(5.4)
  • Update stage:

$$ {K}_k={P_k}^{-}{H_k}^T{\left({H}_k{P}_K^{-}{H_k}^T+R\right)}^{-1} $$
(5.5)
$$ {\hat{\textrm{x}}}_{\textrm{k}}={\hat{\textrm{x}}}_{\textrm{k}}^{-}+{\textrm{K}}_{\textrm{k}}\left({\textrm{z}}_{\textrm{k}}-{\hat{\textrm{z}}}_{\textrm{k}}\right) $$
(5.6)
$$ {P}_k=\left(I-{K}_k{H}_k\right){P}_k^{-} $$
(5.7)

where f is the predicted state estimation function substituted by the EGARCH model as a predictor of fundamental variables, h is the prediction of the measurement function substituted by the structural model of the technical analysis indicators, \( {\hat{x}}_k^{-} \) is the prior estimate of the state variables, A _ k is the state transition matrix, \( {P}_k^{-} \) is the prior estimate of the current covariance matrix, \( {P}_k^{-} \) is the previous covariance matrix, Kk is the Kalman gain, Qk − 1 is the process noise covariance, and R is the measurement noise covariance.

An SVR neural network was applied to estimate gold market volatility as a time-varying parameter that changes based on market conditions and volatility (Q). In particular, SVR is a support vector machine (SVM) method based on supervised learning (machine learning) (Cortes & Vapnik, 1995) that can perform regression analysis and train sample data with target values. As shown in Fig. 5.2, the main characteristic of SVR is that it attempts to minimize the generalized bound instead of minimizing the observed training error. To develop a nonlinear SVR, sample data must be converted using kernel functions to perform linear separation.

Fig. 5.2
figure 2

Support vector regression

The goal function and constraints are shown in Eqs. 5.8, 5.9, 5.10, and 5.11:

$$ \operatorname{Minimize}\ \frac{1}{2}{\left\Vert w\right\Vert}^2+c\sum \limits_{i=1}^k{\xi}_i+{\xi}_i^{\ast } $$
(5.8)
$$ {y}_i-w{x}_i-b\le \varepsilon +{\xi}_i $$
$$ w{x}_i+b-{y}_i\le \varepsilon +{\xi}_i^{\ast } $$
$$ {\xi}_i,{\xi}_i^{\ast}\ge 0 $$

where

$$ y=\sum \limits_{i=1}^k\left({\alpha}_i-{\alpha}_i^{\ast}\right).K\left({x}_i,{x}_j\right)+b $$
(5.9)

The Kernel function is a Gaussian nonlinear function, as shown below:

$$ K\left({x}_i,{x}_j\right)=\exp \left(-\frac{{\left\Vert {x}_i-{x}_j\right\Vert}^2}{2{\sigma}^2}\right) $$
(5.10)

For SVR, Cortes & Vapnik (1995) proposed that the loss function (L) in Eq. 5.11 should be used to penalize errors that are greater than the ε threshold.

$$ {L}_{\varepsilon}\left(y,f\left(x,\omega \right)\right)=\left\{\begin{array}{c}0\kern5em if\ \left|y-f\left(x,\omega \right)\right|\le \varepsilon \\ {}\left|y-f\left(x,\omega \right)\right|-\varepsilon \kern2em \textrm{otherwise}\end{array}\right. $$
(5.11)

At the end of the synergistic forecasting model, there is a lag operator ( Z−1) that generates the predicted gold price return for further use in the Kalman filter (Welch & Bishop, 2001).

5.4 Empirical Findings

The EGARCH model was first conducted on the financial variables. The results are presented in Table 5.2. The Engle heteroscedasticity test showed that an ARCH effect was present in the residuals. The significant α coefficients indicated that all of the fundamental variables had a significant impact on the volatility of gold prices. The highest impact was from GVZ. T-bill had the least negative impact (−0.009), and the CSFI had a slight negative impact (−0.028) on gold price volatility. 1% increase in oil price volatility increases gold price volatility by 0.048%.

Table 5.2 Effects of the fundamental variables on gold price return and volatility calculated by the fundamental model (EGARCH)

Figure 5.3 shows the forecasting output for XAUUSD volatility based on the fundamental model (EGARCH), which can effectively forecast upcoming high volatilities.

Fig. 5.3
figure 3

Forecasting output of the fundamental model (EGARCH)

Table 5.3 presents the estimation results of the structural model of technical analysis indicators, showing the effects of the technical analysis indicators on the standard deviation of gold prices. Most of the lags in the technical analysis indicators are significant. The highest impact is for one-day-ago RSI, which is 0.13% on next-day gold price volatility.

Table 5.3 Effects of the technical analysis indicators on gold price standard deviation calculated by the structural model

Figure 5.4 shows the forecasting output for XAUUSD volatility based on the structural model of the technical analysis indicators. Notably, some upcoming high volatility situations can be predicted by the model.

Fig. 5.4
figure 4

Forecasting output of the structural model of the technical analysis indicators

The SVR model predicted the process error covariance (Q) (an estimation of volatility in gold price returns) for the Kalman filter using the financial variables of OVX, CFSI, GVZ, and T-bills as inputs. According to Fig. 5.5, which shows the Q estimation for upcoming volatilities, the estimation model fitted very well to the actual data.

Fig. 5.5
figure 5

Estimation output of process noise covariance (Q) using an SVR algorithm

Table 5.4 presents the predictive power based on the RMSE and correct directional change performance (%CDCP). This type of direction-of-change forecasting is very popular in financial market studies (Bekiros & Georgoutsos, 2008). The synergistic model had a very small RMSE (0.0268) and a high % CDCP. Therefore, the synergistic model was able to correctly predict the direction of the XAUUSD price returns 67% of the time through combining information on the volatilities of future gold market price returns from the models for technical and fundamental analysis indicators.

Table 5.4 Forecasting accuracy measure for XAUUSD price with different models

To confirm the superior performance of the synergistic model, the result of %CDCP must be greater than 50%, which would evidence that the model outperforms the random walk model (Hong et al., 2007). To confirm the statistical significance of %CDCP, the test statistic should be greater than the critical value defined at the 1% level (σ _ (0.01%)), which is approximately 0.083159 (Cai & Zhang, 2014).

5.5 Conclusion

This chapter presents a synergistic forecasting model that combines information from technical and fundamental analysis indicators (a techno-fundamental approach) to predict daily gold prices returns. Our model used information from the EGARCH model (a fundamental analysis) and from a time-series structural model of technical analysis indicators. This information was processed by a data fusion technique using the Kalman filter that can dynamically update process noise (Q) through support vector regression. The proposed new structure of the synergistic forecasting model effectively improved the accuracy of the prediction in comparison to forecasting solely based on technical and fundamental analysis and significantly outperformed the benchmark models in terms of its significant and correct prediction of the directional movement of XAUUSD price returns and RMSE. The results highlight how volatility forecasting can support the Kalman filter to generate superior gold price return predictions, which represents an important advantage of the proposed synergistic model. Also, these findings prove the efficiency of using publicly available data in forecasting and therefore have significant practical implications for the financial community.