Assessing Market Risk in BRICS and Oil Markets: An application of Markov Switching and Vine Copula

Abstract: This paper investigates the dynamic tail dependence risk between BRICS economies and world energy market in the context of the COVID-19 financial crisis of 2020, to determine optimal investment decisions based on risk metrics. For this purpose, the study employs a combination of novel statistical techniques ranging from Markov Switching, GARCH and Vine copula. Using a dataset consisting of daily stock and world crude oil prices; we find high probability of transition between lower and higher volatility regimes. Furthermore, our results based on the C-Vine copula confirm the existence of two types of tail dependence: symmetric tail dependence between South Africa and China; South Africa and Russia; and lower tail dependence between South Africa and India; South Africa and Brazil; South Africa and Oil. For the purpose of diversification in these markets, we formulate an asset allocation problem using C-vine copula-based returns and optimize it using Particle Swarm algorithm with a rebalancing strategy. The results show an inverse relationship between the risk contribution and asset allocation of South Africa and oil market supporting the existence of lower tail dependence between them. This suggests that when South African stocks are in distress, investors tend to shift their holdings in oil market. Similar results are found between China and oil. In the upper tail, South African asset allocation is found to have an inverse relationship with that of Brazil, Russia and India suggesting that these three markets might be good investment destinations when things are not good in South Africa and vice-versa.

istence of conditional volatility problem in financial assets and how it helps in portfolio diversification and asset allocation. These models have undoubtedly emerged as the most popular tools that offer flexibility to capture the dynamics of conditional variance and covariance between markets and in turn aid with interpretation of dependency structure.
A few but not an exhaustive list include the most recent study in McIver and Kang (2020) who propose a multivariate dynamic equicorrelation model (DECO-GJR-GARCH) introduced by Engle and Kelly (2012) in order to overcome the curse of dimensionality of the Dynamic Conditional Correlation (DCC) GARCH. The study examines dynamics of spillovers between the BRICS and US stock markets and conclude that the U.S., Brazilian and Chinese markets are major source of volatility, whereas the Russian, Indian, and South African markets are mostly on the receiving end.
A different approach was conducted in Kocaarslan, Sari, Gormus, and Soytas (2017) where they investigate the impact of volatility between BRIC and U.S. stock markets with a combination of quantile regressions and time varying asymmetric dynamic conditional correlation (aDCC) GARCH and find volatility asymmetries in BRIC and U.S. equity markets. A similar study was also done in Morema and Bonga-Bonga (2020) using a vector autoregressive asymmetric dynamic conditional correlation generalised autoregressive conditional heteroskedasticity (VAR-ADCC-GARCH) to assess volatility spillovers and hedge effectiveness between gold, oil and equity market. They find significant volatility spillover between the gold and stock markets, and the oil and stock markets. Whereas, Bonga-Bonga (2018) assess the extent of financial contagion between south Africa and other BRICS countries with VAR-DCC-GARCH and finds evidence of cross-transmission and dependence between South Africa and Brazil. Mensi, Hammoudeh, Nguyen, and Kang (2016) examine dynamics of spillovers between the BRICS and US stock markets multivariate Dynamic Conditional Correlation Fractionally Integrated Asymmetric Power ARCH (DCC-FIAPARCH) that captures long memory property in time series and find that Brazil and China are the major sources of spillover effects. Bhar and Nikolova (2009) find negative interdependence between the BRICS and other markets.
Since Sklar (1959) seminal paper, copula models have recently gained popularity as robust tools to quantify non-linear dependences and non-Gaussian returns in financial markets due to their flexibility to capture and model dependence structure separately from the distribution margins without the loss of information in the joint distribution. In particular, vine copula which are a class of copulas also known as pairwise copula constructions (PCCs) were first introduced in Aas, Czado, Frigessi, and Bakken (2009) as more efficient techniques built from graph theory to model high dimensional dependence structure. Perhaps, early application to financial economics using GARCH filter can be found in Brechmann and Czado (2013). A study by Kumar, Tiwari, Chauhan, and Ji (2019) examine dependence structure between the BRICS stock and foreign exchange markets with dependence-switching copula. They find symmetric tail dependence during negative correlation regimes for all countries with the exception of Russia and find asymmetric dependencies for all countries during positive correlation regimes. An application of a combination of GARCH and copula models can be found in Hou, Li, and Wen (2019) where they examine evidence on the volatility spillover between fuel oil and stock index futures markets in China with DCC-GARCH model to quantify the nonlinear interdependences.
Other recent similar studies are in BenSaïda (2018) where they investigated the contagion effect in European sovereign debt markets and find a better performance of regime-switching copula models in comparison to the single-regime copula. While, Sui and Sun (2016) use vector autoregressive model (VAR) without the volatility structure to test spillover effects. They find U.S.
shocks to significantly influence stock markets in Brazil, China, and South Africa. Chkili and Nguyen (2014) compliments the study by adopting a Markov switching VAR framework with regime shifts in both the mean and variance a model. Their framework allows to not only detect potential regime shifts in the stock market returns, but also investigate the impact of crises on the stock market volatility.
More copula approaches are found in, Kenourgios, Samitas, and Paltalidis (2011) who investigated financial contagion in (BRIC) and two developed markets (U.S. and U.K.) with a regime switching copula and combined with a GARCH model. The study used a multivariate time-varying asymmetric regime-switching copula model, with marginals assumed to follow a GJR-GARCH framework. In another setting Mba and Mwambi (2020) employ Markov switching GARCH to quantify risk among cryptocurrency portfolio selection and optimization problem.
Clearly, there is a vast literature on methodological approaches which contains mixed findings on the direction and existence of co-movements among BRICS and Oil markets. However, few studies have taken into account the impact of switching volatility markets and joint dependency structure on BRICS and Oil markets to assess diversification benefits. Hence, this presents an opportunity to contribute to the existing literature by exploring alternative model construction to capture complex dependence structures that correctly account for downside risk in a portfolio. The reminder of this paper is organized as follows: Section 2, provides the adopted methodological background, Section 3 outlines the data descriptive statistics of BRICS and oil market indices together with a detailed summary of the empirical findings and finally, Section 4 concludes the paper.

