Providing a Network for Measuring the Dynamics Volatility Connectedness of Oil and Financial Markets

Various studies have shown that markets are not separated and that fluctuations in different markets affect each other. Therefore, awareness of connectedness is needed for investors and policymakers for making appropriate decisions. The aim of this paper is to measure the dynamics connectedness of selected stock markets in the Middle East, oil markets, gold, the dollar index, and euro-dollar and pound-dollar exchange rates during the period February 2007 to August 2019 in networks with different weekly horizons. In this paper, we intend to evaluate the pairwise impact of crude oil and the Middle East stock markets, in particular on the Tehran Stock Exchange, and to analyze this variance using different time horizons. The results show that in all time horizons the variance of forecast error in most markets is due to the shocks themselves. The Saudi Arabian Stock Exchange has the most impact on other Middle Eastern stocks. The dynamics connectedness of the oil markets is remarkable, however, as the time horizon increases, dynamic connectedness between the two markets decreases and they are mostly affected by other markets, especially the Middle East stock exchanges except for Iran. Moreover, Iran stock market is an isolated market. About the gold market, there is a significant connectedness with the pound-dollar exchange rate and gold market; however, the dynamics connectedness of this market with other markets are not significant. Therefore, this market and Iran stock exchange can be used as a tool to hedge risk for investors.


1-Introduction
The expansion of globalization has made the financial markets of different countries more influential than ever before. However, the increasing dynamics connectedness between its financial markets can be seen as a vulnerable factor in hitting any one market because volatility in one market can spread to other financial markets as well. For example, the 2008 financial crisis that began in the US mortgage market spread to most of the world's financial markets, causing a deep recession in many countries. Many studies have cited oil price fluctuations as the external factor causing shocks in the economies of countries, including Hamilton [1], Kilian [2], and Bagheri and Ebrahimi [3]. Oil price shocks affect macroeconomic variables such as stock market, inflation, growth rate, business cycle and dollar equity. These shocks can have a significant impact on many macroeconomic variables such as stock market, inflation, growth rate and business cycle. Given the significant fluctuations in oil prices in recent years and the important role oil plays in the economies of many countries, many researchers and policy makers are looking for evidence that these fluctuations are affecting other financial markets. Since Iran is one of the greatest oil exporters, it is important to measure the dynamics connectedness of the oil market and the Iranian stock market. In addition, many investors tend to trade in markets having less spillover risks of other markets. The purpose of this article is to investigate that how do markets connected to each other in different time horizons? Also this study aimed to present networks in different time horizons to investigate the dynamic connectedness of oil, gold, foreign exchange and stock markets using the variance decomposition method introduced by Diebold & Yilmaz [4] in 2014. The present study is composed in 5 sections. After the introduction in the first section, we present the background of the research. Then, in the third part, research methodology for measuring the relationships between markets is explained. Section 4 shows the results of applying the research methodology and section 5 provides the conclusions.

