Skip to main content

Uncertainty and energy-sector equity returns in Iran: a Bayesian and quasi-Monte Carlo time-varying analysis


This study investigates whether the implied crude oil volatility and the historical OPEC price volatility can impact the return to and volatility of the energy-sector equity indices in Iran. The analysis specifically considers the refining, drilling, and petrochemical equity sectors of the Tehran Stock Exchange. The parameter estimation uses the quasi-Monte Carlo and Bayesian optimization methods in the framework of a generalized autoregressive conditional heteroskedasticity model, and a complementary Bayesian network analysis is also conducted. The analysis takes into account geopolitical risk and economic policy uncertainty data as other proxies for uncertainty. This study also aims to detect different price regimes for each equity index in a novel way using homogeneous/non-homogeneous Markov switching autoregressive models. Although these methods provide improvements by restricting the analysis to a specific price-regime period, they produce conflicting results, rendering it impossible to draw general conclusions regarding the contagion effect on returns or the volatility transmission between markets. Nevertheless, the results indicate that the OPEC (historical) price volatility has a stronger effect on the energy sectors than the implied volatility has. These types of oil price shocks are found to have no effect on the drilling sector price pattern, whereas the refining and petrochemical equity sectors do seem to undergo changes in their price patterns nearly concurrently with future demand shocks and oil supply shocks, respectively, gaining dominance in the oil market.


As global financial markets become more integrated, knowledge of their mutual interplay becomes more important for market participants to choose appropriate investment strategies. Furthermore, the financialization of the commodity markets has provided valuable tools for managing portfolio risks (Erb and Harvey 2006; Silvennoinen and Thorp 2013). As a commodity, crude oil has a well-recognized impact on equity markets worldwide. Early studies of the impact of oil prices on aggregate stock returns are limited to specific countries, with mixed findings. Some studies find a positive relationship (Narayan and Narayan 2010; Zhu et al. 2011; Zhu et al. 2014; Silvapulle et al. 2017), others find a negative relationship (Gjerde and Saettem 1999; Sadorsky 1999; Papapetrou 2001; Basher and Sadorsky 2006; Driesprong et al. 2008; Park and Ratti 2008; Chen 2009; Filis 2010; Basher et al. 2012), and still others find no relationship (Huang et al. 1996; Cong et al. 2008; Apergis and Miller 2009; Miller and Ratti 2009; Reboredo and Rivero-Castro 2014; Hatemi et al. 2017). These conflicting results may arise owing to several underlying pitfalls in the studies, such as not considering the level of oil dependence among stock markets, not explicitly considering heterogeneity in the context in which the aggregate index is exposed to gains or losses from changes in the oil price, the nature of the oil price shock considered, and the time-varying element used (Smyth and Narayan 2018).

Whereas earlier studies assume linear and symmetrical adjustment processes for the underlying variables (Zhu et al. 2011), the current view favors assuming an asymmetrical effect of oil prices on stock returns (Basher and Sadorsky 2006; Kilian 2008; Kilian and Park 2009; Arouri 2011; Aggarwal et al. 2012; Asteriou and Bashmakova 2013; Narayan and Gupta 2015; Phan et al. 2015; Kang et al. 2016; Li et al. 2017). This view is further supported by the nonlinear characteristics of the oil price-stock return relationship. However, some empirical studies do not support this view, as they either find no asymmetric effects (Bachmeier 2008; Cong et al. 2008; Nandha and Faff 2008; Mollick and Assefa 2013; Reboredo and Rivero-Castro 2014; Asalman and Herrera 2015; Reboredo and Ugolini 2016) or only find evidence for such effects in oil-importing countries in the period after the global financial crisis (Ramos and Veiga 2013). Failure to account for the mixed heterogeneous effects of positive and negative oil price shocks on individual stock returns and merely considering aggregate stock returns may result in these conflicting findings (Tsai 2015).

Furthermore, Kilian (2008) seminal work demonstrates that the nature of the oil price structural shock, be it an oil supply shock, aggregate demand shock, or oil-specific demand shock, could be an important factor in the oil–stock interplay, and failure to consider it may result in erroneous findings (Kilian and Park 2009). The period during which each type of stock gains dominance can be obtained by decomposing oil price data (Fueki et al. 2016). Performing this analysis shows that oil supply shocks were mainly influential from the second half of 2013 through the first half of 2015. Currently, oil supply shocks are no longer as important to macroeconomic developments, and aggregate demand shocks are seen as more influential (Kang et al. 2016). Further, empirical evidence shows that the effect of the oil price on equity returns varies considerably across sectors depending on the nature of the structural shock (Broadstock and Filis 2014). The effect of an oil supply shock is found to be positive (Basher et al. 2012; Abhyankar et al. 2013) or negative (Gupta and Modise 2013; Cunado and de Gracia 2014). For oil-specific demand shocks, however, the empirical evidence almost unanimously suggests a negative effect on equity returns in oil-importing countries (Filis et al. 2011; Basher et al. 2012; Abhyankar et al. 2013; Gupta and Modise 2013; Güntner 2014; Koh 2017) and a positive effect for Norway, an oil-exporting nation.

Another puzzling feature of the oil–stock relationship is that it exhibits different behaviors in periods of low and high economic volatility; in other words, it varies over time. Quite a few studies focus on this feature, primarily using Markov-switching vector autoregression (VAR) models, regime switching models, wavelet decomposition, or frequency domain methods (Aloui and Jimmazi 2009; Chen 2009; Mohanty et al. 2010; Reboredo 2010; Jammazi and Aloui 2010; Daskalaki and Skiadopolous 2011; Filis et al. 2011; Chang and Yu 2013; Ciner 2013; Broadstock and Filis 2014; Reboredo and Rivero-Castro, 2014; Zhang and Li 2014; Kang et al. 2015; Martin-Barragan et al. 2015; Xu 2015; Zhang 2017; Zhu et al. 2017). Concurrently, studies have examined the role of oil price volatility on stock returns using both generalized autoregressive conditional heteroskedasticity (GARCH)-type models and structural VAR models (Äijö 2008; Arouri and Nguyen 2010; Choi and Hammoudeh 2010; Elyasiani et al. 2011; Chen 2014; Lin et al. 2014; Narayan and Sharma 2014; Kang et al. 2015; Salisu and Oloko 2015; Awartani et al. 2016; Maghyereh et al. 2016; Bouri et al. 2017a, 2017b). The findings show that the volatility spillovers across markets can be strong and are significantly influenced by structural breaks, indicating a heterogeneous volatility transmission phenomenon with potential economic significance for hedging purposes. Thus, the recommended approach involves using the implied rather than the historical volatility in analyzing the cross-market association, as the former is a more accurate predictor of investor sentiment.

Many studies have focused on the effect of the oil price–stock returns relationship at the sector level (Cong et al. 2008; Arouri 2011; Elyasiani et al. 2011; Narayan and Sharma 2011; Lee et al. 2012; Li et al. 2012; Moya-Martinez et al. 2014; Caporale et al. 2015; Xu 2015; Zhu et al. 2016; Li et al. 2017; Peng et al. 2017), and many specifically focus on the oil and gas sector (Sadorsky 2001; Boyer and Filion 2007; Cong et al. 2008; Nandha and Faff 2008; Gupta 2016; Li et al. 2017). A key conclusion of these studies is that oil price increases positively affect the stock returns of firms in the oil and gas sector (Smyth and Narayan 2018), with a prolonged nonlinear relationship that strengthens over time (Managi and Okimoto 2013). However, the bulk of these studies focus on developed economies and rarely extend their analyses to emerging or transition markets.

