Global connectivity between commodity prices and national stock markets: A time-varying MIDAS analysis

In this paper, we provide a comprehensive study of the linkages between global commodity price shocks and national financial markets. We consider an overall price index, three proxies of global oil shocks (overall, supply and demand) and non-oil (metal) price shocks and assess their causal relationships with the stock prices of a large set of heterogeneous countries in terms of development. Using a mixed-frequency VAR approach in a time-varying set-ting, we construct a Global Commodity Connectivity Index and a Global Stock Connectivity Index to monitor the prevalence, over time, of Granger-Causality from commodities to stock markets and vice versa. Our results show the exis-tence of time-varying causality during the observed period depending on the level of country development and the position on the global commodity shocks super-cycles: the commodities depression of the 1980s and 1990s, the commodity boom of the 2000s and the post-Global Financial Crisis.


| INTRODUCTION
Large swings in commodity prices are a historical reality. It is not surprising, then, that several studies have investigated the impact of commodity prices on national macroeconomic conditions. 1 In this paper, we concentrate in particular on the relationship between commodities and financial markets. Such a relationship is important for a number of reasons. From an economic development perspective, overexposure to commodities can reduce the 'depth' and 'width' of national stock markets, as the excessive volatility of world commodity prices translates into riskier and more expensive equity financing for local firms (see, Aghion, Angeletos, Banerjee, & Manova, 2010). 2 Also, from a macroeconomic perspective, large swings in commodity prices make commodity-dependent countries more vulnerableirrespective of whether they are commodity exporters or importersto fiscal, balance of payments, demand and supply shocks (Cashin, McDermott, & Scott, 2002). From a finance perspective, the financialisation of commodity markets over the last decades has opened further avenues for investors to diversify their investment portfolios (e.g., Domanski & Heath, 2007;Dwyer, Gardner, & Williams, 2011;Silvennoinen & Thorp, 2013;Vivian & Wohar, 2012). Investing in commodities can help diversify risk and, thus, a mix of commodities and stocks may yield a better risk-return trade-off than just investing in stocks (see Erb & Harvey, 2006). At the same time, however, Nissanke (2012) notes that swings and volatility in commodity prices (with the above-noted development and macroeconomic consequences) can be due to the increasing linkages between commodity and financial markets.
Past studies on the matter have, mostly, concentrated on oil and, to a lesser extent, on non-oil commodities. 3 Besides, these studies have more often focused on developed economies, such as the US and EU countries, rather than middle-and low-income countries.
The relationship between world commodities and stock markets may differ across countries throughout their stages of development. The recent decline in the importance of oil and the complicated liaison between middle-and low-income countries and commodities mean that causal links between commodities and stock markets may be different across country groups and may change over time. Indeed, over the last decades, many countries have considerably improved their living standards and developed their national stock markets. 4 Hence, a time-varying analysis is particularly critical.
In this paper, we contribute to the literature by providing an examination of the relationship between world commodity prices and national stock markets. First, we look at several price indices, starting from a general world commodity price index and then delving into separate oil (demand and supply) and non-oil (metal) prices. Second, we adopt a mixed frequency vector autoregressive (MF-VAR) model due to Ghysels, Hill, and Motegi (2016), which helps with potential issues arising from temporal aggregation and leads to causality tests with better size and power. Third, we perform the analysis in a time-varying setting. This step is essential, since, over the last decades, the structure of the global economy and the dependence of countries on commodities have undergone significant changes.
The performed analysis leads to a very large set of bilateral results that change across countries and over time. In order to summarize this evidence and comment on the observed global trends in the relationship between commodity shocks and stock markets, we calculate and present our results in the form of Global Commodity and Global Stock Connectivity Indices, reporting the share of statistically significant Granger-causality links from commodities to stock markets and vice versa. While this analysis is not informative of the strength and sign or the relationship, implicit in the bilateral regressions, it does provide valid and interesting inference on how the financial markets-commodity dependence has evolved over time. 5 In anticipation of some key results, our evidence suggests that the relationship between commodities and stock prices varies depending on commodity, income group and period. We broadly identify three periods: the commodities depression of the 1980s and 1990s, the commodity boom of the 2000s and the post-Global Financial Crisis (GFC). For the overall price index, we find prevalence of commodities prices causing stock market prices during the 2000s and, for low and lower-income countries also in the 1980s. World oil prices tend to increase their relationship with stock markets. However, the GFC marks a decline in the importance of shocks from stock markets to oil, mostly driven by highincome countries. The distinction between oil supply and demand shocks allows us to show how the influence of the former declines globally over time (with the exception of high-income countries) and the latter matters greatly during the 2000 commodity price boom, globally, but especially for high-income countries. Finally, the evidence on metal prices shows that after the GFC their relevance increases in low and lowermiddle income countries and declines their relevance in high-income countries.
The rest of the paper is organised as follows. A brief review of the literature on the effects of global shocks on stock returns is presented in Section 2. Section 3 illustrates the methodological approach in the form of the mixed-frequency VAR model and Global Connectivity Indices. Sections 4 and 5, respectively, describe the data and discuss the empirical results on the dynamics of global shocks and stock market returns. Section 6 concludes.

