On the relationship between oil price, exchange rate and stock market performance in South Africa: Further evidence from time-varying and regime switching approaches

Abstract The study examines the dynamics between oil price, exchange rate, and stock market performance in South Africa using DCC-GARCH, time-varying VAR, and multivariate Markov regime switching models. Monthly data on oil price, exchange rate, and market capitalization as a measure of stock performance from 2003(01) to 2019(7) were employed. The results of DCC-GARCH model show that dynamic conditional correlation among the variable was stable with few exceptionalities. The empirical findings from time-varying VAR show existence of feedbacks from stock market to oil price. Markov regime switching VAR model results show that exchange rate and market capitalization have significant effects on oil price in booming period. The study concludes that stock market performance provides an important policy help in stemming the erratic fluctuations in oil price. Appropriate knowledge of the linkage between oil price, exchange rate and stock market performance in South African economy is important because of her heavy reliance on oil importation. The upward change in oil price has so many overlapping effects on many sectors of the economy in form of increase in cost of goods and services (inflation) and lower standard of living among others. Hike in oil price is believed to also worsen the external value of Rands. This could send some dangerous signals to foreign investors in the stock market, which may undermine the performance of the stock market. Empirical knowledge of this dynamic could assist the policy makers to come up with mitigating policies to reduce the effects of oil price volatility on other economic fundamentals.