At the country level, studies have been conducted for oil-importing (Masih et al. 2011; Cunado and de Gracia 2014; Bouri 2015; Silvapulle et al. 2017) and oil-exporting countries (Bjornland 2009; Arouri and Rault 2012; Mohanty et al. 2011; Ramos and Veiga 2013; Gil-Alana and Yaya 2014; Demirer et al. 2015), as is intuitive. Although their findings vary, these studies generally find that oil prices positively affect equity returns in oil-exporting countries (Smyth and Narayan 2018). Only a limited number of previous studies examine the oil price–stock relationship in Iran, and few focus on the effect on the price index of the Tehran Stock Exchange (TSE) (Najafabadi et al. 2012) or its volatility (Davoudi et al. 2018).

Based on the above literature review, this study makes a two-fold contribution to the existing literature. It provides the first analysis of the oil price impact on equity returns in Iran’s oil sector, and it uses a firsthand application of the quasi-Monte Carlo (QMC) method and Bayesian network (BN) theory in this setting. The remainder of the paper proceeds as follows. The next section provides a description and preliminary analysis of the data. Section 3 outlines the research methodology used in the empirical investigation. A discussion of the results is presented in Section 4, followed by the concluding remarks.


Implied oil volatility index

The implied oil volatility index is reported by the Chicago Board of Options Exchange and is constructed on an option basis, disregarding the pricing models. In this process, the market prices of out-of-the-money calls and puts are incorporated into the computation, and the implied crude oil volatility (OVX) is obtained using Eq. 1:

$$ OVX={\left[\frac{2}{T}\sum \limits_i\frac{\varDelta {K}_i}{K_i^2}\exp (RT)Q\left({K}_i\right)-\frac{1}{T}{\left(\frac{F}{K_0}-1\right)}^2\right]}^{1/2}\times 100 $$

Here, T is the time to maturity of the set of options, F is the forward price level derived from the smallest call-put option premium difference, R is the risk-free interest rate, \( \varDelta {K}_i=\frac{k_{i+1}-{K}_{i-1}}{2} \)measures the average interval of the two strike prices adjacent to the strike price of option i, K0 denotes the first strike price below the forward price level F, and (K i) represents the option premium computed as the midpoint of the bid-ask Q spread of each option with strike price K i (Maghyereh et al. 2016). This measure provides an accurate reflection of future market volatility. Other useful texts (Maghyereh et al. 2016) on this topic, however, provide more detailed information on the OVX computation.

Preliminary statistics

Daily data on stock prices were obtained from the TSE archive (Tehran Stock Exchange archive 2018). The archive contains data on several equity sectors, among which the oil drilling (ODR), oil refining (ORE), and chemical/petrochemical (PET) categories are presumably the most-relevant to the energy sector. Thus, this study uses data from these sectors. In addition, data on geopolitical risk (GPR), global economic policy uncertainty (EPU) (Economic Policy Uncertainty 2018) and the TSE price index (TPI) are incorporated to account for other proxies for uncertainty in the analysis. The implied oil volatility is inferred from OVX, whereas the historical oil volatility is taken from OPEC oil price data (OPEC), both of which were obtained using the Quandl package (McTaggart et al. 2016).

The sample spans September 27, 2009 to November 12, 2018, which is an interesting period that witnessed several major market events, including the emergence of shale oil as a key market player, the collapse of cooperation among OPEC members, the start of the global economic recovery, and so on (Maghyereh et al. 2016). The first date of the sample is the first available date in the TSE archive. To provide better insight into the sector data used, Fig. 1 plots these data, and Table 1 provides descriptive statistics of their log returns. Plots of OVX and OPEC are given in Fig. 2. For all the model parameters reported herein, the precision estimates are available from the author.

Fig. 1

The equity sector data for ORI (a), PET (b), and ODR (c)

Table 1 Descriptive statistics of the equity log returns
Fig. 2

The historical price data for OVX (a), and OPEC (b)

An augmented Dickey–Fuller Test confirms that log return series is stationary. All the equity returns show leptokurtic characteristics (i.e., kurtosis > 3), suggesting that a GARCH model is an appropriate choice in this setting. The Jarque-Bera test rejects the null hypothesis of a normal distribution for all series at the 1% significance level. The results of ARCH tests also confirm the presence of heteroscedasticity in the data.



We initially considered a simple GARCH model class for studying the return (r i,t) and variance (σ2i,t) dynamics of asset i at time t. In doing so, the OVX and OPEC data were used as external regressors, as in Eqs. 2 and 3.

$$ {\displaystyle \begin{array}{l}{r}_{i,t}=\mu +{\eta}_{i,1}{r}_{i,t-1}+{\eta}_{i,2}{r}_{i,t-2}+{\eta}_{i,3}{\varepsilon}_{i,t-1}+{\eta}_{i,4}{\varepsilon}_{i,t-2}+{\eta}_{i,5}{\varepsilon}_{i,t-3}+{\eta}_{i,6}{r}_{ovx_{t-1}}+{\eta}_{i,7}{r}_{OPEC_{t-1}}\\ {}i\in \left\{ ORI, PET, ODR\right\}\\ {}{\varepsilon}_{i,t}={\sigma}_{i,t}{z}_{i,t}\end{array}} $$
$$ {\sigma}_{i,t}^2=\omega +{\eta}_{i,8}{\sigma}_{i,t-1}^2+{\eta}_{i,9}{\sigma}_{i,t-2}^2+{\eta}_{i,10}{\varepsilon}_{i,t-1}^2+{\eta}_{i,11}{\sigma_{ovx_{t-1}}}^2+{\eta}_{i,12}{\sigma_{opec_{t-1}}}^2 $$

We also applied dynamic conditional correlation GARCH (DCC-GARCH) and asymmetric DCC-GARCH (ADCC-GARCH) models; Appendix 1 provides an explanation of these methods.

Quasi-Monte Carlo method

Let Ω be a separable topological space in an N dim -dimensional space. Clearly, any point in Ω can be described by a set of dim N values, with ϖ = (×1, ×2,  … , x Ndim) for x i1 ≤ i ≤ Ndim. Let f be a real-valued function on Ω for which a global maximum is sought. Because f is assumed to hold a global maximum in the region of interest, it is bounded from above, and we define its global maximum as:

$$ m(f)={\max}_{\varpi \in \varOmega }f\left(\varpi \right) $$

Let λ prob be a probability measure on Ω . Furthermore, let S be a sequence of N independent λ prob -distributed random samples, ϖ1 ,ϖ2 ,...,ϖ N Ω. We define

$$ {m}_N\left(f;S\right)={\max}_{1\le i\le N}f\left({\varpi}_i\right) $$

The QMC method of quasi-random search uses a deterministic sequence of points ϖ1 ,ϖ2 ,...,ϖ N in Ω to find the global optimum. It is proven that m N (f;S) converges to the global maximum of f with unit probability if f is continuous and if a positive probability measure (λ prob > 0) is taken for every nonempty subset of Ω (Niederreiter 1994).

$$ {\lim}_{N\to \infty }{m}_N\left(f;S\right)=m(f) $$

Consider a point set P = (ϖ1, ϖ2,..., ϖN). The dispersion of point P in Ω is defined by:

$$ {disp}_N\left(P;\Omega \right)=\max {\min}_{1\le i\le N} disp\left(\varpi, {\varpi}_i\right) $$
$$ {\displaystyle \begin{array}{l} disp\left(\vartheta, o\right)={\max}_{1\le i\le {N}_{\mathrm{dim}}}\left|{\vartheta}_i-{o}_i\right|\kern1.5em \mathrm{for}\\ {}{\vartheta}_i=\left({y}_1,{y}_2,\dots, {y}_s\right);{o}_i=\left({z}_1,{z}_2,\dots, {z}_s\right)\end{array}} $$

