Analysis of the Time-frequency Connectedness between Gold Prices, Oil Prices and Hungarian Financial Markets

We study the time-frequency connectedness between the global commodities markets (crude oil and gold) and Hungary’s equity markets (stock and exchange rate) by using the multivariate generalized autoregressive conditional heteroskedasticity dynamic conditional correlation DCC-GARCH model alongside with the wavelet coherence analysis. Results of this paper highlight the long-term time-varying intercorrelations between the global commodities markets and Hungarian financial markets. Additionally, the estimations of wavelet coherence indicate that the commodities markets have a significant impact on the Hungarian financial markets in the short term, but stock and exchange markets influence crude oil and gold markets in the long run. Our empirical results shed light on the commodity-finance sectors connectedness, which is able to help investors minimize risks to build discretionary portfolios.


INTRODUCTION
International oil and gold prices have been regarded as significant factors which influences the performance of crucial macroeconomic variables (Mollick and Sakaki, 2019). As a result, the impact of variability in such both commodities has attracted attention from investors, policy makers and researchers. Further, fluctuating global prices of commodities because of variations in its demand and supply result in fluctuations of the stock and exchange rate of an oil-importing economy. Especially for oil-importing nations like Hungary, these fluctuations lead to Hungarian Forint depreciation and rise in inflation rate at the same time (Jain and Biswal, 2016). Similarly, the crude oil price is impacted by geopolitical and weather-related factors, which might generate unexpected shifts in supply and demand and result in volatility in the price of oil. Understanding the oil volatility is quite essential since it might create uncertainty in all sectors of the economy and bring about instability in the economy for importing countries. Besides, oil price volatility leads to high inflation and unemployment rates (Gokmenoglu and Fazlollahi, 2015). Baur and McDermott (2010) examine the gold role in the international financial system and test that gold presents a safe haven against stocks of major emerging and developing countries. The authors suggest that gold is both a hedge and a safe haven for major European stock markets and the US but not for the BRIC countries. This paper also argues that gold would perform as a stabilizing force for a financial system by reducing losses in the face of extreme negative market innovations. This means that global investors prefer to hold assets which secure their investments when financial disturbance takes place. Moreover, the gold price has witnessed a steady increase in recent year, in line with the boom across other commodity classes. Hence, the balance of the connectedness between gold and Hungarian financial markets should be investigated in terms of whether gold is actually a secure investment in terms of protecting an investor's portfolio.
In spite of the importance of gold and oil prices for currency hedging and trading, volatility of these commodities might give rise to negative consequences in financial markets, because an increase in the oil and gold price volatility results in an unsafe investment condition (Gokmenoglu and Fazlollahi, 2015). As a result, it is necessary to study the relationship among global commodities and financial markets for derivative valuation, hedging decisions, financial markets, and the whole economy.
Past studies take into consideration the interplay among international oil, gold prices, exchange rate and stock market returns documenting that equity return is adversely influenced by global commodities markets. Also, these papers are interested in the developed markets Raza et al., 2016;Wang and Wang 2019, etc..) while there is less attention paid in developing markets, such as Hungary. Currently, the Hungarian stock market is one of the top leading financial markets in Central and Eastern European countries (Hung, 2019b). Therefore, it plays a prominent role in helping the growth of the Hungarian financial market by providing competitive services and infrastructure with the aims of promoting the international recognition and relevance of Hungary's stock market.
Therefore, this findings in the motivation for this research, which is to explore whether the concerned variables are connected or not. Unlike previous studies, the present article provides evidence on the impact of oil and gold prices on Hungarian financial markets (stock and exchange market) and vice versa in novel approaches. First, the multivariate generalized autoregressive conditional heteroskedasticity dynamic conditional correlation (DCC-GARCH) model is used to explore the evolution of volatilities and correlations between global commodities and Hungarian equities overtime. This model has been extensively made use of in related papers (Sebai and Naoui, 2015;Jain and Biswal, 2016;Nagayev et al., 2016;Joyo and Lefen, 2019). Second, we employ wavelet coherence transport technique for the examination of time series in time-frequency domain to uncover the dynamics of correlations between international commodity markets and financial markets in Hungary. Wavelet analysis has been employed in some of the recent studies like Nagayev et al. (2016), Reboredo and Castro (2013), Raza et al. (2016), Hung (2019a. The reasons why we blend DCC-GARCH model with wavelet coherence frameworks are because DCC-GARCH model can capture variations in correlations and volatilities in high-frequency level in a more high-yielding and better picture while wavelet can put a value on the co-movement between the assets on medium and high scales. Therefore, the combination of these models provides a more indepth and robust analysis that strengthens a better understanding of the study under consideration. The findings of this paper are very crucial that investors, portfolio managers, and policymakers do better understand the dynamic interrelatedness among oil price, gold price, exchange rate, and the stock market in Hungary. For this reason, the aim of this study is to help fill this gap in the literature in connection with Hungary.
The remainder of this paper is organized as follows. Section 2 provides a literature review. Section 3 reports methodology and data set. Section 4 summarizes the empirical results and Section 5 represents the conclusion.

LITERATURE REVIEW
The present empirical literature on the interconnectedness between oil price, gold, exchange rate, and stock market index has been taken up by various researchers. Their papers provided evidence of the impact of the global commodities markets on finance sectors and vice versa. In this section, past studies that have centered primarily on a pair of the variable under investigation has been reviewed.
Divergent papers have taken into account the connectedness between oil price and stock markets.  examine the influence of structural oil price shocks on the covariance of the US stock market return and stock market volatility. The study shows that positive innovations to demand and oil market have a negative influence on the covariance of return and volatility. These findings support for the study of Raza et al. (2016), which also shows that crude oil volatilities have a negative impact on stock markets of all emerging economies in both the short-term and the long run. Another more recent studies carried out by Ferrer et al. (2018) indicate that most of price and volatility spillover is made in the short term, while the long term plays a minor role. More importantly, the paper finds out a greater degree of intercorrelation across crude oil and financial markets since the onset of the US subprime mortgage crisis. Al-Hajj et al. (2018) focus on the interplay of oil price shocks and stock returns in Malaysia, suggest that oil price innovations have an adverse influence on the stock returns in the all cases. This means that the Malaysian market is inefficient and very sensitive to the oil price fluctuations. Wang and Wang (2019) investigate the frequency dynamics of volatility spillovers between crude oil and China's stock markets and provide evidence of total volatility transmission driven primarily by short-term spillovers. In a similar vein, Xu et al. (2019) conclude that there exists an asymmetric spillover effect between the oil market and stock markets.
Several studies have explored the connectedness among gold price, stock and exchange rate markets. Findings of Raza et al. (2016) indicate that gold market has a positive influence on stock market returns of large emerging BRICS economies and a negative effect on the stock markets of Mexico, Malaysia, Thailand, Chile, and Indonesia. Mishra et al. (2010) analyze the causality connectedness between gold price and stock market returns in India. The paper provides evidence of feedback causality among variables. On the other hand, Seyyedi (2017) finds that gold prices and rupee-dollar exchange rates stay considerably independent from each other in the same context.
There are a wide variety of studies that examined the relationship between crude oil and foreign exchange rate returns. For example, Lizardoand Mollick (2010) confirm that oil prices systematically explain movements in the value of the US dollar against major currencies from the 1970s to 2008. Reboredo (2012) finds that oil price -exchange rate dependence is somewhat weak and becomes active in the aftermath of the global financial crisis. In a similar fashion, Sebai and Naoui (2015) report that oil prices and exchange rates are independent during the pre-crisis period, but they have a positive dependence after the crisis onset. Volkov and Yuhn (2015) examine the impact of oil price shocks on exchange rate movements in five major oil-exporting nations: Russia, Brazil, Mexico, Canada, and Norway. The results show that the volatility of exchange rates associated with oil price innovations is significant in these countries. More recently, He and Hamori (2019) investigate the dependence structure between oil prices and the exchange rates of BRICS countries, find that negative dependence and significant tail dependence exist in all pairs.
Past studies take into consideration more than two of these variables as well to explore further dynamics. Wang and Chueh (2013) investigate the short-and long-term dynamic correlations between interest rates, oil prices, gold prices, and the UD dollar. They suggest that gold and crude oil prices positively impact each other in the short term. The empirical study of Mo et al. (2018) employ the DCC-MGARCH model to identify the timevarying long-term connectedness among the gold market, US dollar, and crude oil market. The authors highlight that there is a long-term dependence among these markets and a negative relationship between oil prices and US dollar. More recently, Mollick and Sakaki (2019) investigate responses of 14 major currency/USD pairs to two international commodities (oil and world equity returns) under two methodologies: Transmission of shocks and mean-variance approaches, provide evidence of large and significant responses: commodity currencies sincerely appreciate following positive oil price innovations and depreciate with positive international equity innovations.
In the India context, Jain and Biswal (2019) examine the interrelatedness between Google Trend data for gold searches, Gold prices in India, the Indian stock market, and USDINR exchange rate using ADCC-GARCH model. They demonstrate the presence of bidirectional causality between gold search trends and gold spot price, along with influences on the stock and exchange rate markets. In a same vein, Seyyedi (2017) uses tests based on Johansen's cointegration, VAR and Granger causality test to explore the causality relationship among gold prices, oil prices, and Indian rupee-dollar exchange rates. The findings suggest that gold prices, oil prices, and rupee-dollar exchange rates significantly independent from each other. In another study by Jain and Biswal (2016) identify the interrelatedness between international prices of gold, crude oil, the USD-INR exchange rate, and the stock market in India using DCC-GARCH models. Empirical results show that the decrease in gold prices and crude oil prices give rise to a decrease in the value of the Indian Rupee and the benchmark stock index.
According to Singhal et al. (2018), the dynamic connectedness among global oil prices, gold prices, exchange rate, and stock market index in Mexico had been taken into account using ARDL Bound testing cointegration approach. The results of the Mexican country suggest that oil prices positively impact the stock price, while oil price influences them negatively. Oil prices negatively impact exchange rate returns in the long term, and gold prices have no impact on the exchange rate. Furthermore, Delgado et al. (2018) analyze the intercorrelation among variables of oil prices, exchange rate, and stock market index in the Mexican economy based on the VAR model. The results show that the exchange rate has a negative influence on the stock index, and oil prices are significant against the exchange rate.
On the whole, most of the studies regarding the interplay between global commodities markets and financial market are examined in the bivariate and multivariate approaches employing various econometric methods in time series. It is obvious that oil is significant for the Hungarian economy in terms of manufacturing activities. The exchange rate is also a crucial economic variable and would have important implications for the economic growth of oil and gold importing nation like Hungary. Furthermore, to the best of our knowledge, no research has been implemented on the commodity-finance equity relationship analysis, let alone how global commodities influence the Hungarian financial markets. In addition, the most often used techniques for connectedness analysis in energy literature are cointegration tests and vector error correction models, which do not imply the underlying time-frequency changes in the lead-lag structure. In this study, we employ the DCC-GARCH model alongside with wavelet coherence transform framework to explore the dynamic intercorrelation among global oil prices, gold prices, exchange rate, and stock market indices in Hungary. Therefore, the objective and primary contribution of the present study is to fill this gap. Engle (2002) introduced this estimator to capture the dynamic time-varying behavior of conditional covariance. The conditional covariance matrix Ht is now defined as,

The Dynamic Conditional Correlation Model (DCC-GARCH)
H is the diagonal matrix with conditional variances along the diagonal, and Rt is the time-varying correlation matrix.
A GARCH (1,1) specification of each conditional variance can be written as, where c is a n×1 vector, a i and b i are diagonal (n×n) matrices.
Equation (8) can be re-parameterized with standardized returns as follows, e D Engle (2002) suggests the following mean-reverting conditionals with the GARCH (1,1) specification: where q e e q ij t i j i t jt i j t , , , , And ρ ij is the unconditional correlation between e i,t and e j,t . Scalar parameters α and β must satisfy, The value of (α+β) close to one reveals high persistence in the conditional variance.
In matrix form, where Q Cov e e E e e is unconditional covariance matrix of the standardized errors Q can be estimated as, To estimate the DCC model, Engle (2002) proposes a two-step approach, we have the log-likelihood function when κ=2 is, to it, we rewrite the loglikelihood as the volatility component L V and correlation L C . Let ϕ denote a vector of parameters in D t and φ be parameters in R t . We have ln By maximizing L V (ϕ) and L C (φ) we may obtain the parameter ϕ and φ respectively.

Wavelet Coherence
In order to complement the DCC-GARCH models, the wavelet coherence approach allows us to evaluate the co-movement between Hungarian equities and commodities in both time-frequency spaces. The wavelet technique used by Grinsted et al. (2004), utilizes a bivariate framework, which is based on a continuous wavelet transform, allowing for different forms of localization. As per Nagayev et al. (2016), the wavelet method allows us to analyze correlation patterns between financial data during various regimes without having to subdivide the data into different sample periods.
A brief note on wavelet coherence is defined as follows: where I and R are the imaginary and real parts of smooth power spectrum.

Data
In this study, we investigate the interconnectedness of global oil and gold prices with the foreign exchange rate and stock markets in Hungary. The Bloomberg data service was used to collect the data. Daily data spans from February 1st, 2008 to February 26th, 2019. Budapest stock exchange (BUX) is a benchmark market index in Hungary. The US dollar -Hungarian Forint (HUF) exchange rate has been measured as USDHUF. The global gold spot price GOLD is measured in USD/troy ounce, and WTI crude spot price (WTI) is measured in USD/barrel. Several previous studies pointed that in order to avoid any spurious correlation among time-series indices, given that the holidays are not familiar with the Hungarian markets, we have taken off all the popular holidays. The continuously compounded returns are calculated in this paper as follows:

RESULTS
First, we take into account the interrelatedness between international commodities and Hungarian equities employing DCC-GARCH model to keep track of the time-varying attributes of the time series in terms of correlation and volatility. Following this, we use the wavelet coherence transformation framework to capture the interconnectedness the variables on a multi-scale and time-frequency domain.
To evaluate the evolution of interconnectedness between Hungarian financial markets and international commodity markets over time, Figure 2 reports the dynamic conditional correlations between BUX, exchange rate returns series and each commodity. As shown in Figure 2, correlations are somewhat volatile throughout the period essentially except for the pair of GOLD and USDHUF. This supports the findings of Creti et al. (2013) indicating the existence of low volatility regimes for the interrelatedness between stock and commodity. In all cases, there is an increase in volatility after the global financial crisis. Specifically, the plots highlight that the dynamic conditional correlation climbs within the range of −0.2-0.8, showing both negative and positive connectedness between international commodities and the two financial markets in Hungary during the research period.
Let us now look more specifically at the various kinds of markets, beginning with the commodity markets. Crude oil is clearly the commodity that is most connected with the stock and exchange rate markets in Hungary, confirming previous studies centering on the oil and gold markets (Wang and Wang, 2019;Al-Hajj et al., 2018). From a theoretical point of view, the underlying value of any asset is given by its expected discounted cash flows. As a result, an increasing oil price will create a rise in production costs, resulting in restraining profits. For example, the correlation between each commodity and two Hungarian financial markets has tended to increase at the beginning of the period under investigation and then remain somewhat stable. These correlations are often negative between WTI and BUX, USDHUF, revealing the idea that the behavior of the financial market is primarily driven by its own market fundamentals. More importantly, a similar pattern is established for the intercorrelations between GOLD and Hungarian financial markets after the global financial crisis except for the case of GOLD-USDHUF, where we observed a huge increase in correlation with a band of −0.12 -0.8 for the whole period. Put another way, there exists the co-dependency of both the major global commodities and the two financial markets in Hungry.
The findings are consistent with the studies of Wang and Chueh (2013), Mo et al. (2018).
To supplement these figures, Table 2 shows the estimation results of DCC-GARCH models over the sample period. Looking at the coefficients of α and β, both are statistically significant all pairs under consideration except the case of WTI-USDHUF. While the coefficient of α reflects the influence of the past innovations on  present conditional correlation, the β shed light on the effect of past correlation. Additionally, the volatility persistence is measured by (α+β), the findings document that volatility is relatively persistent given that this sum is close to 1 for all cases. It is obvious that β>α, indicating that the present variances are more impacted by past shocks. In general, this estimation highlights the idea that the volatility persistence goes along with the financialization of international commodities.
In order to confirm the DCC-GARCH model is robust, the multivariate ARCH-LM test on the residuals of each model was employed to determine whether the ARCH effect still exists in the model or not. As Table 2 shown, there were no problems of ARCH effect for all the pairs of the selected variables for the whole study period providing some indications of good specification in each model. However, the DCC-GARCH model does not show the lead or lag structure between variables (Hung, 2019a). To complement our analysis and tackle this problem, we use the wavelet coherence transform to look for the regions in time-frequency space on which the time variables illustrate high prevalent power. The various intercorrelation structure is elaborated in the following sections.
The wavelet coherence transform is used to in-depth analyze the causal association between the variables. This technique provides the common power and comparative phase of divergent time sequence in current time-frequency space. Figure 3 shows the estimation results of the wavelet coherence and phase difference for all examined pairs under study. Time is displayed on the horizontal axis, and frequency is exhibited on the vertical axis, regions in time-frequency space in which 2-time series variables  P-values are given in parentheses. *Estimated coefficients are significant at 1% levels. **Estimated coefficients are significant at 5% levels. ***Estimated coefficients are significant at 10% levels co-vary are located by wavelet coherence. Warmer colors (red) represent regions with significant intercorrelation, while colder colors (blue) illustrate lower dependence between variables. Frequencies and time with no dependence are signified by cold regions beyond the significant areas in the time series. Both time intervals and frequency in which co-movement of the pairs of variables can be identified significantly. The arrow in plots exhibits the lag phase relationships between the selected variables.
This figure represents the wavelet coherence of international commodities and two financial markets pairs. Time and frequency are presented on the horizontal (time period from February 2008 to February 2019February , with 500 = 2008February -2010February , 1000February = 2010February -2012February , 1500February = 2012February -2014February , 2000February = 2014February -2016February , 2500February = 2016February -2019 and the vertical axis, respectively. Frequency is covered to days. The warmer the color of a region, the greater the coherence is between the pairs. The solid black line isolates the statistical significance area at the level of 5% A zero-phase variation reports that the two variables move together on a particular scale. Arrows point to the right (left) when the variables are in phase (anti-phase), it means that they move in the similar direction when two series are in phase, and they move in the opposite direction when the two variables are in anti-phase. Arrows pointing to the right-down or left-up depict that commodities lead the Hungarian equities returns, while arrows pointing to the right-up or left-down illustrate that commodities are leading (Hung, 2019a).
Overall, Figure 3 documents that dependence between global commodities and Hungarian equities indices dynamically changed through time and frequencies, suggesting strong dependence at low frequencies and weak dependence at high frequencies. Moreover, phases are demonstrated by arrows pointing out the right most of the time and frequencies for the case of GOLD-USDHUF, suggesting that local interrelatedness was positive and that exchange rates were leading GOLD. For all pairs, we can observe that phases point up and point down, revealing that international commodity prices were leading the Hungarian equities markets, which was consistent along the sample period. Specifically, the wavelet coherence estimation shows that crude oil and gold have a positive effect on the Budapest stock exchange and Hungarian forint versus US dollar in the short run, while stock and exchange markets in Hungary negatively influence the selected commodities. More importantly, there is a unidirectional impact of crude oil and gold on the financial markets in Hungary in the long run. Nevertheless, no causal nexus is found in the medium run. The findings are consistent with the previous studies of  and Fang and You (2014).
The results of the DCC-GARCH model alongside with the wavelet coherence analysis are not the notable difference of the interconnectedness between commodity markets and Hungarian financial markets over the sample period. These findings are consistent with previous literature. For example, Singhal et al. (2019) find out that gold prices have positive effect on the stock price of Mexico while oil prices impact them negatively. Jain and Biswal (2016) report fall in gold prices and crude oil prices lead to fall in the value of the Indian Rupee and Sensex stock index. These results provide several signals to monetary and fiscal policies.

Policy Suggestions
The present study has important implications for investment professionals and policymakers. Obviously, crude oil and gold price have visible economic impacts on financial activities and all sectors of the Hungarian economy. Specifically, the crude oil price volatility dramatically influences derivative markets in Hungary since the value of a commodity is based on a contingent claim impacted by the volatility. In a similar fashion, the gold price volatility results in an unsafe investment condition. By contrast, lower gold price volatility creates a safe investment condition (Kaufmann and Winters, 1989).
Our findings provide crucial implications for investors because volatility in oil and gold prices brings about the fluctuation in the stock market and exchange rates in the long term. It is evident that increasing the gold price significantly impacts the stock market. Therefore, international investors who invest in gold do not provide hedging and portfolio diversification benefits to equity sectors. In a same vein, the crude oil price has a considerable influence on stock markets. Hence, the tendency in global crude oil price must be accounted to explain entry and exit points for investors in equity segment.
Global oil price remarkably influences the foreign exchange rate in Hungary. This suggests that increasing oil price acts as an incentive to the depreciation of the Hungarian currency. This finding applies to policymakers. Depreciation of domestic currency is able to reduce the benefits of increasing oil prices as an oil-importing country. Therefore, it would indicate that the currency valuation should be managed to take full advantage of higher oil prices. Furthermore, policymakers regarding exchange rate stability should pay attention to changes in the oil market and what has been happening in the local currency market, and they need to be careful because the influence of oil price innovations varies by country, whether the oil price innovations are positive or negative.

CONCLUSION
This paper examines the interplay between global commodity and Hungarian equities markets. To this end, we employ the dynamic conditional correlation DCC-GARCH model alongside with the wavelet coherence methodology to determine whether the intercorrelation between both markets evolve and depend on the time and frequency.
Our main findings can be summarized as follows. First, the return correlations are time-varying in terms of various phases over the sample period except for the cases of the crude oil and the Budapest stock exchange. The plot of the values of conditional correlations highlights higher correlations between crude oil prices and Budapest stock exchange; between gold prices and Hungarian currency. The short period of negative correlations between crude oil, gold prices, and the exchange rate are also observed. This scenario would be indicative of investors changing from risky assets such as the stock market to the perceived safe haven like gold (Jain and Biswal, 2016). Second, the estimation results of wavelet coherence indicate that the global commodities markets have a significant impact on the Hungarian financial markets in the short run, but the crude oil and gold markets are influenced by stock and exchange markets in Hungary in the long run.
On the whole, our findings seem to be a considerable opportunity for investors and portfolio managers to invest in Hungarian markets with a better understanding of the interconnectedness among the selected variables. Further, these results also have important implications for Hungarian portfolio management, as well as the financial risk management and provide straightforward insight for monetary and fiscal policies by taking into account the pressure of the international crude, gold prices generating on the stock and exchange rate markets.