| LITERATURE REVIEW
Investigations of the relationship between commodity prices and stock returns have mostly focused on oil, using single frequency VAR methods. 6 The earlier study of Jones and Kaul (1996) examines the impact of oil price changes on output and real stock returns in Canada, Japan, the UK and the US and finds that, except for the UK, oil prices Granger-cause both stock returns and output. Huang, Masulis, and Stoll (1996) use a VAR approach and find no relation between daily oil futures returns and daily US stock returns in the period from 9th October 1979 to 16th March 1990. A VAR approach is also used by Sadorsky (1999), who confirms that monthly oil prices and oil price volatility both play an important role in the US economic activity. Driesprong, Jacobsen, and Maat (2008) use monthly stock market data for 48 countries and a standard linear regression model to analyse the oilstock market relationship over the period between October 1977 and April 2003. The authors find that changes in oil prices predict stock market returns worldwide, and an oil price rise drastically lowers future stock returns. They also find that changes in oil prices do not predict future market returns in three out of the 18 developed markets considered (Hong Kong, Japan and Singapore), While the oil prices predict future market returns in 11 of the 30 emerging markets considered (Brazil, Finland, India, Ireland, Israel, Jordan, New Zealand, Portugal, South Korea, Taiwan and Thailand). Further, Cong, Wei, Jiao, and Fan (2008) fail to find evidence of a relationship between oil prices and real stock returns in China using a standard VAR framework.
As mentioned in the introduction, some papers report evidence of time-varying relationship between oil and stock markets. However, this literature focuses mainly on the developed economies. For example, Ciner (2001) uses a non-linear Granger causality approach to examine the dynamic linkages between daily oil future prices and the US stock market. The author uses two data samples for the periods 9th October 1979-16 March 1990 (same as Huang et al., 1996) and 20th March 1990−2nd March 2000. The study finds significant non-linear Granger causality from crude oil futures returns to S&P 500 index returns in both samples. There is also evidence that stock index returns affect crude oil futures, suggesting feedback effects. Park and Ratti (2008) use linear and non-linear multivariate VAR specifications to estimate the effects of oil price shocks and oil price volatility on the real stock returns for a sample of 14 developed countries. They find that oil price shocks have a statistically significant contemporaneous or one-month-lag impact on real stock returns. Apergis and Miller (2009) examine whether oil price changes affect stock-market returns in a sample of eight developed countries over the period from 1981 to 2007. 7 Their results suggest that real oil price shocks temporally cause the stock market returns in Germany, Italy, the UK and the US. In the case of Australia, only oil supply shocks temporally cause stock market returns, whereas in the case of France, only global oil demand shocks temporally lead the stock market returns. For Canada and Japan, they uncover no causality. Kang, Ratti, and Yoon (2015) use a time-varying VAR model to examine the impact of oil price shocks on US stock market returns on monthly data for the period January 1968-December 2012. They find that oil price shocks contain information for forecasting US real stock returns, while the coefficients and the nature of shocks change over time.
Some papers have investigated the link between commodity prices and stock returns in developing economies. Wang, Wu, and Yang (2013) find limited evidence for the effect of monthly oil prices on stock market returns for a set of nine oil-importing and seven oil-exporting countries over the period from January 1999 to December 2011. 8 In detail, the empirical tests show that oil price shocks are more likely to influence stock market returns in oilexporting countries than in oil-importing countries; however, there is no significant (non-linear) causality from oil price changes to stock market returns for most countries in the sample. The only two exceptions are Norway and Russia, both of which are oil exporters. In a recent study, Mensi et al. (2018) use daily data to examine the comovements between commodity prices, that is, gold and oil, and BRICS stock markets from 29th September 1997 to 4th March 2016. Their results, based on the wavelet approach, show that BRICS stock returns co-move with the WTI crude oil price at long horizons. Moreover, the authors find stronger co-movement at the onset of the GFC. No evidence of co-movement is detected between the BRICS stock markets and gold prices over time and across frequencies (horizons). The latter implies that gold can act as a hedge or a safe haven for BRICS economies against extreme market movements. Although the authors provide a good overview of the co-movement between commodity prices and stock markets for the five developing economies, directional predictability is not discussed and remains an open question.
We extend the above literature in a number of ways. First, we consider a broader set of price indices, from a general commodity price index to specific commodities, such as a global metal price index and separate oil demand and supply shocks. Besides analyzing the overall role of commodities, specific prices can be more relevant to specific countries (e.g., oil prices for oil-dependent countries) or to specific moments in time (e.g., metals in times of crisis). Metals are also critical inputs in many industries and therefore are essential to consumer countries (Rossen, 2015) and represent the primary source of export and fiscal revenues for many developing countries (Cashin et al., 2002). We also investigate the time-varying nature between world commodity prices and financial markets. Instead of resorting to temporal aggregation that leads to loss on information, particularly in the case of developing countries, we use the mixed-frequency approach developed by Ghysels et al. (2016) and combine time series at different sampling frequencies. As a result, we are using more countries, especially those where high-frequency data is not readily available, such as developing countries. Again, in junction with the longer observed period, this allows us to look at changes over time that are particularly relevant for developing and less developed countries.