In summary, point sets with small dispersion are proven to be suitable for quasi-random search purposes (Niederreiter 1994). In addition, the point set used for QMC should possess nice properties on its discrepancy, which is interpreted as the difference between the empirical and uniform distributions of the QMC point set (Drew and Homem-de-Mello 2006). QMC deals with infinite low discrepancy sequences (LDS), which have the additional property that, for arbitrary N, the initial segments have relatively small discrepancies (Lei 2002). The merits of LDS are twofold; first, they provide uniform sample points avoiding large gaps or clusters, and, second, they know about their predecessors and fill the gaps left from previous iterations (Kucherenko 2006), eliminating empty areas in which no information on the behavior of the underlying problem can be deducted. The choice of LDS is therefore central to the QMC methodology.

Different principles have been used to generate LDS sets (Sobol 1976; Bratley et al. 1992; Niederreiter 1994). Whereas other theories, such as Niederreiter’s (1994), result in better asymptotic properties (Kucherenko 2006), Sobol’s LDS sets provide enhanced reliability in terms of rapid convergence in high dimensionality situations (Jäckel 2002). As a result, Sobol’s (1976) method was adopted for LDS generation in this study. A description of this method can be found in Appendix 2 to keep this text within a reasonable length.

Once an LDS set is available, the multistart QMC algorithm implements an inexpensive local search (such as the steepest descent) on the quasi-random points to concentrate the sample, which is subsequently reduced by replacing the worst points (with lower function values) with the new quasi-random points. A completely new local search is then applied to any point retained for a certain number of iterations. Two types of stopping criteria may be used for this algorithm. The first is to stop if no new value for the local maximum is found after several iterations (Glover and Kochenberger 2003). The second is to stop if the number of worse stationary points exceeds the number of stationary points, usually by a fraction of three (Hickernell and Yuan 1997). Appendix 3 provides a more detailed description of the QMC algorithm.

Bayesian optimization

Consider the original problem of maximizing the function f on a bounded set Ω . If ϖ is a point in this region, a dataset of the point parameters and their corresponding function evaluations can be iteratively collected,  = {ϖi, f(ϖi)}1 ≤ i ≤ iter, up to the iterth iteration. The dataset can be subsequently used to build a response surface. At this point, the optimization of the original function can be replaced by an alternative optimization of the response surface; the difference is that the latter optimization merely requires the evaluation of the learned model rather than that of the original function f.

Thus, the first requirement of Bayesian optimization (BO) is adopting a probabilistic model to create the response surface. Such a probabilistic framework allows the use of priors that encode the collected information in a principled way. Moreover, probabilistic models tend to be more robust to the effect of model errors, as they take into account uncertainty about the model (Calandra et al. 2016). In other words, the first step involves selecting a prior distribution over functions that expresses assumptions about the function being evaluated (Snoek et al. 2012). The prior over functions is then updated in light of new observations (Brochu et al. 2010). This analysis uses a Gaussian process (GP) (Rasmussen and Williams 2006) for the prior, meaning that any finite set of function values induces a multivariate Gaussian distribution. Other plausible choices for the prior include the random forest (Criminsi et al. 2011) and the Student-t processes (Shah et al. 2014).

In the second step, the previously collected data,, are combined with the prior to obtain a posterior distribution using Bayes’ rule. The posterior captures our updated beliefs about the unknown objective function (Brochu et al. 2010). We attempt to maximize the posterior at each step to decrease the distance between the true global maximum and the expected maximum given by the model (Brochu et al. 2010). The next point to evaluate, ϖ iter + 1 , is determined based on an acquisition function, f acquisition, which is a posterior over the functions induced by prior knowledge and data (Snoek et al. 2012). In practice, the next sample is drawn at the maximal acquisition function, ϖ iter + 1 = argmaxϖ f (ϖ) . This study uses the acquisition function of Srinivas et al. (2010), which exploits the upper confidence bound, for maximization.

$$ {f}_{acquisition}\left(\varpi; \wp, {\theta}_{GP}\right)=\mu \left(\varpi; \wp, {\theta}_{GP}\right)-{K}_{balance}\sigma \left(\varpi; \wp, {\theta}_{GP}\right) $$

Here, θ GP stands for the GP hyper-parameters; μ (ϖ; , θGP) and σ2 (ϖ; , θGP) are the mean and variance functions of the multivariate Gaussian distribution, respectively; and κbalance is a tradeoff parameter (k balance > 0) tuned to balance the search in terms of exploitation (where f is uncertain) against exploration (where f is expected to be high). Exploration prevails if the value of κ balance is increased. In this analysis, this parameter was set such that κbalance = 2.576. The BO algorithm conducts these steps sequentially (Appendix 4) in search for the global optimum. The mathematical foundations behind the method are thoroughly described in several useful texts (Brochu et al. 2010; Snoek et al. 2012), which also provide illustrations of its implementation.

Bayesian network

A BN is an implementation of a graphical model in which nodes represent random variables and arrows represent probabilistic dependencies between the nodes (Korb and Nicholson 2004). The BN’s graphical structure is a directed acyclic graph (DAG) that enables estimation of the joint probability distribution. For each variable, the DAG defines a factorization of the joint probability distribution into a set of local probability distributions, and the factorization form is given by the BN’s Markov property, which assumes that a variable is solely dependent on its parents (Scutari 2010). In this way, the methodology seeks to find a structure along with its parameters.

The two classifications of the BN-structure-learning process either handle this issue by analyzing the probabilistic relationships supervised by the Markov property of BNs with conditional independence tests and subsequently constructing a graph that satisfies the corresponding d-separation statements (constraint-based algorithms) or by assigning a score to each BN candidate and maximizing it with a heuristic algorithm (score-based algorithms) (Scutari 2010). This study tested both algorithm types. For the constrained-based type, we used a Monte Carlo permutation test for the conditional independence test, whereas, in the score-based case, we applied a score-equivalent Gaussian posterior density criterion. The implementation of the graphical structure-learning of the BNs was attempted using the bnlearn package (Scutari 2017).


The choice of lag in the GARCH models was rendered, following a series of computations, over a grid of lag values to identify the model with the least Bayesian information criterion (BIC) value. As our primary deduction on the cross-market association is based on the GARCH model parameters, we meticulously performed their estimation using a variety of techniques, as shown in Tables 2, 3 and 4. As evident from the results, the choice of solution technique clearly affects the estimated parameter values and is therefore extremely critical.

Table 2 The GARCH parameters for the ORI sector
Table 3 The GARCH parameters for the PET sector
Table 4 The GARCH parameters for the ODR sector

In the ORI sector, for example, the limited Broyden–Fletcher–Goldfarb–Shanno (LBFGS)/Bayesian methods estimate a positive effect of OVX/OPEC, whereas the QMC method finds that the effect is insignificant. Furthermore, the LBFGS/Bayesian results estimate that the volatility transmission from OVX/OPEC to ORI is positive, but this result is not supported by the QMC. Similar contradictions arise in other sectors. For example, OVX returns are found to affect PET returns positively and negatively by the LBFGS and Bayesian methods, respectively. The LBFGS/Bayesian method finds that the effect of OPEC returns on PET returns is significant, whereas the QMC method finds minimal effects. The Bayesian method finds that the volatility transmission from OVX/OPEC to PET is significant, whereas the other methods find an insignificant effect.