Specification of VAR(2) model
In the first step of the estimation process we consider that a -dimensional random vector of stock log returns. We filter the logarithmic returns through a VAR(2) conditional mean and then apply the two-state Markov-switching skewed Student-t GJR-GARCH model. The vector autoregressive VAR(2) model satifies the following equation,

Markov Switching-GJR-GARCH models
In the second step, using the filtered residuals obtained from the VAR(2) model in section 2.1 we adopt a GJR-Garch model of Glosten, Jagannathan, and Runkle (1993) with skewed Student t innovations, see Hansen (1994). The MS-GARCH(1,1) is a two-state Markov-switching GARCH(1,1) model proposed by Haas, Mittnik, and Paolella (2004 ,d, k=1,2 where are filtered residuals (marginals) obtained from the VAR(2) mean equation (1), the parameters are such that, and to guarantee positive variance.
Covariance-stationarity in each regime is obtained by requiring that .
. is an indicator function which controls the leverage effect and take a value of one if the conditions hold, and zero otherwise. The coefficient is a state dependent variable which captures the degree of asymmetric in the conditional volatility due to the impact of positive and negative shocks. Hence, the GJR model allows good news ( > 0) and bad news ( < 0) to have differential effects on the conditional variance. The good news has an impact of , while bad news has an impact sum of + and when leverage effect exists hence, negative shocks will increase volatility more than positive shocks and the leverage (gearing ratio) will increase, when positive shocks will increase volatility more than negative shocks. The distribution of the residuals is assumed to be follow a skewed student-t (abbreviated sstd) which is suitable in capturing fat-tails and skewness. For a complete specification refer to Trottier and Ardia (2016).
Using a two state regime, the Markov probability of switching regimes at time can be formulated in mathematical notation as follows: ( 3) where the distribution of depends on the distribution of , and denotes a square matrix of transition probabilities where the each sum to 1. The entry is a conditional probability of switching to state at time given that the system was in state at time .

Copula models
In the last step, we use the standardized innovations filtered using a Markov switching GJR-GARCH(1,1) model with skewed Student t innovations from section 2.2 to construct a -dimensional random vector each with independent samples . In the first part we use Sklar(1959) theorem that states that any multivariate joint distribution function, can be decomposed in terms of cumulative univariate marginal distribution functions and a copula as: where is the density of the -dimensional copula . In the second part based on Sklar theorem provides a converse and states that, given any -dimensional It is the second part of the theorem that is more attractive in many applications of financial economics that quantifies the dependency structure. For a complete theoretical treatment see references in, Nelsen (2007), Cherubini, Luciano, and Vecchiato (2004)

Vine Copula models
In this section, we study dependency structure of BRICS and Oil markets by constructing multivariate distributions using bivariate building blocks also known as pair-construction copulae (PCC) see, Joe (1996); Aas et al. (2009); Bedford and Cooke (2001), (2002) The corresponding standardized residuals for each marginal distribution from equation (2) are now considered as an independent and identically distributed (i.i.d ) samples generated over time. Following, Bedford and Cooke (2002), let with joint density function . The decomposition of a multivariate distribution in equation (5) into products of conditional densities can be represented as follows; Joe (1997) shows that the conditional marginal distribution of the form for the pair-copula can be written as follows, where for every is a bivariate copula distribution function; v is a d-dimensional vector; is an arbitrarily chosen element of v and v_j denotes the v vector except .
A regular vine copula, R vine is a regular vine distribution, where all margins are uniformly distributed on An d-dimensional regular vine tree structure is a tree sequence of linked trees which satisfy the following conditions: 1. is a connected tree with nodes and a set of edges denoted by ; 2. For , is a connected tree with nodes and edge ; 3. Edges in tree become nodes in tree . That is, if two edges in tree are to be joined as nodes in tree by an edge, they must share a common node in (Proximity condition).
A regular vine is called a canonical vine, C-vine, if each tree has a unique node of degree and therefore, has the maximum degree. While, a regular vine is called a drawable vine, D-vine if all the nodes in have degrees (The number of neighbors of a node ) no greater than 2.
Note that the construction of R vine is not unique. There are number of all possibilities of choosing edges, R-vine tree sequence in dimensions.
3 Empirical Analysis

Data
The dataset consists of daily stock prices and world crude oil for the BRICS countries obtained from Yahoo finance during the period January 01, 2014 and July 17, 2020 giving a total of 1300 daily observations for each asset. This sample period includes the 2020 period of the current coronavirus stock market and oil market crashes. Prices have been converted to continuous compounded returns using this relationship. , where is return of market , and is closing price of stock market or world crude oil. Table 1 provides descriptive statistics of continuous compounded returns and the unconditional sample correlations. The mean of stock market returns are all positive with relative annualised standard deviation of around 24% suggesting the presence of common risk factors in stock market as a whole. However, the Oil exhibits a negative mean return with significantly higher annualised standard deviation as a measure of risk. In addition to that, stock market returns are all negatively skewed with excess kurtosis which indicates the lack of symmetry in the underlying data distribution and a higher probability for investors experiencing extreme losses on the left tail during bear markets regime (downturn). This is supported by Jarque-Bera statistic which leads to the rejection of the normal distribution and the presence of leptokurtic behaviour.
Our modelling strategy aims to account for this asymmetry behaviour by using a skewed t distribution in our Markov Switching GARCH framework.   Table 3 reports the initial estimation from a vector autoregressive VAR(2) model with lag length based on the BIC and AIC information criteria. The first and second lag 2 coefficient of Oil has low significance impact on the BRICS. This is also supported by the VAR (2)  The coefficients for India are statistically significant and highlight a strong negative influence across all other markets Table 4 provides a summary of in-sample parameter estimates for the MS-GJR-GARCH model with a two-state asymmetric Student t specification. The table highlights interesting findings where all parameter estimates are statistically significant and indicates that the evolution of volatility process is not homogeneous across the two regimes. The results show that the unconditional volatility are different between the regimes and leverage effects coefficients are positive, statistically significant at 5% level and heterogeneous. This suggests that negative shocks in a country will tend to increase volatility more than positive shocks. The results also highlights heterogeneous volatility persistence between the two regimes where regime 1 is characterized by high volatility persistence and regime 2 by low volatility persistence.

Measuring Dependence with Vine copula
We analytically construct pair-copula (PCC) with regular R-vine and canonical C-vine models by first using the independence test based on Kendall's tau for each pair. The test results rejects the null hypothesis of independence. Based on the AIC and BIC information criteria; we also find the C-Vine to be the best model in describing the dependence behaviour although R-vines are mainly preferred models which account for tail dependence of different pairs of random variables.  However, the dependence in Tree 3, Tree 4 and Tree 5 are relatively negligible. The lower tail dependence found between South African stock market and India, Brazil and Oil market is vital as it might help investors diversify their portfolio during times of financial distress.  The R-vine copula results reported in Table 6 below also exihibit lower tail market dependence between Brazil and Oil, South Africa and India; symmetric tail dependence between Brazil and Russia, South Africa and Russia, South Africa and China. The dependence in Tree and Tree 5 are small to draw any meaningful conclusions.

Market Risk Under Portfolio Rebalancing
In this section, we propose a multi-objective asset allocation model for a portfolio that maximizes return and minimizes the Conditional Value-at-Risk (CVaR) with a confidence level of . The transformed data obtained from R-vine copula are now used to construct a monthly rebalancing optimization strategy using a Particle Swarm Optimization (PSO) algorithm.
Let be the portfolio weights vector for 6 risky assets which represent the decision variables. Then, the investor solves the following optimization problem; where and is defined as the smallest number such that the probability of a negative loss is not higher than ( ) quantile of the distribution; is the maximum portfolio mean. We assume no short selling portfolio (long portfolio) thus, are non-negative portfolio weights. First, Table 7 reports the results of a benchmark model with no regime switching and dependency structure. It is clear that no asset dominates the weight allocation and the overall portfolio CVaR is around . Table 8 takes into account the regime switching with no dependency structure with overall risk contribution averaging A similar observation . Table   9 shows the results that accounts for both regime switching and dependency structure with smallest CVaR of . Overall, the R vine portfolio has best performance over the rebalancing period as dispicted in Figure 3. Table 7 Risk and weight allocation without regime switching and dependence. Table 8 Risk and weight allocation with regime switching only.

Conclusion
This study attempted to analyze the tail dependence structure in BRICS and oil markets, and to determine optimal investment decisions in these markets using a combination of different statistical techniques including Markov switching GJR-GARCH, vine copula and Particle Swam optimization techniques. The returns series of the indices were first pre-filtered using VAR to model the dependence on the conditional mean and then use a MS-GJR-GARCH process to remove the effects of autocorrelation and heteroscedasticity and at the same time account for regime switching to separate lower from higher volatility regime. We found high probability of transition between lower and higher volatility regimes. Pairwise copula construction was done using vine copula. The copula was adopted to account for different dependence structure among each pair in the BRICS and oil markets. Our estimation using Akaike Information criteria showed that C-vine copula was able to best fit each pair of constructed dependence.
We found two types of tail dependence structure: -symmetric tail dependence between South Africa and China; South Africa and Russia; and lower tail dependence between South Africa and India; South Africa and Brazil; South Africa and Oil. However, the dependence in Tree 3, Trees 4 and Tree 5 were relatively negligible. The lower tail dependence found between South African stock market and India, Brazil and Oil market is vital as it might help investors diversify their portfolio during times of financial distresses. To determine optimal investment strategies in these markets; we made use of the estimated C-vine copula to simulate returns for these markets and applied the Particle Swam optimization technique to determine optimal weight allocations.
Particle Swam is a nonlinear and nonparametric techniques that finds optimal solution iteratively by trying to improve the candidate solution and avoid producing sub-optimal investment solutions.
The optimization results under a rebalancing strategy confirm the existence an inverse relationship between the risk contribution and asset allocation of South Africa and oil supporting the existence of lower tail dependence between them. We argue that when South African stock market is in distress, investors tend to shift their holdings in oil market. Similar results were found between China and oil. In the upper tail, South African asset allocation was found to have an inverse relationship with that of Brazil, Russia and India suggesting that these three markets might be good investment destinations when South African stock market is in financial turmoil and vice-versa. Furthermore, we find that the rebalancing strategy with regime switching and dependence structure outperforms a portfolio strategy without regime switching and dependency and a portfolio with only regime switching. These findings are vital for international investors, policymakers, and regulators during both bull and bear markets. However, the limitation of this model is its inability to account for other hidden stylized facts such as price jumps and long-memory process in stock returns and future research with try to account for these.