| ECONOMETRIC METHODOLOGY
In order to investigate the relationship between world commodity prices and stock markets, we exploit VAR and Granger causality tests in a time-varying setting. As mentioned above, we rely in particular on the MF-VAR approach proposed by Ghysels et al. (2016), as briefly discussed below.

| Mixed frequency VAR
The MF-VAR model is an observation-driven model that directly relates to the standard VAR model settings and is suitable for Granger causality tests (Ghysels, 2016). Using the notation of Ghysels et al. (2016), we denote m to be the ratio of sampling frequencies, that is, the number of high-frequency periods in each low-frequency period τ ℤ. Thus, let τ ϵ 1, 2, …,T L f gbe the time sequence, here at the monthly frequency. Let CP(τ, j) denote the series of commodity prices at the jth week of month τ with jε{1, 2, 3, 4} while SP(τ) denotes the series of stock prices at month τ. Section 4 provides further details on the data.
Assume that each series is sufficiently differenced to satisfy covariance stationarity. The variables are at weekly and monthly frequencies, so that m = 4. Then, the MF-VAR(p) model is specified as follows: A k is a square matrix of coefficients for k = 1, …, p, where p is the lag length; ε (τ) is the vector of residuals, where ε (τ) $(0, σ 2 ), σ 2 > 0. All weekly observations are stacked in each month τ to obtain Ghysels et al. (2016), the constant is not included in (1) and X(τ) is pre de-meaned. 9 The lag length is selected using the Bayesian Information Criterion (BIC). The MF-VAR(p) model in (1) can then be written as In line with Ghysels et al. (2016), our model obeys the following assumptions. 10 First, all roots of the polynomial This is a standard assumption to ensure validity of the bootstrap for VAR models (see, for example, Kilian, 1998;Paparoditis, 1996). In fact, these assumptions ensure the consistency and asymptotic normality of least squares estimatorÂ k : 11 Next, we exploit Wald statistics based on the coefficients of the MF-VAR(p, h) at test horizon h (h = 1 in our Granger-cause SP given a mixed-frequency information set equal to a 51,1 = … = a 52,1 = … = a 53,1 = … = a 54,p = 0 1 × m whereas SP does not Granger-cause CP given a mixedfrequency information set equal to a 15,1 = … = a 25,1 = … = a 35,1 = … = a 45,p = 0 m × 1 . Therefore, the null hypothesis of non-causality is a linear restriction defined as: where R is a selection matrix of full row rank q. The complete details of the construction of R can be found in Ghysels et al. (2016). r is a restricted vector and zeros are always chosen when performing Granger causality tests. Thus, the null hypothesis of (p, h) MF Granger causality test can be expressed via the following Wald statistic: where T Ã L T L − h + 1 is the effective sample size of the MF-VAR(p, h) model;B h ð Þ is the least square estimator of the MF-VAR(p, h) model;P p h ð Þ is the positive-definite covariance with the assumptions given in Ghysels et al. (2016), and W T Ã L H 0 h ð Þ ½ ! d χ 2 q under H 0 (h). Further, we adopt a time-varying approach to account for the likely structural changes occurring during the historical time period considered, especially in fast-growing emerging markets. To this end, we follow Chen, Rogoff, and Rossi (2010) and use a rolling, rather than recursive, window estimation as it adapts more quickly to possible structural changes. The rolling procedure is relatively robust to the presence of time-varying parameters and requires no explicit assumption as to the nature of the time variation in the data. In line with Chen et al. (2010), we use a rolling window with size equal to half of the total sample size. Lastly, following Ghysels et al. (2016) to circumvent size distortions for small samples τϵ{50, 100} we employ parametric bootstraps a-la- Gonçalves and Kilian (2004), 12 Wald statistic p-values based on the nonrobust covariance matrix and bootstrap with N = 499 replications. Finally, we use Newey and West's (1987) kernel-based HAC covariance estimator with Newey and West's (1994) automatic lag selection. Hence, we compute the resulting p-value of (4), defined as: where the null hypothesis

| Time-varying global connectivity
In order to assess the overall level of connectivity between global commodity prices and national stock markets, we use two Global Connectivity Indices, defined as the ratio between the number of identified Granger causal links and the total possible links for each rolling window. We construct a Global Commodity Connectivity Index (GCCI) to monitor the prevalence over time of Granger-Causality from commodities to stock markets: where N * is the total number of countries at time period t Ã L , where N * ℕ and t Ã L 1, 2…, ; ω is a given country, where N * & ω; α is the significance level, where α = 0.1. Analogously, we construct the Global Stock Connectivity Index (GSCI) that depicts the prevalence over time of Granger-Causality from stocks returns to commodity markets. In the next sections, we outline the data used in the analysis and then discuss the results.

| DATA
The empirical analysis uses mixed monthly and weekly data for financial and commodity markets, respectively, on 61 countries over the period from January 1951 to March 2018. The start date is dictated by data availability. Indeed, the more distant into the past one goes, the less stock market data are available at daily or weekly frequency, especially for developing and less developed countries. In the end, we have decided to use monthly stock market data, which allows us to construct a larger data set and is also consistent with previous studies. 13 This allows us to observe a larger number of countries than otherwise possible. Data on world shocks are available, instead, at a weekly frequency. All data are sourced from the Thomson Reuters Datastream database. Online Appendix B provides a detailed list of the series definitions and a set of summary statistics.
Global shocks are measured by five proxies: world oil price, world oil demand, world oil supply, world commodity prices (which include all prices) and world metal prices. The sample period considered is sufficiently long to take into consideration regional and international economic events and makes it important to allow for timevarying relationships. Following Kilian and Park (2009), the stock index returns are calculated as log returns, that is, SP R t = ln SP t ð Þ−ln SP t − 1 ð Þ. As a proxy for world oil price level, we use the weekly price data of West Texas Intermediate (WTI) crude oil. The WTI oil price is widely used as the benchmark for oil pricing and is highly correlated with the two other benchmark oil prices Brent and Dubai (see Kilian & Park, 2009;Phan, Sharma, & Narayan, 2015). The WTI price data are denominated in US dollars and are obtained by averaging daily data from Datastream.
In addition, we use two different approaches to obtain proxies for global oil supply and demand (Kilian, 2009). As a proxy for supply, we use weekly global oil production data (from Datastream) and, as a proxy for demand, we use the weekly Baltic Exchange Dry Index (BDI), consistent with Bakshi, Panayotov, and Skoulakis (2010). The BDI is consistently and highly correlated with the global oil demand proxy constructed by Kilian (2019). The BDI is used in nominal terms in order to retain consistency with the stock index series. We use the weekly Commodity Research Bureau (CRB) Spot Index as a proxy for the world commodity price. This index is broadly used in the literature as a proxy for global commodity prices (see Silvennoinen & Thorp, 2013). Also, we consider the weekly CRB Metals Sub-Index as a proxy for global non-fuel commodity prices.
The selection of a metal price index as representative of the world non-fuel prices is in line with the most recent commodity-stock market literature (see Beckmann, Belke, & Czudaj, 2014). Finally, all of the above series are denominated in US dollars and are calculated as log returns. All series are found to be stationary using the Augmented Dickey-Fuller (ADF) and Phillips-Perron (PP) unit root tests. 14 Figure A.1 in the online Appendix A shows the time dynamics of the above series. In our results, we concentrate on the period starting from January 1986 in order to compare results across different commodities. In broad terms, three sub-periods are comprised in the data: the commodities depression of the 1980s and 1990s characterising all indices, the super-cycle of the 2000s and the post-GFC with a marked decline and quick recovery.
We consider the full sample and then three possible country groupings: high-income, upper-middle-income and low and lower-income countries. The grouping of the countries is made based on the World Bank Analytical Classifications as of June 2020. Due to the limited data availability, the low and lower-middle income countries are combined in a single group.

| EMPIRICAL RESULTS
The methods discussed in Section 3 have been applied on a country-by-country basis both over each respective full period and in a time-varying setting. This analysis returns, as it can be imagined, very fragmented evidence that can be broadly summarised by the fact that specific shocks to a specific commodity are found to be more important one moment in time and not important in another; and similarly in the other direction when one considers the role of stock market shocks for commodities. We do not report this extensive evidence here, but we are happy to make it available upon request. Instead, we summarise it and report it using the 'connectivity' indices described in Section 3. These allow us to describe and comment on the overall trends of Granger-causality over the period. Further, as mentioned above, we limit here our reporting to the period after 1986, where we have at least 20 countries in the sample. At the end of the sample, as it can be seen from Figure  tivity Index (GSCI) discussed in Section 3.2, for all five price indices. These include the overall world commodity index (WCI), for world oil price index (WOI), the world oil supply index (WOSI), the world oil demand index (WODI) and the world metal index (WMI). Since the time-span availability differs across commodity price indices and countries, we standardise the starting date from January 1986, the earliest date for the world oil price series. The sample of countries increases over time from 24 to 61 in this period. 15 Figure 1 shows the GCCI and GSCI for the WCI. For all countries, the evidence points to a period average of around 12% of rejection of Granger non-causality in both directions with more prevalence of Granger-causality from commodities to stock markets than vice versa. However, there is more evidence of causality from commodities to stock prices from the second part of the 1990s to throughout the 2000s, with a peak at 20% of cases against less than 4% in the other direction. Interestingly, this period coincides with the so-called commodity boom period that followed the 'great commodities depression' of the 1980s and 1990s. The other panels of the same figure show how the cases of significant Granger-causality are divided among different income groups. Causality mostly runs from commodities to the stock markets of low and lower-middle-income countries in the 1980s and from the second part of the 2000s. For upper-middle-income countries, there is a prevalence of Granger-causality from commodities to stock markets from the early 1990s to the run-up of the financial crisis; with subsequent lack of causality in both directions since then, suggesting a decoupling of commodities and stock markets. The stock markets of high-income countries dominate over commodity prices until the middle of the 1990s, and after this period, there is more evidence in the opposite direction. until the middle of the 1990s. Subsequently, there is increasing evidence of Granger-causality in both directions until the GFC. This increase is in line with the rising financialisation of commodity markets. However, the GFC seems to have created a break with causality from oil to stock markets still rising, and the causality from stock markets to oil going down. The results in Figure 2 shows that this evidence is shared across all income groups, but it is mostly driven by high-income countries.

| World oil price indices
It is interesting to further investigate the above evidence by looking at oil supply and oil demand shocks, as reported in Figures 3 and 4. Again, we note marked differences that enhance the interpretation of Figure 2. Figure 3 shows declining evidence, over the observed period, of causality from oil supply shocks to stock prices (from 30/40% of cases to 10%) and increasing evidence of causality from stock prices to oil supply (from no evidence to around 10%). This result is in line with the smaller historical relevance of oil producers in the determination of oil prices during this period. The disaggregate income group evidence helps to shed light on these trends. In particular, the decline in the dependence from oil supply shocks is mostly a feature of low and lower-middle-income and upper-middle-income countries. The evidence of the increasing role of stock markets for oil supply from the mid-2000s onwards is due to the set of high-income countries moving from no evidence of causality to around 20% of cases. For these countries, the role of oil supply shocks on stock markets varies over time around an average of 12% of cases.
It is interesting to compare this evidence against the role of oil demand. Figure 4 uncovers interesting patterns. From the beginning to the end of the observed period, there is a historical decline in the evidence of Granger-causality from stock markets to oil demand.
Until the year 2000, stock markets affect oil demand more than the other way round. During the 2000s, corresponding to the spike in oil demand often associated with the BRICS, the evidence is reversed, and commodity prices tend to dominate over stock markets. In the first part of the decade, there is a peak at around 50% of Granger-causality from oil demand shocks to stock markets. In the following part of the decade, the role of oil demand shocks becomes very low, and there is again a prevalence of stock market shocks over oil demand shocks. The sub-groups evidence shows that these overall trends are shared by high-income countries. At the same time, the prevalence of stock markets over oil demand shocks is a more distinct feature of lower and middleincome countries in the 1980s and 1990s; and the prevalence of oil demand shocks over stock markets is a more distinct feature of high-income countries.

| World metal index
Finally, in Figure 5, we consider world metal prices. Over the full sample, there is stable evidence of Grangercausality from stock markets to metal prices for between 10% and 15% of cases. The evidence of Granger-causality from metal prices to stock markets increases over the observed period, especially from the beginning of the 2000s and shortly after the GFC. However, this evidence decreases towards the end of the sample when stock markets are more prevalent than metal prices. The panels of Figure 5 also show marked differences across income groups. Stock markets are prevalent for low and lowermiddle-income countries and for high-income countries.
Metal prices, instead, clearly dominate the stock markets of upper-middle-income countries. From the beginning of the 2000s, there is also reduced evidence of causality from the stock markets of high-income countries to metal prices and an increase in evidence in the opposite direction. From the GFC, for the low and lower-middleincome countries, we can also observe an increase in the importance of stock markets for metal prices and, to a less extent, vice versa.

| CONCLUSIONS
In this paper, we investigate the global causal links between commodity prices and stock market returns in a time-varying setting. We further analyse these relationships by focussing on specific commodity prices such as oil and metal prices separately and taking into consideration global oil demand and supply. This variation of linkages is explored separately for groups of countries classified as high, upper-middle, low and lower-middleincome countries. We make use of novel methods, such as the MF-VAR approach developed by Ghysels et al. (2016) and combine time series at different sampling frequencies. This allows us to exploit the higher frequency of the data that would otherwise be lost due to temporal aggregation. In order to assess the overall level of connectivity between global commodity prices and national stock markets, we use two Global Connectivity Indices, a Global Commodity Connectivity Index (GCCI) and a Global Stock Connectivity Index (GSCI). The results of our study show that the relationship between commodities and stock prices varies depending on the commodity index, whether it is an aggregate index or a specific index, such as for oil or metal prices. The results also vary depending on the income group and the observed period, for example, whether we are considering the period of depressed commodity prices or the commodity boom period. We find an increasingly causal relationship between world oil prices and stock markets. In the case of highincome countries, in particular, we find the GFC marks a decline in the share of causal links from stock markets to oil. Different effects of oil supply and demand shocks on stock markets are found: we note a weakening of the importance of supply shocks with the exception of high-income countries and stronger evidence of causal links from demand shocks during the 2000 commodity price boom period, particularly for high-income countries. After the GFC, metal prices seem to be increasingly connected with stock markets in low and lower-middleincome countries, with increasing evidence of causality in both directions but with a prevalence of causal links from stock markets to metal prices.

CONFLICT OF INTEREST
Martin Enilov, Giorgio Fazio and Atanu Ghoshray declare that they have no conflict of interest.

DATA AVAILABILITY STATEMENT
The data that support the findings of this study are available from the corresponding author upon reasonable request.

SUPPORTING INFORMATION
Additional supporting information may be found online in the Supporting Information section at the end of this article.