In the ODR sector, the LBFGS and Bayesian methods find a negative effect of OVX returns on ODR returns, but the methods largely disagree on the direction of the effect of OPEC returns on ODR returns. The QMC method, however, considers ODR returns to be insensitive to external factors. We find similar results for volatility transmission in the ODR sector; the LBFGS/Bayesian methods estimate opposite directions of the volatility transmission between OPEC and ODR returns, but both find a positive volatility transmission scheme between OVX and ODR returns. Likewise, the QMC method finds that the ODR volatility is independent of any external factors. The results for the mean dynamic correlation from the DCC/ADCC-GARCH models, shown in Table 5, also find a strong positive correlation between TPI and the sectors studied.

Table 5 The mean dynamic correlations, obtained from DCC/ADCC GARCH

To help understand the underlying connectedness, the data were also analyzed in the framework of BN theory, which is essentially a GARCH-free scheme. Interestingly, the results, shown in Figs. 3 and 4, indicate a mostly different set of significant relationships relative to those found in the GARCH results. Specifically, the BN results indicate that OPEC returns do affect returns in the ORI and PET sectors and that the volatility transmission between OPEC returns and the ORI and ODR sectors is positive.

Fig. 3

The extracted Bayesian network for returns in each sector, obtained by the score-based algorithm. The solid/dashed lines refer to statistically significant/insignificant arcs, respectively. The letters represent A rt, B rt − 1, C rt − 2, D rOVX, t − 1, E rOVX, t − 2, F rOPEC, t − 1, G rOPEC, t − 2

Fig. 4

The extracted Bayesian network for volatility in each sector, obtained by the score-based algorithm. The solid/dashed lines refer to statistically significant/insignificant arcs, respectively. The letters represent A \( {\sigma}_t^2 \), B \( {\sigma}_{t-1}^2 \), C \( {\sigma}_{t-2}^2 \), D \( {\sigma}_{OVX,t-1}^2 \), E \( {\sigma}_{OVX,t-2}^2 \), F \( {\sigma}_{OPEC,t-1}^2 \), G \( {\sigma}_{OPEC,t-2}^2 \)

To further investigate whether the dependency structure changes over time, we conducted a copula analysis by estimating the copula dependence parameters for Gaussian, Student-t, Gumbel, Clayton, and Frank copula models, as shown in Table 6. The results on a monthly basis indicate a positive correlation between GPR and EPU and all the energy sectors studied, as shown in Table 7. The correlation is stronger for GPR than for EPU.

Table 6 The estimated copula dependence parameters for Gaussian, Student-t, Gumbel, Clayton, and Frank copula models
Table 7 The correlation between GPR/EPU and the equity sectors, on a monthly basis

To avoid the potential pitfall of bias in the parameters due to periods of high or low volatility, price regimes were also detected for each sector, as shown in Table 8. We initially determined the number of plausible price regimes for each sector by identifying the case with the lowest BIC value out of the results obtained by applying the homogeneous/nonhomogeneous Markov switching autoregressive models (Monbet 2018), as shown in Additional file 1: Tables S1-S2 of the supplementary information. The exact timing of the period was later determined by fitting a regression tree model (Therneau et al. 2015).

Table 8 The time span of the detected price regimes, for the equity sectors

Interestingly, some of the time spans identified coincide with times when the oil price was undergoing breaks owing to changes in the type of shocks (i.e., oil supply or future demand shocks). For example, the ORI sector clearly enters a new price regime in early 2015, when future demand shocks became more dominant than supply shocks in influencing the oil market (Fueki et al. 2016). Likewise, the PET sector begins a new price regime in late 2013, which fits chronologically with the timeline of the positive contribution of future supply shocks to the oil price hike (Fueki et al. 2016). The only exception to this rule is the ODR sector, which has been rather insensitive to shocks. For the sake of brevity, however, the results for the selected price periods are given in the supplementary information to the article.

When the analysis is restricted to a specific price-regime timeline, the results for the GARCH and BN methods tend to agree more. For instance, both methods now confirm the volatility transmission between OPEC returns and the ORI and ODR sectors. Similarly, both methods confirm that the OPEC returns have a contagion effect on the ORI and PET returns.


The choice of solution technique has a clear effect on the parameter values estimated by GARCH, making it an unreliable platform for analyzing cross-market associations. The Bayesian scheme provides an alternative robust route for understanding the underlying connectivity in the market. We find a positive correlation between GPR, EPU, and all the energy sectors studied. Neither the contagion effect on returns nor the volatility transmission between the markets, however, can be deducted upfront, as the methods yield different results. Nevertheless, the results point to the OPEC (historical) price volatility as having a stronger effect on the energy sectors relative to the implied volatility. The ODR sector is found to be insensitive to the type of oil price shock, whereas the price patterns in the ORI and PET sectors seemingly changed when future demand shocks and oil supply shocks, respectively, gained dominance in the oil market. This latter information may have potential significance for TSE market participants in re-shaping their investment portfolios.



Autoregressive conditional heteroscedasticity


Bayesian information criterion


Bayesian network


Chicago board of options exchange


Dynamic conditional correlation


Generalized autoregressive conditional heteroskedasticity


Gaussian process


Low Memory Broyden–Fletcher–Goldfarb–Shanno


Low discrepancy sequences


Number of stationary points


Number of worse stationary points


Oil drilling


OPEC basket oil price


Oil refining


Oil volatility index




Quasi-Monte Carlo


Price index of tehran stock exchange