2-Review of The Literature
Many researchers have focused on various models in order to investigate the connectedness of markets and companies [5,6,7]. In 2014, Diebold and Yilmaz presented a structure that was based on the analysis of variance of an autoregressive model to accurately measure the dynamics of connectedness among the 13 insurance companies listed on the US Stock Exchange. Then, using this approach in order to present a network based on graphs that show the connectedness of different companies. Jahangiri and Hekmati [8] utilize the variance decomposition and markov switching regime models during April 2002 to September 2014 to examine the dynamics connectedness between Tehran Stock Exchange, currencies, oil markets, gold, US stock market and the European stock markets. The gold and oil markets act as intermediary markets for transmitting shocks between the world's major stock markets and asset markets in Iran respectively. Meghyereh et al. [9] using implied volatility indices and variance decomposition approach, examined the dynamics of connectedness of oil to US securities, eurodollar exchange rates, precious metals including gold and agricultural commodities. The results showed that there was a significant risk of transmits from oil to stocks and precious metals, but there was a little risk of transmitting to agricultural commodities. The pairwise connectedness of stock was 24.4 percent, while that for wheat, corn and soybeans were 1.6, 1.0 and 2.0 percent. Moreover, the spillover risks from all these markets to oil was low. Mamipour and Feli [10] examine the spillover effects of oil price fluctuations on the returns of selected industries on the Tehran Stock Exchange by using the variance decomposition approach during November 2008 to April 2016. Also, the oil spillover effects of periods of high and low volatility on the stock market were analyzed by using the Markov Switching Model. The results show that the effects of volatility spillover from the oil market to the stock market in the low volatility regime were lower in most industries than the high volatility regime, and spillover fluctuations in the high volatility regime occurred more widely. Singh et al. [11], using the variance decomposition model, examined the dynamic linkage and the path between the dimensions of a given crude oil disorder and the exchange rate of the 9 major currency pairs for a sample period from May 2007 to December 2016. They found that the crude oil market had a significant impact on the currency market. In addition, the bilateral currency pair dynamics between the pair indicated that the euro-dollar was more sensitive to oil price fluctuations than any other major currency pair and was a major currency that transmits specific shocks to other currencies. Husain et al. [12] analyzed the dynamics connectedness of crude oil prices, stock indices, and metal prices for the US economy from 1990 to 2017 using the Diebold & Yilmaz model. Research has shown that palladium, gold, platinum and silver transmitter of the shocks while crude oil, titanium and steel are receiver of the shocks. Alyahyaee et al. [13] analyzed spillover risks between commodity futures (energy and precious metals) and GCC stock markets. By using dynamic correlation models and variance decomposition models, they found significant spillover risks between GCC commodities and stock markets, especially during the global financial crisis. Precious metals (excluding silver) and WTI are net risk transmitters to GCC markets. Moreover, portfolio management analysis shows that a combination of GCC commodities and stocks provides diversification opportunities for different periods of crisis. Fasanya& Akinbowale [14] investigated the dynamics of volatility connectedness between the crude oil market and agricultural commodities in Nigeria using the variance decomposition approach over the period 1997 to 2017. The researchers showed that there were reciprocal relationships between these markets.
Yoon et al. [15] also used the variance decomposition approach to measure the dynamics connectedness of various markets such as crude oil, stocks, gold, currencies and bonds from December 1999 to June 2016. The results showed that the dynamics of the connectedness of markets reached their highest level in the financial crisis of 2008. Furthermore, gold can be chosen as a viable option for hedging investment portfolio risk due to poor connectedness with other markets. Finally, they showed that the US stock market is the most important transmitter of shocks to other markets.