Introduction
Assessing the dynamic relationship between oil price and macroeconomic aggregates such as exchange rate, inflation, and gross domestic product (GDP) among others has attracted considerable attention in the literature. Existing studies have largely examined the nexus between oil prices and macroeconomic variables (e.g., Aloui et al., 2013;Arora & Tanner, 2013;Berument et al., 2014;Buetzer et al., 2016;Chen & Chen, 2007;Li et al., 2012;Reboredo, 2012;M. I. Turhan et al., 2014), and the evidence is well documented. Similarly, stock market of a country is an important fragment of economic activity because it is regarded as a reflection of social mood of a country as well as a pointer to her economic strength and development (Hamilton, 1983(Hamilton, , 1996(Hamilton, , 2008Kilian, 2009;Mork et al., 1994). Oil price changes affect performance of stock in many ways. Cash flows and discount rates are important factors affecting stock performance according to stock pricing model. Meanwhile, crude oil is an essential element in production process, and oil price changes affect stock prices through higher manufacturing costs and the expected cash flows of companies. Production costs are raised by higher oil prices, which in turn leads to lower cash flow. Also, the discount rate plays an important role in stock prices determination and is influenced by oil price fluctuation via exchange rate. Oil price changes is expected to significantly affect stock prices of oil importing countries like South Africa through exchange rate. As a result, subsequent empirical efforts have also focused on the relationship between oil price and stock market but with divergent and varying conclusions (Hamdi et al., 2019;Wang et al., 2020). Narayan and Gupta (2015), Bjørnland (2009), Gogineni (2008), Narayan et al. (2008), Sadorsky (1999), and Cunado and de Gracia (2014) among others found positive relationship between oil price and stock price performance, while El-Sharif et al. (2005), Arouri and Rault (2012), O'Neill et al. (2008), Papapetrou (2001), and Sadorsky (1999) observed a negative relationship between oil price and stock performance.
On the other hand, some studies noted that there is no relationship between oil price and stock price (Apergis & Miller, 2009;Sukcharoen et al., 2014). Empirical studies on this subject matter remain inconclusive, while the evidence from South African economy is still very lean. Most of the available studies in South African economy, such as Kin and Courage (2014), have mainly focused on oil price and exchange rate dynamics without recourse to stock market dynamics. The major assumption of standard time series analysis is that parameters of the data generating model are constant across the time. Most of the empirical studies have followed suits by assuming parameters constant. While constant parameters are often assumed, parameters changing are however often observed in real life. Hence, this study would be adopting time-varying analysis between oil price, exchange rate, and stock market dynamics. Based on the findings of the Shahrestani and Rafei (2020) that the impact of oil price on stock market is regime dependent, this study also adopts multivariate Markov switching model to examine the impact of oil price and exchange rate on stock market performance. Empirical studies on this subject matter have largely focused on the feedbacks from oil price to stock market with little attention on the feedback effects from stock market to oil price. The present study considers the possibility of feedback effects from stock market to oil price in South African economy since South Africa is a widely opened economy with myriads of investors being foreign investors. As such, whatever happens in the stock market would expectedly affect exchange rate and perhaps the oil price since the economy is majorly an oil importing economy.
South Africa is the most developed economy in sub-Saharan Africa and unarguably the second largest economy in Africa, but unfortunately nearly half of the population could be said to be poor. Oil is fundamental to South Africa's economy because the economy heavily depends on imports for more than two-thirds of her petroleum fuel needs. An increase in the oil price has myriads of negative effects on transport, industry, and agriculture because they are oil driven. The impact of oil price increase portends great danger for the agricultural and industrial sectors in form of increase in cost of goods and services (inflation) and loss of jobs. Also, the impacts of oil price increase further worsen the performance of Rands as it increases the demand for foreign currency relative to Rand. The negative effects are aggravated by the increase in domestic cost of production of goods and services, which might lead to more importation and hence further weaken the Rand.
The remainder of the study is structured as follow: section 2 synthesizes the existing literature. Empirical approach is outlined in section 3. Section 4 presents the empirical findings. The last chapter concludes the study.

Empirical review
The nexus between oil price and various macroeconomic variables have been extensively explored by a handful of empirical studies, such as Hamilton (1983), Gisser and Goodwin (1986), Mork (1989), Davis and Haltiwanger (2001), and Hooker (2002) among others. For instance, the nexus between oil price and inflation has received substantial research efforts (Chen, 2009;De Gregorio, 2012;De Gregorio et al., 2007;Hooker, 2002;Van den Noord & André, 2007). Of significance to the current discussion is the nexus between oil price, exchange rate, and stock market performance. Habib and Kalamova (2007) studied the relationship between oil price and exchange rate in Russia, Norway, and Saudi Arabia. They concluded no significant impacts of oil price on exchange rates in Norway and Saudi Arabia, while significant positive impact was found in Russia. El Abed et al. (2016) investigated the effects of exchange rate on oil price fluctuations in MENA countries. Their findings showed that shocks to oil prices produced a significant effect on exchange rate in short run, while the effect was found to be insignificant in the long run. Similarly, Turhan et al. (2013) considered the influences of oil prices on the exchange rates of some selected evolving economies (namely Brazil, Argentina, Colombia, Mexico, Indonesia, Peru, Nigeria, Poland, Russia, Philippines, South Africa, South Korea, and Turkey). Their findings showed that, with the exception of Argentina and Nigeria, shocks to oil price provoked reduction in value of the exchange rates. This position was corroborated by some other empirical studies on oil price and exchange rate nexus (Ahmed et al., 2016;Buetzer et al., 2016 among others;Jiranyakul, 2015;Ogundipe et al., 2014;Rickne, 2009). These studies failed to however explore the possibility of feedback effect from exchange rate to oil price apart from ignoring the role of time variation in their analysis. The present empirical efforts contribute to few empirical studies on time-varying relationships between oil price and exchange rate nexus and also considered the possibility of feedbacks from exchange rate and to oil price.
The studies on the dynamics between oil price and stock market performance has not received desired empirical attentions and without any consensus as to the impacts of oil price on stock market performance. Findings from the empirical efforts are entirely inconclusive and largely unsettled, and as such, evidence from empirical findings can be classified on three different strands. Evidence of a negative effect of oil price on stock market performance was documented by (Awerbuch & Sauter, 2006;Basher & Sadorsky, 2006;Hammoudeh & Choi, 2006;Jones & Kaul, 1996;Kilian & Park, 2009;Miller & Ratti, 2009, among others;Nandha & Faff, 2008;Papapetrou, 2001;Sadorsky, 1999). A more recent empirical findings by Köse and Ünal (2020) on the subject matter also argue that oil price has significant negative effects on stock returns in Iran, Kazakhstan, and Russia. This position is also recently corroborated by Singhal et al. (2019). They explored the dynamic relationship between oil prices, international gold prices, exchange rate, and stock market performance in Mexico. They found that oil price negatively affects stock market performance, while exchange rate was also found to be negatively affected.
On the other hand, some studies (e.g Arouri & Rault, 2012El-Sharif et al., 2005;Narayan et al., 2008;Zhang & Chen, 2011) also argued that oil price has significant positive effects on stock market performance. Bernanke (2016) contends that fundamental demand factor is responsible for most of the significant positive impacts of oil price on stock market. Reboredo and Rivera-Castro (2014) examined the interdependence between oil price shocks and the stock returns in the post global financial crisis with a focus on the aggregate and sectoral level. They found positive relationship between oil price shocks and the stock market performance. Similarly, Ferreira et al. (2019) queried the relationship between oil prices and stock markets of some selected countries. The empirical evidence showed that there is low but positive correlation between oil price and stock markets performance. They also provided evidence of oil prices having a positive effect on the stock market. Mixed evidence was provided by another recent study by Thorbecke (2019). He argued that oil price has positive impacts on stocks market performance in some East and Southeast Asian countries, while negative impacts were also found in some other East and Southeast Asian countries. The last group of findings conclude that oil prices has no effects oil stock market performance (e.g., Blanchard & Gali, 2007;Lescaroux & Mignon, 2008;Henriques & Sadorsky, 2008;Miller & Ratti, 2009;Apergis & Miller, 2009;Sukcharoen et al., 2014).
One of the most recent arguments in the literature is that the relationship between oil price and stock return is time varying (Reboredo & Rivera-Castro, 2014;Nasir et al., 2018). This study therefore employed time-varying approach to query the relationship between oil price and stock market performance as few studies have followed the time-varying approach on oil price and stock returns nexus. This study specifically uses time-varying VAR to explore the possibility of feedbacks from stock market to oil price, which hitherto has not been given a consideration in the literature. Also, the present study contributes to the submission of Shahrestani and Rafei (2020) that the impact of oil price on stock market is regime dependent. This study hence employed multivariate Markov switching model to examine the dynamics between oil price, exchange rate, and stock market performance.

Data description and summary
Time series data were collected from the South African Reserve Bank (SARB). Monthly data on oil price, exchange rate, and market capitalization as a measure of stock performance from 2003 (01) to 2019 (7) were employed. The study aims at examining the time-varying correlation among the variables using dynamic conditional correlation (DCC-GARCH model), time-varying responses using time-varying VAR, and the impacts of oil price and exchange rate on stock market performance using multivariate Markov switching model. The movements of all the variables are depicted in Figure 1. The variables depict both increasing and decreasing trend over the period of the study. Oil price displayed high fluctuating trend with spikes around 2007 and 2008. The value of South African Rand fell largely during the period under consideration relative to US Dollar as the exchange rate increased on the average over study period. Also, the market capitalization also increased during the study period with lowest fall around 2007 and 2008 due to global economic crisis of that era. Table 1 presents the summary statistics for the log-returns (dl) of the variables under considerations. The means for all the returns are closed to zero. Oil price displays the highest volatility as suggested by standard deviation. The most important deductions from the descriptive statistic is  that the null hypothesis of normality assumptions is rejected as shown by the significance of Jacque Berra statistic. This underscores the need to use a GARCH-like model such as DCC. The nonnormality of the variables is further affirmed by histogram plots of the monthly returns, as displayed in Figure 2.  Figure 3 present the pair wise correlation coefficients, which is static correlation coefficient. Expectedly, the correlation coefficients between the variables is low. These correlation coefficients are however static as they do not show the correlation changes, which occur over time. It only presents the contemporaneous or instant relationship over a period. The present study utilizes Dynamic Conditional Correlation (DCC-GARCH) to investigate time-varying correlation among the variables.

GARCH-DCC model
The specified GARCH(p,q) model is employed using model is estimated using Maximum Likelihood Estimation (MLE) techniques. It is represented by the subsequent equations where r t is a residual from fitted VAR equation.
ε t is already standardized disturbance term as a result of mean removal from the VAR residual series. The log of volatility of ε t is given as a function of its own lagged values and lagged  standardized disturbance terms. β 0 s are the persistence of volatility and α 0 s represent the GARCH effects. We re-standardized the standardized residual from the VAR equations.
The following variant of DCC is used for estimation in R statistical package: where Q t is the Dynamic Conditional Correlation, and z t is the standardized residuals from GARCH's.
α, β are the persistence of correlation, � Q is the initial correlation matrix at  Primiceri (2005) came up with multivariate time series model, which permits time variation in the coefficients and in the variance covariance matrix. The TVP-VAR model can be stated as follow:

TVP-VAR model
where y t is a column matrix of the observed variables, while B i:t are square matrix of time-varying coefficients; ε t is independently and identically distributed with 0; I k ð Þ; A t is the lower triangular matrix The model can be restated as where the parameters β t ; A t , and ∑ t are all time-varying, a t is assumed to be a stacked vector of the lower triangular elements in A t , and h t ¼ h 1t . . . . . . . . . . . . ; h kt ð Þ with h jt ¼ log σ 2 jt for j =1, . . . . . . .,k and t = s + 1, . . . . . . ., n. The parameters follow a random walk process and they are specified as follow:

Multivariate Markov regime switching model
The present study follows Hamilton (1989). The probabilities of switching from one regime to another one is computed in a Markov switching model (Tong, 1983;Hamilton, 1989).
The model is given as where s t assumes values in 1; or2 f g and is a first-order Markov chain with transition probabilities. The state transition model is determined by the transition probabilities where, where 0<p ii <1: In matrix notation, the transition probability matrix is given as: It is also of economic importance to calculate the steady state probabilities, which is the unconditional probabilities that the system is in regime one (p 1 ) and the system is regime two (p 2 Þ and are stated as follows:

DCC-GARCH results
All the variables are expressed in logarithmic form. Augmented Dickey Fuller and PP test were conducted to examine the stationary property of the series. Levels of the series showed presence of a unit root, while first differencing them showed the absence of a unit root and therefore stationary. Differenced variables are represented by adding "dl" to the level variable name. These differenced variables are then fitted to a DCC-GARCH model. DCC with multivariate Skew Student-t Distribution (sstd) and DCC with multivariate Student-t Distribution (std) were modeled. DCC with multivariate Student-t Distribution however yielded a lower Akaike Information Criteria and was fitted for the study.
The time-varying correlations among the variables are plotted in Figure 4. As displayed in Figure 4, the dynamic correlations among the variables are relatively stable.
The dynamic conditional correlations between market capitalization and oil price are entirely in positive region with highest coefficient value of 0.34 around 2004 and lowest correlation around 2016. Overall, the dynamic conditional correlation between the oil price and market capitalization during the study period is positive. This indicates both oil price and market capitalization move in the same direction, though the relationship during the entire period is weak as the highest correlation value was less than 0.5.
The dynamic correlation coefficients between market capitalization and exchange rate of US Dollar to South African Rand oscillate between the negative zone and positive zone with more coefficients taking negative values than positive value. The negative coefficients show the period the movement between market capitalization and the exchange rate move in opposite direction, though the strength of the relationship is also observed to be weak. Theoretically, increase in the exchange rate of US Dollar to South African Rand would have a downward effect on the performance of stock market. This perhaps explain why most of the coefficients are negative during the study period. The positive coefficients are however observed during some periods with highest positive value being 0.15. The positive coefficients could be associated to other underlying happenings in the economy. The dynamic conditional correlation coefficients between oil price and the exchange rate of US Dollar to South African Rand also oscillate between the positive and negative zones. Since South Africa is majorly an oil importer, one would expect that correlation coefficient values during the period to be completely positive as higher prices of oil motivate upward pressure on the Rand exchange rate. However, existing reality from empirical findings show that timevarying correlation between the two variables oscillate between the positive zone and negative zone. It is however worthy to be mentioned that correlation is not the same as causation as it only shows the strength of the relationship. The empirical analysis suggests that time-varying correlation among the variables under consideration over the entire study period is not really strong in South African economy.

TVP-VAR model results
The DCC-GARCH model is employed to explore the time-varying contemporaneous correlation among the variables. Nevertheless, this does not provide information on time-varying dynamic responses among the variables. This study therefore employed TVP-VAR model to investigate the dynamic relationship among the variables. The optimum lag order of 2 was selected based on the AIC rule. The impulse response graphs from the time-varying parameter VAR estimation approach are presented in Figures 5-7.
The impulse response graph in Figure 5 shows the time-varying responses of the variables to shock to market capitalization. The results show that market capitalization fell sharply in response to its own shock, while it slightly rose again as the effects begin to dissipate and subsequently fade away. Rand exchange rate fell sharply due to positive shocks to market capitalization. This means that positive shocks to market capitalization makes the South African Rand to appreciate possibly because of the increased demand for Rand due the higher demand for her stocks in foreign market. The exchange rate much later begin to rise till effects of the shocks completely fade away. Also, a shock to market capitalization lead to an initial but short rise in oil price and the oil price subsequently rose until the shock effects completely dissipate. Figure 6 shows the responses of the variables to exchange rate shocks. Rand exchange rate sharply fell, which signifies appreciation of the Rand relative to US Dollar in response to its own shock. It rose slightly much later and the effects subsequently faded away. The graph shows that positive shocks to exchange rate leads to immediate fall in market capitalization though the downward response was not much as it began to rise after a while and the rise spike up. The shock effects later begin to fall, until it finally fades away. The initial fall in market capitalization due to increase in exchange rate is not unexpected because of the effects of the appreciation of Rand in response to its own shocks. The appreciation means that more dollars would be needed by the foreign investors to trade in South African stock market, and this would contribute to fall in her stock demand by foreign investors and hence initial fall in market capitalization. Also, the shock to Rand exchange rate lead to increase in oil price. This is likewise not unexpected since import would become more expensive because the exchange rate shock lead to appreciation of Rand. This would make the oil price to rise since South Africa is fundamentally an oil importer. Figure 7 shows the response of the variables to oil price shock. Oil price sharply decline in response to its own shock. The fall in the oil price in response to its own shock persisted till the effects completely faded away. The Rand exchange rate fell (Rand appreciation) initially in response to the shock before it significantly rose again. The initial increase could be associated to increased value of Rand as fewer amounts of dollar would be demanded to import the same quantity of oil and hence increase in value of Rand. Consequent upon the initial appreciation of Rand due to oil price shock, fewer units of South African stocks would be demanded as more Rands would be needed to buy the same unit of stocks and hence fall in market capitalization. This explains why market capitalization immediate falls in response to oil price shocks, but subsequently rose as Rand exchange rate increases (depreciation of Rand) until the oil price shocks completely fade away.

Markov regime switching model results
Multivariate Markov switching regime analysis was done to reassess the position of Shahrestani and Rafei (2020) that the effect of oil price on stock market performance is regime dependent. The result is contained in Table 3. From Table 3, our findings show that only exchange rate has significant effect on stock market performance in regime 1, which is the low regime. Both oil price and exchange rate have no significant effect on stock market performance in regime 2. Interestingly, stock market performance and exchange rate have significant effects on oil price in regime 2. The effects of stock market performance on oil price is negative, while the effect of exchange rate is found to be positive. This shows that during the period of booming economic activities, an improvement in stock market performance will increase the participation of foreign investors in South African stock market and hence increased demand for South African Rand. The increase in the demand for South African will lead to appreciation of Rand, which in turns would lower the oil prices as fewer amounts of Rand would be needed to buy the same unit of US Dollar. Also, oil price is found to have significant positive effect on exchange rate in booming period. This is not unexpected, if there is an increase in oil price perhaps due to exogeneous factors, more US Dollars would be demanded to import the same quantity of oil, and this would lead to increase in exchange rate, which is depreciation of Rand. Coming to the recent argument of Shahrestani and Rafei (2020) that the impact of oil price on stock market performance is regime dependent in Tehran economy, the current empirical evidence from South African economy does not substantiate this submission. The impact of stock market performance on oil price is however found to be regime dependent. The transition probabilities that reveal the persistence of the impacts on each of the variable are also outlined in Table 3. The table shows that the probability that the impacts of exchange rate and oil price on stock market performance would persist in the low regime is 0.4119, while the probability of the impacts being persistence in high regime is very low and approaches zero. This by implication shows that exchange rate is an important factor affecting stock market performance during the period of low economic activities. This provides an important policy guide for government to moderate the fluctuation in exchange rate or increase in exchange rate (depreciation of Rand) during the period of low economic activities as it would have a negative impact on stock market performance. The empirical results further show that stock market performance and exchange rate have persistent impact on oil price in regime 2. The probability that impacts of exchange rate and stock market performance would have persistent effects on oil price during the booming period is almost 1. This implies that during the period of booming economic activities, exchange rate and stock market performance are important variables to influence the oil price in the economy. The impacts of oil price and stock market performance are more persistent when the economy is at low ebb, though the impact is not significant. However, during the booming period, government cannot close her eyes to oil price behavior as it is found to have significant impact on exchange rate despite the fact that the probability the economy will remain regime 2 is not high. These empirical findings are also corroborated by smoothed probabilities, presented in Figures 8-10. Smoothed probabilities present the probability of being in regime j at each period that is computed according to the available information of all the samples.

Concluding remarks
The study examines the dynamics between oil price, exchange rate, and stock market performance in South Africa using time-varying approach and Markov regime switching VAR models. Time series data were sourced from the SARB. Monthly data on oil price, exchange rate, and market capitalization as a measure of stock performance from 2003(01) to 2019 (7) were employed. The results of the static correlations show that the correlation among the variables is weak. The results of DCC-GARCH model show that dynamic conditional correlation between the oil price and market capitalization during the study period is positive. While the dynamic correlation coefficients between market capitalization and exchange rate of US Dollar to South African Rand oscillates between the negative zone and positive zone. Also, the dynamic conditional correlation coefficients between oil price and the exchange rate of US Dollar to South African Rand oscillate between the positive and negative zones. The empirical findings from time-varying VAR shows that Rand exchange rate fell sharply due to positive shocks to market capitalization and shock to market capitalization also produced responses from oil price, suggesting the existence of feedbacks from stock market to oil price. The Rand exchange rate fell (Rand appreciation) initially in response to the oil price shock before it significantly rose again and consequently initial fall in market capitalization. Markov regime switching VAR model results showed that oil price has no significant effects on stock market performance in both regimes, while exchange rate is found to exert significant impacts on stock market performance during the period of low economic activities. The results interestingly show that both exchange rate and market capitalization have significant effects on oil price in booming period. While oil price and stock market performance are found to have significant effects on exchange rate. The study concludes that stock market performance provides an important policy help in stemming the erratic fluctuations in oil price.