Tehran stock exchange


  1. Abhyankar A, Xu B, Wang J (2013) Oil price shocks and the stock market: evidence from Japan. Energy J 34:199–222

    Article  Google Scholar 

  2. Aggarwal R, Akhigbe A, Mohanty SK (2012) Oil price shocks and transportation firm asset prices. Energy Econ 34:1370–1379.

    Article  Google Scholar 

  3. Äijö J (2008) Implied volatility term structure linkages between VDAX, VSMI and VSTOXX volatility indices. Glob Financ J 18(3).

  4. Aloui C, Jimmazi R (2009) The effects of crude oil shocks on stock market shifts behavior: a regime switching approach. Energy Econ 31:789–799.

    Article  Google Scholar 

  5. Apergis N, Miller SM (2009) Do structural oil-market shocks affect stock prices? Energy Econ 31(4):569–575.

    Article  Google Scholar 

  6. Arouri MEH (2011) Does crude oil move stock markets in Europe? A sector investigation. Econ Model 28:1716–1725.

    Article  Google Scholar 

  7. Arouri MEH, Nguyen DK (2010) Oil prices, stock markets and portfolio investment: evidence from sector analysis in Europe over the last decade. Energy Policy 38:4528–4539

    Article  Google Scholar 

  8. Arouri MEH, Rault C (2012) Oil prices and stock markets in GCC countries: empirical evidence from panel analysis. Int J Financ Econ 17:242–253.

    Article  Google Scholar 

  9. Asalman Z, Herrera AM (2015) Oil price shocks and the US stock market: do sign and size matter? Energy J 36(3):171–188

    Google Scholar 

  10. Asteriou D, Bashmakova Y (2013) Assessing the impact of oil returns on emerging stock markets: a panel data approach for ten central and eastern European countries. Energy Econ 38:204–211.

    Article  Google Scholar 

  11. Awartani B, Maghyereh A, Guermat C (2016) The connectedness between crude oil and financial markets: Evidence from implied volatility indices. J Common Mark Stud:11.

  12. Bachmeier L (2008) Monetary policy and the transmission of oil shocks. J Macroecon 30:1738–1755.

    Article  Google Scholar 

  13. Basher SA, Haug AA, Sadorsky P (2012) Oil prices, exchange rates and emerging stock markets. Energy Econ 34(1):227–240.

    Article  Google Scholar 

  14. Basher SA, Sadorsky P (2006) Oil price risk and emerging stock markets. Glob Financ J 17(2):224–251.

    Article  Google Scholar 

  15. Bjornland HC (2009) Oil price shocks and stock market booms in an oil exporting country. Scot J Political Econ 56(2):232–254

    Article  Google Scholar 

  16. Bouri E (2015) Oil volatility shocks and the stock markets of oil-importing MENA economies: a tale from the financial crisis. Energy Econ 51:590–598.

    Article  Google Scholar 

  17. Bouri E, Gupta R, Hosseini S, Lau M, C.K. (2017a) Does global fear predict fear in BRICS stock markets? Evidence from a Bayesian Graphical Structural VAR model. Emerg Mark Rev.

  18. Bouri E, Jain A, Biswal PC, Roubaud D (2017b) Cointegration and nonlinear causality amongst gold, oil, and the Indian stock market: evidence from implied volatility indices. Resour Policy 52:201–206.

    Article  Google Scholar 

  19. Boyer MM, Filion D (2007) Common and fundamental factors in stock returns of Canadian oil and gas companies. Energy Econ 29(3):428–453.

    Article  Google Scholar 

  20. Bratley P, Fox BL, Niederreiter H (1992) Implementation and tests of low discrepancy sequences. ACM T Model Comput S 2:195–213.

    Article  Google Scholar 

  21. Broadstock DC, Filis G (2014) Oil price shocks and stock market returns: new evidence from the United States and China. J Int Financ Mark Inst Money 33:417–433.

    Article  Google Scholar 

  22. Brochu E, Cora VM, de Freitas N (2010) A tutorial on Bayesian optimization of expensive cost functions, with application to active user modeling and hierarchical reinforcement learning. arXiv:1012.2599

  23. Calandra R, Seyfarth A, Peters J, Deisenroth MP (2016) Bayesian optimization for learning gaits under uncertainty. Ann Math Artif Intell 76:5–23.

    Article  Google Scholar 

  24. Caporale GM, Ali FM, Spagnolo N (2015) Oil price uncertainty and sectoral stock returns in China: a time-varying approach. China Econ Rev 34:311–321.

    Article  Google Scholar 

  25. Chang KL, Yu ST (2013) Does crude oil price play an important role in explaining stock return behavior? Energy Econ 39:159–168.

    Article  Google Scholar 

  26. Chen CY (2014) Does fear spill over? Asia Pac J Financ Stud 43(4):465–491.

    Article  Google Scholar 

  27. Chen SS (2009) Do higher oil prices push the stock market into bear territory? Energy Econ 32(2):490–495.

    Article  Google Scholar 

  28. Choi K, Hammoudeh S (2010) Volatility behavior of oil, industrial commodity and stock markets in a regime-switching environment. Energy Policy 38:4388–4399.

    Article  Google Scholar 

  29. Ciner C (2013) Oil and stock returns: frequency domain evidence. J Int Financ Mark Inst Money 23:1–11.

    Article  Google Scholar 

  30. Cong RG, Wei YM, Jiao JL, Fan Y (2008) Relationships between oil price shocks and stock market: an empirical analysis from China. Energy Policy 36:3544–3553.

    Article  Google Scholar 

  31. Criminsi A, Shotton J, Konukoglu E (2011) Decision forests: a unified framework for classification, regression, density estimation, manifold learning and semi-supervised learning. Found Trends® Comput Graph Vis 7(2–3):81–227.

    Article  Google Scholar 

  32. Cunado J, de Gracia FP (2014) Oil price shocks and stock market returns: evidence for some European countries. Energy Econ 42:365–377.

    Article  Google Scholar 

  33. Daskalaki C, Skiadopolous G (2011) Should investors include commodities in their portfolios after all? New evidence. J Bank Financ 35:2606–2626.

    Article  Google Scholar 

  34. Davoudi S, Fazlzadeh A, Fallahi F, Asgharpour H (2018) The impact of oil revenue shocks on the volatility of Iran’s stock market return. Int J Energy Econ Policy 8(2):102–110

    Google Scholar 

  35. Demirer R, Jategaonkar SP, Khalifa AAA (2015) Oil price risk exposure and the crosssection of stock returns. Energy Econ 49:132–140.

    Article  Google Scholar 

  36. Drew S, Homem-de-Mello T (2006) Quasi-Monte Carlo strategies for stochastic optimization. In: Proceedings of the 2006 winter simulation conference, pp 774–782

    Google Scholar 

  37. Driesprong G, Jacobson B, Matt B (2008) Striking oil: another puzzle? J Financ Econ 89(2):307–327.

    Article  Google Scholar 

  38. Economic Policy Uncertainty.; (2018) [Accessed: 12 Nov 2018]

  39. Elyasiani E, Mansur I, Odusami B (2011) Oil price shocks and industry stock returns. Energy Econ 33:966–974.

    Article  Google Scholar 

  40. Erb CB, Harvey CR (2006) The strategic and tactical value of commodity futures. Financ Anal J 62:69–97.

    Article  Google Scholar 

  41. Filis G (2010) Macro economy, stock market and oil prices: do meaningful relationships exist among their cyclical fluctuations? Energy Econ 32(4):877–886.

    Article  Google Scholar 

  42. Filis G, Degiannakis S, Floros C (2011) Dynamic correlation between stock market and oil prices: the case of oil-importing and oil-exporting countries. Int Rev Financ Anal 20(3):152–164.

    Article  Google Scholar 

  43. Fueki, T.; Higashi, H.; Higashio, N.; Nakajima, J.; Ohyama, S.; Tamanyu, Y. (2016) Identifying Oil Price Shocks and Their Consequences: Role of Expectations and Financial Factors in the Crude Oil Market. Bank of Japan Working Paper Series 16-E-17, Bank of Japan

  44. Gil-Alana L, Yaya OS (2014) The relationship between oil prices and the Nigerian stock market: an analysis based on fractional integration and cointegration. Energy Econ 46:328–333.

    Article  Google Scholar 

  45. Gjerde O, Saettem F (1999) Causal relations among stock returns and macroeconomic variables in a small, open economy. J Int Financ Mark Inst Money 9:61–74.

    Article  Google Scholar 

  46. Glover F, Kochenberger G (2003) Handbook of metaheuristics. Kluwer Academic Publishers, New York

  47. Güntner JH (2014) How do international stock markets respond to oil demand and supply shocks? Macroecon Dyn 18(8):1657–1682.

    Article  Google Scholar 

  48. Gupta K (2016) Oil price shocks, competition and oil & gas stock returns – global evidence. Energy Econ 57:140–153.

    Article  Google Scholar 

  49. Gupta R, Modise MP (2013) Does the source of oil price shocks matter for south African stock returns? A structural VAR approach. Energy Econ 40:825–831.

    Article  Google Scholar 

  50. Hatemi JA, Al Shayed A, Roca E (2017) The effect of oil prices on stock prices: fresh evidence from asymmetric causality tests. Appl Econ 49(16):1584–1592.

    Article  Google Scholar 

  51. Hickernell FJ, Yuan Y (1997) A simple multistart algorithm for global optimization. OR Transact 1(2).

  52. Huang RD, Masulis RW, Stoll HR (1996) Energy shocks and financial markets. J Futur Mark 16:1–27.<1::aid-fut1>;2-q

    Article  Google Scholar 

  53. Jäckel P (2002) Monte Carlo methods in finance. Wiley, New York

    Google Scholar 

  54. Jammazi R, Aloui C (2010) Wavelet decomposition and regime shifts: assessing the effect of crude oil shocks on stock market returns. Energy Policy 38:1415–1435.

    Article  Google Scholar 

  55. Kang W, Ratti RA, Vespignaniet J (2016) The impact of oil price shocks on the US stock market: a note on the roles of US and non-US oil production. Econ Lett 145:176–181.

    Article  Google Scholar 

  56. Kang W, Ratti RA, Yoon KH (2015) Time-varying effect of oil market shocks on the stock market. J Bank Financ 61:S150–S163.

    Article  Google Scholar 

  57. Kilian L (2008) Exogenous oil supply shocks: how big are they and how much do they matter for the US economy? Rev Econ Stat 90:216–240.

    Article  Google Scholar 

  58. Kilian L, Park C (2009) The impact of oil price shocks on the US stock market. Int Econ Rev 50(4):1267–1287.

    Article  Google Scholar 

  59. Koh WC (2017) How do oil supply and demand shocks affect Asian stock markets? Macroecon Finance Emerg Mark Econ 10:1–18.

    Article  Google Scholar 

  60. Korb K, Nicholson A (2004) Bayesian artificial intelligence. Chapman and Hall, London

  61. Kucherenko S (2006) Application of quasi Monte Carlo methods in global optimization. Glob Optim:111–133.

  62. Lee BJ, Yang CW, Huang BN (2012) Oil price movements and stock markets revisited: a case of sector stock price indexes in the G7 countries. Energy Econ 34:1284–1300.

    Article  Google Scholar 

  63. Lei G (2002) Adaptive Random Search in Quasi-Monte Carlo Methods for Global Optimization. Comput Math Appl (43):747–754.

  64. Li Q, Cheng K, Yang Z (2017) Response pattern of stock returns to international oil price shocks from the perspective of China’s oil industrial chain. Appl Energy 185:1821–1831.

    Article  Google Scholar 

  65. Li SF, Zhu HM, Yu K (2012) Oil prices and stock market in China: a sector analysis using panel cointegration with multiple breaks. Energy Econ 34:1951–1958.

    Article  Google Scholar 

  66. Lin B, Wesseh PK, Appiah MO (2014) Oil price fluctuation, volatility spillover and the Ghanian equity market: implication for portfolio management and hedging effectiveness. Energy Econ 42:172–182.

    Article  Google Scholar 

  67. Maghyereh AI, Awartani B, Bouri E (2016) The directional volatility connectedness between crude oil and equity markets: new evidence from implied volatility indexes. Energy Econ 6(57):78–93.

    Article  Google Scholar 

  68. Managi S, Okimoto T (2013) Does the price of oil interact with clean energy prices in the stock market? Jpn World Econ 27:1–9

    Article  Google Scholar 

  69. Martin-Barragan B, Ramos SB, Veiga H (2015) Correlations between oil and stock markets: a wavelet-based approach. Econ Model 50:212–227.

    Article  Google Scholar 

  70. Masih R, Peters S, De Mello L (2011) Oil price volatility and stock price fluctuations in an emerging market: evidence from South Korea. Energy Econ 33(5):975–986

    Article  Google Scholar 

  71. McTaggart, R., Daroczi, G., Leung, C. (2016). Quandl: API Wrapper for R package version 2.8.0.

  72. Miller JI, Ratti RA (2009) Crude oil and stock markets: Stability, instability, and bubbles. Energy Econ 31(4):559–568.

    Article  Google Scholar 

  73. Mohanty SK, Nandha M, Bota G (2010) Oil shocks and stock returns: the case of the central and eastern European (CEE) oil and gas sectors. Emerg Mark Rev 11:358–372.

    Article  Google Scholar 

  74. Mohanty SK, Nandha M, Turkistani AQ, Alaitani MY (2011) Oil price movements and stock market returns: evidence from gulf cooperation council (GCC) countries. Glob Financ J 22:42–55.

    Article  Google Scholar 

  75. Mollick AV, Assefa TA (2013) US stock returns and oil prices: the tale from daily data and the 2008–2009 financial crisis. Energy Econ 36:1–18.

    Article  Google Scholar 

  76. Monbet V. (2018) NHMSAR: Non-Homogeneous Markov Switching Autoregressive Models. R package version 1.12. URL

  77. Moya-Martinez P, Ferrer-Lapena R, Escribano-Sotos F (2014) Oil price risk in the Spanish stock market: an industry perspective. Econ Model 37:280–290.

    Article  Google Scholar 

  78. Najafabadi AP, Qazvini M, Ofoghi R (2012) The impact of oil and gold prices’ shock on Tehran stock exchange: a copula approach. Iran J Econ Stud 1(2):23–47

    Google Scholar 

  79. Nandha M, Faff R (2008) Does oil move equity prices? A global view. Energy Econ 30(3):986–997.

    Article  Google Scholar 

  80. Narayan PK, Gupta R (2015) Has oil price predicted stock returns for over a century? Energy Econ 48:18–23.

    Article  Google Scholar 

  81. Narayan PK, Narayan S (2010) Modelling the impact of oil prices on Vietnam’s stock prices. Appl Energy 87:356–361.

    Article  Google Scholar 

  82. Narayan PK, Sharma SS (2011) New evidence on oil price and firm returns. J Bank Financ 35(12):3253–3262.

    Article  Google Scholar 

  83. Narayan PK, Sharma SS (2014) Firm return volatility and economic gains: the role of oil prices. Econ Model 38:142–151.

    Article  Google Scholar 

  84. Niederreiter H (1994) Random number generation and quasi-Monte Carlo methods. Society for Industrial and Applied Mathematics, Philadelphia

    Google Scholar 

  85. Papapetrou E (2001) Oil price shocks, stock market, economic activity and employment in Greece. Energy Econ 23:511–532.

    Article  Google Scholar 

  86. Park J, Ratti RA (2008) Oil price shocks and stock markets in the US and 13 European countries. Energy Econ 30(5):2587–2608.

    Article  Google Scholar 

  87. Peng C, Zhu MM, Jia XH, You WH (2017) Stock price syncronicity to oil shocks across quantiles: evidence from Chinese oil firms. Econ Model 61:248–259.

    Article  Google Scholar 

  88. Phan DHB, Sharma SS, Narayan PK (2015) Oil price and stock returns of consumers and producers of crude oil. J Int Financ Mark Inst Money 34:245–262.

    Article  Google Scholar 

  89. Ramos SB, Veiga H (2013) Oil price asymmetric effects: answering the puzzle in international stock markets. Energy Econ 38:136–145.

    Article  Google Scholar 

  90. Reboredo JC (2010) Nonlinear effects of oil shocks on stock returns: a Markov switching approach. Appl Econ 42:3735–3744.

    Article  Google Scholar 

  91. Reboredo JC, Rivero-Castro M (2014) Wavelet-based evidence of the impact of oil prices on stock returns. Int Rev Econ Financ 29:145–176.

    Article  Google Scholar 

  92. Reboredo JC, Ugolini A (2016) Quantile dependence of oil price movements and stock returns. Energy Econ 54:33–49.

    Article  Google Scholar 

  93. Sadorsky P (1999) Oil price shocks and stock market activity. Energy Econ 21(5):449–469.

    Article  Google Scholar 

  94. Sadorsky P (2001) Risk factors in stock returns of Canadian oil and gas companies. Energy Econ 23:17–28.

    Article  Google Scholar 

  95. Salisu A, Oloko TF (2015) Modelling oil price—US stock nexus: a VARMA-BEKKAGARCH approach. Energy Econ 50:1–12

    Article  Google Scholar 

  96. Scutari M (2010) Learning Bayesian Networks with the bnlearn R Package. J Stat Softw 35(3):1–22 URL

    Article  Google Scholar 

  97. Scutari M (2017) Bayesian Network Constraint-Based Structure Learning Algorithms: Parallel and Optimized Implementations in the bnlearn R Package. J Stat Softw 77(2):1–20.

    Article  Google Scholar 

  98. Shah A, Wilson AG, Ghahramani Z (2014) Student-t processes as alternatives to Gaussian processes. Proc Int Conf Artif Intell Stat, PMLR 33:877–885

  99. Silvapulle P, Smyth R, Zhang X, Fenech JP (2017) Nonparametric panel data model for crude oil and stock prices in net oil importing countries. Energy Econ 67:255–267.

    Article  Google Scholar 

  100. Silvennoinen A, Thorp S (2013) Financialization, crisis and commodity correlation dynamics. J Int Financ Mark Inst Money 24:42–65.

    Article  Google Scholar 

  101. Smyth R, Narayan PK (2018) What do we know about oil prices and stock returns? Int Rev Financ Anal.

  102. Snoek J, Larochelle H, Adams RP (2012) Practical bayesian optimization of machine learning algorithms. Adv Neural Inf Proces Syst 2:2951–2959

    Google Scholar 

  103. Sobol IM (1976) Uniformly distributed sequences with an additional uniform property U.S.S.R. Comput Maths Math Phys (16):236–242.

  104. Srinivas N, Krause A, Kakade S, Seeger M (2010) Gaussian process optimization in the bandit setting: no regret and experimental design. Proc ICML 10:1015–1022

    Google Scholar 

  105. Tehran Stock Exchange archive.; (2018) [Accessed 12 Nov 2018]

  106. Therneau, T.; Atkinson, B.; Ripley, B. (2015) rpart: Recursive Partitioning and Regression Trees. Rpackage version 4.1-10. URL

  107. Tsai CL (2015) How do US stock returns respond differently to oil price shocks pre-crisis, within the financial crisis, and post-crisis? Energy Econ 50:47–62.

    Article  Google Scholar 

  108. Xu B (2015) Oil prices and UK industry-level returns. Appl Econ 47:2608–2627.

    Article  Google Scholar 

  109. Zhang B (2017) How do great shocks influence the correlation between oil and international stock markets? Appl Econ 49:1513–1526.

    Article  Google Scholar 

  110. Zhang B, Li XM (2014) Recent hikes in oil equity market correlations: transitory or permanent? Energy Econ 53:305–315.

    Article  Google Scholar 

  111. Zhu HM, Guo Y, You Y, Xu Y (2016) The heterogeneity dependence between crude oil price changes and industry stock market returns in China: evidence from a quantile regression approach. Energy Econ 55:30–41.

    Article  Google Scholar 

  112. Zhu HM, Li R, Li S (2014) Modelling dynamic dependence between crude oil prices and Asia Pacific stock returns. Int Rev Econ Financ 29:208–223.

    Article  Google Scholar 

  113. Zhu HM, Li R, Yu K (2011) Crude oil shocks and stock markets: a panel threshold cointegration approach. Energy Econ 33(5):987–994.

    Article  Google Scholar 

  114. Zhu HM, Su X, You W, Ren Y (2017) Asymmetric effects of oil price shocks on stock returns: evidence from a two-stage Markov regime-switching approach. Appl Econ 49:2491–2507.

    Article  Google Scholar 