3-Methodology
In this study, we measure the dynamics of volatility connectedness between Iran, Saudi Arabia, Turkey, United Arab Emirates stock markets, crude oil, foreign exchanges and gold market simultaneously across different time horizons. Networks are offered According to the connectedness, and time horizons. In order to obtain the weekly volatility of markets, the proposed model of Parkinson [16] is used. Therefore, in general, the variables under consideration are calculated as Equation (1), where is the highest weekly price and the lowest weekly price.
They used the "generalized identification" framework of Koop, Pesaran, and Potter [17] and Pesaran and Shin [18], which produces variance decompositions invariant to ordering. To introduce this approach, we first considered an N variable vector that is modeled as a p-order vector regression system: Here, i  is the NN  coefficients matrix, t  is the vector of disturbed components with uniform and independent distribution and  is the variancecovariance matrix. Equation 3 shows the moving average representation of the p-order vector of the above auto-regressive system: This approach is based on the H-step-ahead forecast-error variance decomposition for each N variable contained in the N variable VAR. In this approach, it is possible to investigate part of the variance of forecast error variable i which can be attributed to the shocks caused by variable j and compute the total dynamics connectedness index by summing these effects.
In the above equation, Σ is the variance matrix of the vector of errors, jj  denotes the standard deviation of the error term in the jth Equation. is an N × 1 vector with 1 on the ith element. In the generalized variance decomposition framework, the shocks entered into each variable are not orthogonal necessarily so the sum of each line of variance decomposition matrix will not equal one (i.e 1 ( ) 1 Therefore, to use the information contained in the variance decomposition matrix to calculate the dynamics connectedness index, each component of this matrix can be normalized by dividing it by the sum of rows such that: Now provides a measure of pairwise directional connectedness from j to i at horizon H. As a matter of notation, we change to Ci←j (H), which represents the transmission "To" i from j.
Using the normalized components of the variance decomposition matrix, we can calculate the total dynamics connectedness index (C). This index calculates the reciprocal spillovers by measuring the spillover of the shocks entered by all N variables into the total variance of forecast error. The total dynamics connectedness index will be as follows: In dynamics connectedness analysis, it would be appropriate to examine the direct effects of (or towards) a particular market. Utilizing the generalized variance decomposition framework allows to measure the directional dynamics connectedness (DC) indices of the spillover effects received in market i from all other j markets: An appropriate index that measures the effects of spillover transmitted from market i to all other markets is defined as follows: Using the preceding two equations, we can directly calculate the net NC (Net connectedness) index for market i: In order to determine whether or not one market is generally more influential than the other markets, we need to obtain the net dynamics connectedness index obtained by equation 9 in-degree and out-degree and total connectedness is mean degree. However, the network is complicated for some reason than the classical network definition. First, the connections are balanced and directional. In addition, these weights can change over time.

4-1-Data and Summary Statistics
In this research we use weekly data of different markets and generally data was divided into four general sections as follows: A According to the Jarque-Bera test, the normality of distribution of all variables is rejected at the 1% level. Figure (1) shows the trend of series during the study period. The amount of skewness in each time series indicates the tail is on the right. Given the degree of Kurtosis in each time series, they can be assumed to be fat tail.

4-2-Estimating Dynamics Connectedness
In this section, we designed a system to measure the dynamics connectedness index and calculate it using the method proposed by Diebold and Yilmaz in three different time horizons. We consider the dynamics connectedness of different markets in the time horizons of 1 week, 10 weeks and 100 weeks is presented in Tables (2), (3) and (4) to consider short-term, medium -term and long-term respectively. In the dynamics connectedness table, which is the adjacency matrix of networks, In fact the (i,j)th element of each table shows the estimated contribution to the forecasterror variance of variable i coming from innovations to market j. The diagonal elements (i = j) are the own variance. Each row corresponds to a market representing variance of the forecast error of the market itself and other resulting from this market and other market shocks. Each column also represents the market share in the variance of the forecast error of other markets. Considering Table (2), we find that in the 1-week time horizon, most of the variance of forecast error is due to the shocks that arise from themselves. The Tehran Stock Exchange has the highest rate with 98.52 and the lowest rate belongs to the pound/dollar equaling 46.67%. The Tehran Stock Exchange has little relation to other markets. However, other securities markets in the Middle East have more dynamics connectedness with other financial markets of the world, and there is also a significant relationship between Tadawal and EDX General in the 1-week time horizon. With regards to oil markets, there is a significant relationship between the West Texas Intermediate market and the Brent market. Among the security markets, the Tadawal and ADX General had the most dynamics connectedness in the short term with the oil markets. The West Texas Intermediate dynamics connectedness Index and the euro/ dollar showed a significant contribution compared to other markets. With regards to the currencies and the dollar index, it is apparent that all of these markets have strong dynamics connectedness to each other. However, the dynamics connectedness of euro-dollar and the dollar index is more impressive. There is a significant relationship between the gold market and the pound-dollar, however, the dynamics connectedness of gold market with other markets was insignificant in the short-term time horizon. Overall, in terms of net dynamics connectedness, the euro-dollar is the most shock transmitter and the pound-dollar receives the most shock from other markets. Figure (2) shows the short-term dynamics connectedness of different markets across the network. Considering Table (3), we examined the dynamics connectedness of markets in the 10-week time horizon. Similar to 1-week, the variance of forecast error of most markets arise from the shocks themselves. However, this number was lower than the short-term time horizon. Tehran Stock Exchange had the highest with 95.29% and West Texas Intermediate had the lowest with 29.5%. An examination of the oil market shows that both markets studied in the 10-week time horizon were the biggest recipients of shocks compared to other markets. The strong dynamics connectedness is observed between the West Texas Intermediate and Brent oil markets. However, the Tadawal and ADX General also have significant impacts on the oil markets, which is greater than the short-term time horizon. Tehran Stock Exchange has no significant relationship with other financial markets like 1-week time horizon. However, among the financial markets, it is more influenced by Istanbul Stock Exchange and the dollar index. By examining other stock markets in the Middle East, it is visible that there are significant dynamics connectedness between these markets, and the Tadawal and ADX General transmit the most shock to other markets and have the most impact. Moreover, compared to the 1-week time horizon, dynamics connectedness among markets have increased. Similar to the short-term time horizon, the dynamics connectedness between the euro-dollar and the dollar index as well as the pound-dollar and gold are remarkable with the difference of a slight decrease over the 1week time horizon. Figure 3 shows a full view of the dynamics connectedness between these markets. In terms of the long-term relationships of markets, we find that although most of the variance of forecast error is due to the shocks of those markets, this number declines compared to other time horizons. So we can conclude that in the long run, the time horizon of market shocks has a greater impact on other markets. By examining the oil markets, the impact of these markets on the stock markets has increased significantly in the long term. The Saudi and UAE stock markets have significant long-term effects on oil markets. However, the share of the Tehran Stock Exchange market is negligible again. Overall, the Tehran Stock Exchange is a market with little dynamics connectedness with other global markets, however, with the Istanbul Stock Exchange, the Dollar Index and the euro-dollar have the most long-term relationships with this market. The dynamics connectedness of other stock markets in the Middle East has increased and, similar to other time horizons, Tadawal and ADX General have more dynamic connectedness than other stock markets. Gold's connectedness with the stock markets has not changed much. However, the market's relationship with the pound-dollar remains significant. Considering currencies, euro-dollar is more influential in these markets and there are significant dynamics connectedness in the 100-week time horizon between the two indices and the euro-dollar. A net dynamics connectedness also shows the that in the long-term oil markets are affected by stock markets. The total dynamics connectedness of these markets also increase with the expansion of time horizon and they are 40.09%, 54.61% and 58.31%, respectively. Figure 4 shows the dynamic connectedness of all markets in the 100-week time horizon.

5-Summary and Conclusion
In this study, we provide a system to measure the dynamics connectedness of different global markets from February 2007 to August 2019 in three time horizons of 1 week, 10 weeks and 100 weeks. The results show that most of the variance of forecast error is due to the shocks of those markets themselves, and as the time horizon increases, dynamics connectedness between markets increases. The Tehran Stock Exchange has insignificant dynamics connectedness with other financial markets, while, the dynamics connectedness of other Middle East markets is significant. Since the Tehran Stock Exchange and the Gold Market did not have significant relationships with other global markets, they can be used as suitable investment choices for portfolio managers to hedge their risks. In the long-term time horizon, oil markets mostly receive and the stock markets transmit the most shocks. In the long-term time horizon, shocks from each market have a greater impact on other markets. Due to the significant volatility connectedness in the markets, especially between the Saudi and UAE stock exchanges and the oil markets, it is suggested that investors consider this phenomenon when investing. In addition, considering the impact and the volatility connectedness of some markets and the Tehran Stock Exchange, especially in the long run, the Securities and exchange organization, should carefully monitor the fluctuations of these markets to make decisions effectively preventing potential shocks. Future research proposes a better analysis of the dynamics connectedness of markets, given the greater number of stock markets around the world and the use of the LASSO (least absolute shrinkage and selection operator) model to more accurately estimate vector auto regression (VAR).