Download references


Not applicable.


Not applicable.

Availability of data and materials

Not applicable.

Author information




The work was solely done by the corresponding author, BF. The author read and approved the final manuscript.

Corresponding author

Correspondence to Babak Fazelabdolabadi.

Ethics declarations

Competing interests

The author declares that he has no competing interests.

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Additional file

Additional file 1:

Figure S1. The ADCC-GARCH dynamic conditional correlation between OVX and ORI (a), PET (b), and ODR (c). Figure S2. The extracted Bayesian network for returns in each sector in selected price regime periods - [‘2015-03-17’-‘2018-06-12’] (ORI); [‘2013-11-18’-‘2018-06-12’] (PET); [‘2009-07-27’-‘2018-07-23’] (ODR) - obtained by the score-based algorithm. The solid/dashed lines refer to statistically significant/insignificant arcs, respectively. The letters represent (A)rt, (B)rt − 1, (C)rt − 2, (D)rOVX, t − 1, (E)rOVX, t − 2, (F) rOPEC, t − 1, (G) rOPEC, t − 2. Figure S3. The extracted Bayesian network for volatility in each sector in selected price regime periods - [‘2015-03-17’-‘2018-06-12’] (ORI); [‘2013-11-18’-‘2018-06-12’] (PET); [‘2009-07-27’-‘2018-07-23’] (ODR) - obtained by the score-based algorithm. The solid/dashed lines refer to statistically significant/insignificant arcs, respectively. The letters represent (A)\( {\sigma}_t^2 \), (B)\( {\sigma}_{t-1}^2 \), (C)\( {\sigma}_{t-2}^2 \), (D)\( {\sigma}_{OVX,t-1}^2 \), (E)\( {\sigma}_{OVX,t-2}^2 \), (F) \( {\sigma}_{OPEC,t-1}^2 \), (G) \( {\sigma}_{OPEC,t-2}^2 \). Table S1. The BIC for different price regimes, under homogeneous Markov switching autoregressive models. Table S2. The BIC for different price regimes, under non-homogeneous Markov switching autoregressive models. Table S3. Descriptive statistics of the equity log returns in the selected periods. Table S4. The GARCH parameters for the ORI sector in the period [‘2015-03-17’-‘2018-06-12’]. Table S5. The GARCH parameters for the PET sector in the period [‘2013-11-18’-‘2018-06-12’]. Table S6. The GARCH parameters for the ODR sector in the period [‘2009-07-27’-‘2018-07-23’]. Table S7. The mean dynamic correlations, obtained from DCC/ADCC GARCH, over the corresponding selected periods. Table S8. The estimated copula dependence parameters for Gaussian, Student-t, Gumbel, Clayton, and Frank copula models, over the corresponding selected periods. (DOCX 470 kb)


Appendix 1

Dynamic Conditional Correlation (DCC-GARCH)

The model specifies the conditional mean and the conditional variance dynamics of an asset at time t, as follows (Engle and Sheppard, 2001):

$$ {r}_{i,t}={\mu}_i+{\eta}_{i,13}{r}_{i,t-1}+{\eta}_{i,14}{r}_{i,t-2}+{\varepsilon}_{i,t} $$
$$ {\sigma}_{i,t}^2={\omega}_i+{\eta}_{i,15}{\sigma}_{i,t-1}^2+{\eta}_{i,16}{\varepsilon}_{i,t-1}^2 $$
$$ {\displaystyle \begin{array}{l}i\in \left\{ OVX, OPEC, ORI, PET, ODR\right\}\\ {}{\varepsilon}_t={H}_t^{1/2}z{}_t\end{array}} $$
$$ {H}_t={D}_t{R}_t{D}_t $$
$$ {R}_t={Q}_t^{\ast^{-1}}{Q}_t{Q}_t^{\ast^{-1}} $$
$$ {Q}_t=\left(1-{\eta}_{17}-{\eta}_{18}\right)\overline{Q}+{\eta}_{17}{z}_t{z}_t^{\prime }+{\eta}_{18}{Q}_{t-1} $$

Here, zt is a vector of independent and identically distributed(IID) errors, Ht is the conditional covariance matrix, Rtis the conditional correlation matrix, Dtis a diagonal matrix with conditional volatilities on its main diagonal, Qt = [qij, t]; i, j {OVX, OPEC, ORI, PET, ODR}, is a time-varying covariance matrix, \( {Q}_t^{\ast } \)is a diagonal matrix with the square root of the diagonal elements of Qt at the diagonal, \( \overline{Q} \)is an unconditional covariance matrix of standardized residuals. For the Asymmetric-DCC (ADCC-GARCH), the conditional variance is modeled by:

$$ {\sigma}_{i,t}^2={\omega}_i+{\eta}_{i,15}{\sigma}_{i,t-1}^2+{\eta}_{i,16}{\varepsilon}_{i,t-1}^2+{\eta}_{i,19}{\varepsilon}_{i,t-1}^2I\left({\varepsilon}_{i,t-1}^2\right) $$

The (dynamic) correlation estimator at timet, \( {\widehat{\rho}}_{ij,t} \), is given by:

$$ {\widehat{\rho}}_{ij,t}=\frac{q_{ij,t}}{\sqrt{q_{ii,t}{q}_{jj,t}}} $$

Appendix 2

The construction of Sobol’s low-discrepancy sequences

The initial stage in generating a Sobol LDS set deals with operation on a set of integers in the interval [1, 2b − 1], where b represents the number of bits in an unsigned integer on the operating computer (typically b = 32). Let xnkbe the nth draw of one of Sobol` integers in dimensionk.

Generation of numbers in the Sobol’s method, is based on a set of direction integers. A distinct direction integer is considered for each of the b bits in the binary integer representation. Let vkldenote the lth direction integer for dimension k. In order to construct Sobol` numbers, one needs to evaluate the direction integers, first. This process involves the binary coefficients of a selected primitive modulo two for each dimension (Jäckel 2002). Take pkas the primitive polynomial modulo two for dimension k with the degreegk (defined by Eq. 18). We assume ak0 … akgrepresenting the coefficients ofpk, with ak0being the coefficient of the highest monomial term.

$$ {p}_k(z)=\sum \limits_{j=0}^{g_k}{a}_{kj}{z}^{g_k-j} $$

In each dimension, the first gk direction integers vklfor l = 1 … gkare allowed to be freely chosen for the associatedpkof the dimension, provided that two conditions are met. First, the lth leftmost bit of the direction integer vkl must be set. Second, only the l leftmost bits can be non-zero, where the leftmost bit refers to the most significant one in a bit field representation. All subsequent direction integers are calculated from a recurrence relation (Eq. 19) (Jäckel 2002):

$$ {v}_{kl}=\frac{v_k\left(l-{g}_k\right)}{2^{g_k}}{\oplus}_2{\sum \limits_{j=1}^{g_k}}^{\oplus_2}{a}_{kj}{v}_{k\left(l-j\right)}\;\mathrm{for}\ l>{g}_k $$

Hereby, 2represents the binary addition of integers modulo two (often referred to in the computer science literature as the XOR gate), and \( {\sum \limits_{\dots}^{\dots}}^{\oplus_2} \)stands for a set of XOR operations. The procedure is to right-shift the direction integer vk(l − gk)by gk bits, and then performing the XOR operation with a selection of the un-shifted direction integers vk(l − j)forj = 1 … gk. The summation is performed analogous to the conventional ∑summation operator.

The only remaining requirement for the algorithm is the generating integer of the nth draw. For this sake, the natural choice appears to be the draw number itself, n. Nevertheless, any other sequence with a unique integer for each new draw is equally useful (Jäckel 2002). Once all the preliminaries are set, the Sobol` integers, for the s dimensions of interest, are generated by (Jäckel 2002);

$$ {x}_{nk}={\sum \limits_{j=1}^s}^{\oplus_2}{v}_{kj}1 $$

In which the jth bit of the generating integer is set (counting from the right).

Jäckel (2002) has provided tabulated initialization numbers for generating Sobol` integers, up to a dimension of 32 (Table 9). The generated sequence, using these initialization numbers, posesses the property; such that for any binary segment of the s-dimensional sequence of length 2s there is exactly one draw in each of the 2s hypercubes which result from subdividing the unit hypercube along each of its unit length extensions into half (Jäckel 2002).

Table 9 An instance of the initialisation numbers for generating Sobol’s LDS, up to a dimension of 32 (Jäckel 2002)

Once generated, conversion of Sobol` integers to other scales is fairly straightforward. For example, they can be converted to the [0, 1] scale by dividing the integers by2b.

Appendix 3

The algorithm to perform Quasi-Monte Carlo maximization

Assume \( {\varpi}_i^{iter} \)to represent the best solution for ith point at the iterth iteration, also consider FBESTas the best (maximum) value off, recorded up to the iterth iteration. A detailed description of the QMC procedure is then ensued as follows (Hickernell and Yuan 1997):

Step-0 Initialize.

Input the number of initial points, N, the number of points with best (highestt) objective function values to retain in each iteration, Nbest, and the desired number of iterations to be done for local search on each of the points, Niterlocal. search.

Set the number of iterations, iter = 0.

Set NSP = 0; NSWP = 0; NTIX(j) = 0for (1 ≤ j ≤ N).

Step-1 Concentrate

Obtain a new point set, by applying Niterlocal. search iteration(s) of an inexpensive local search to each of \( {\varpi}_i^{iter} \) points (1 ≤ i ≤ N).

Step-2 Reduce

Find Ξ(iter)  {1,  … , N}such that Ξ(iter)has Nbest elements and that \( f\left({\varpi}_i^{iter}\right)\ge f\left({\varpi}_j^{iter}\right)\forall i\in \Xi (iter) \) and j Ξ(iter).

If j Ξ(iter), set NTIX(j) = NTIX(j) + 1.

If j Ξ(iter), set NTIX(j) = 0.

Step-3 Find local maximum

For j = 1, … , Nsuch that NTIX(j) ≥ 2.

Set NTIX(j) = 0.

If NSP = 0or\( f\left({\varpi}_j^{iter}\right)\ge FBEST+{10}^{-4} \) then.

Starting from\( {\varpi}_j^{iter} \), perform a local optimization search, to obtain the local maximum of the point, \( {\varpi}_{j, local.\max}^{iter} \).

If \( f\left({\varpi}_{j, local.\max}^{iter}\right)> FBEST \) then.

Set \( NSP= NSP+1; NSWP=0; FBEST=f\left({\varpi}_{j, local.\max}^{iter}\right) \).


Set NSWP = NSWP + 1.



If \( \frac{NSWP}{NSP}\ge 3 \)then stop (success).

Step-4 Sample additional points

For j = 1, 2, … , N.

If NTIX(j) = 0then.

Generate \( {\varpi}_j^{iter+1} \)by the Sobol’s LDS technique.


Set \( {\varpi}_j^{iter+1}={\varpi}_j^{iter} \).


Set iter = iter + 1.

If the total number of function calls reached then stop (failure).

Go to Step-1.

Appendix 4

The algorithm to perform Bayesian Optimization

Assume that the upper confidence bound scheme is chosen, as for the acquisition function. The algorithm to perform Bayesian optimization follows the below procedures (Brochu et al. 2010):

Step-0 Initialize

Input the desired number of iterations to be done for BO search, Niter. Input the tunable parameter κbalance (Eq. 14).

Set the number of iterations, iter = 0.

Sample the (objective) function at point ϖiter.

Form the data set,  = {ϖiter, f(ϖiter)}.

Step-1 Repeat

Find the next point to sample,ϖiter + 1, by optimizing the acquisition function over GP.

$$ {\varpi}^{iter+1}=\arg {\max}_{\varpi }{f}_{acquisition}\left({\left.\varpi \right|}_{\wp_{1: iter}}\right) $$

Sample the (objective) function at point ϖiter + 1.

Augment the data set .

Update the GP prior.

Set iter = iter + 1.

If the total number of desired iterations reached then stop.

Go to Step-1.

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Fazelabdolabadi, B. Uncertainty and energy-sector equity returns in Iran: a Bayesian and quasi-Monte Carlo time-varying analysis. Financ Innov 5, 12 (2019).

Download citation


  • Quasi-Monte Carlo
  • Bayesian optimization
  • Bayesian network
  • Oil volatility index