detection of structural regimes and analyzing the impact
TRANSCRIPT
Detection of Structural Regimes and Analyzing the Impact of Crude Oil Market on
Canadian Stock Market: Markov Regime-Switching Approach
Mohammadreza Mahmoudia , Hana Ghaneeib
a Department of Economics, Northern Illinois University, Dekalb, USA.
Email: [email protected]
b Department of Industrial and Systems Engineering, Northern Illinois University, Dekalb, USA.
Email: [email protected]
Correspondence
Mohammadreza Mahmoudi, , Northern Illinois University, Dekalb, USA..
Email: [email protected]
Abstract
This study aims to analyze the impact of the crude oil market on the Toronto Stock Exchange
Index (TSX) based on monthly data from 1979 to 2018 using a nonlinear Markov regime-
switching approach. The results indicate that TSX return contains two regimes, including: positive
return (regime 1), when growth rate of stock index is positive; and negative return (regime 2),
when growth rate of stock index is negative. The findings also show the crude oil market has
positive effect on the stock market in both regimes, however, the effect of oil price on the stock
market in regime 1 is more than regime 2. Moreover, two period lag of oil price increases stock
price in regime 1, while it decreases stock price in regime 2.
Keywords: Toronto Stock Exchange Index; crude oil market; Markov switching VAR model
1. Introduction
The impact of the financial crisis in 2007 on the global economy strongly proves the pivotal role of the
stock market on the economy. The stock market through different financial instruments could provide
diverse funding for companies and motive economic growth. These positive effects of the stock market in
developed countries like Canada are more obvious. Canada is the world's second-largest country by total
area, and its advanced economy is the tenth-largest in the world. Moreover, this country has the sixteenth-
highest nominal per-capita income globally as well as the twelfth-highest ranking in the Human
Development Index. The TSX is the ninth-largest stock exchange in the world by market capitalization. As
summarized in Table 1, stock market capitalization for Canada was 1.937 trillion dollars in 2018. The
percent of stock market capitalization in the economy (113%) and stock traded in percent of Gross Domestic
Product (GDP) (80.2%) shows the important role of the stock market in Canadian economy.
Table 1.Economic data of Canada
Rank in the World
GDP (constant 2010 Trillion USD) $ 1.904 17
GDP growth (annual %) 1.88
Population 37,058,856 38
Population growth (annual %) 1.41
GDP per capita (constant 2010 USD) 51382.42 18
GDP per capita growth (annual %) 0.45
Stock Market Capitalization (Trillion USD) $ 1.937 9
Market Capitalization in percent of GDP 113.2 %
Stocks traded (Trillion USD) $1.373
Stocks traded in percent of GDP 80.2
Listed domestic companies 3,330
S&P Global Equity Indices -19.4 %
2018 Crude Oil Exports (Billion USD) $66.9 4
Oil Export in percent of World Total 5.9
Note. Data are from Word Bank
The stock price index shows the general trend of the stock market fluctuations. In fact, the degree of capital
market success or failure is detected according to the trend. Thus, portfolio managers and investors who
deal with stock trading and other financial assets in the market need various factors affecting the stock price
under different economic conditions in order to maintain and increase their value of portfolio.
Moreover, several factors affect the returns of the stock exchange. One of the affecting factors is oil price.
Oil and its products are used as the main source of energy in manufacturing processes around the world;
thus, volatilities in oil price can affect the cost of production and company profitability Ahamed (2021).
Oil is the most important source of income for exporting countries like Canada, therefore, its price and
volatilities can affect the natural sector and the capital market. Based on Table 1, Canada exported 66.9
billion dollars of, in oil in 2018, 5.9 percent of total oil market. Canada is the fourth largest producer and
exporter of oil in the world and 96% of Canada’s proven oil reserves are located in the oil sands. (Data are
from Word Bank)
All in all, the oil market plays a pivotal role in the economics of Canada. In addition, nowadays stock
markets have inevitable role in growth economics of developed country such as Canada. Because of these
issues we want to analyze the effect of oil market on stock market in Canada. In this paper, we use a Markov
switching var model to examine this relationship. First, we introduce some important papers, which use
different Markov switching models, to analyze the relationship between oil price and the stock market.
Then, we use data and run the MSI-VAR model to find the best fitted model to show the relation between
TSX and West Texas Intermediate Crude Oil (WTI). Finally, we discuss main results and provide
conclusion.
2. Literature Review
Regime switching models have been used considerably in computational economics and econometric time
series analysis. The majority of these models introduce two regimes with a state process determining one
of the regimes to take place in each period. The bivalued state process is typically modeled as a Markov
chain. Hamilton (1988) conducted the autoregressive model with this type of Markov switching in the mean.
In Hamilton (1989) , a two-state Markov switching model in which the mean growth rate of Gross national
product (GNP) is subject to regime switching was specified, where the errors followed a regime-invariant
AR(4) process. The Hamilton method was further analyzed by Kim (1994). Several authors introduced
Markov switching in a more general class of models such as regression models and volatility models.
Filardo (1994) used an MSAR(4) switching mean model to simulate the log growth rate of industrial
production (DLOGIP). He used the log growth rate of the Composite Index of Eleven Leading Indicators
(DLOGIDX) as a business-cycle predictor.Krolzig (2000) studied the common business cycle of six
Organization for Economic Co-operation and Development (OECD) countries across four continents by
using Markov switching Vector Autoregressions (MSVAR). Moreover, various statistical characteristics of
the Markov Switching model have been analyzed by Garcia (1998), Timmermann (2000), Cho and White
(2007), and (Mohammad and Mohammad 2010) .
On the other hand, there are several important papers which focused on the relation between the oil market
and the stock market in different countries. Park and Ratti (2008) examined the effect of oil market price
volatilities on key financial variables such as stock prices in the United States and thirteen developed
countries. The result showed a statistically significant relationship between oil price volatility and stock
index, however, the type of the relationship depends on whether the countries are oil exporters or importers.
Fayyad and Daly (2011) compared the effect of oil prices shocks on the stock returns in GCC countries, the
United States and the United Kingdom. They found that the rise in oil price during the global crisis increased
the predictive power of oil prices on the stock market. In addition, the stock markets in Qatar and the United
Arab Emirates among GCC countries and the UK responded more to the shocks than other countries.Hussin,
Muhammad et al. (2013) and Alam (2021) by vector auto regression calculation (VAR), correlation
analysis, Granger causality test, Impulse Response Function (IRF) and Variance decomposition (VDC)
analyzed the relationship between the strategic goods (gold price, oil and i.e.) and the stock market in
Malaysia. The result showed that the stock returns do not have integrated correlation with strategic goods
in the long term. Moreover, according to Granger causality, only oil price variables among the strategic
goods will affect stock returns in the short term in Malaysia. Balcilar, Gupta et al. (2015) analyzed the non-
linear relationship of US crude oil and stock market prices from 1859 to 2013 using the Markov switching
vector error-correction model (MS-VECM). The results showed a two-regime model that divides the
sample into high- and low-volatility regimes based on the variance–covariance matrix of the oil and stock
prices.
3. Methodology
Based on (Hamilton 1989), the MS-AR model of order k with regime shifts in the mean and variance for a
time series variable 𝑦𝑡 is shown as follows:
𝑦𝑡 = 𝜇(𝑠𝑡) + [∑ 𝑎𝑖
𝑘
𝑖=1(𝑦𝑡−𝑖 − 𝜇(𝑠𝑡−𝑖))] + 𝜎(𝑠𝑡)𝑢𝑡 (1)
𝑢𝑡|𝑠𝑡~𝑁𝐼𝐷(0, 𝜎2) 𝑎𝑛𝑑 𝑠𝑡 = 1,2
where 𝑎𝑖 indicates the autoregressive coefficients. μ is the mean, 𝜎 is the standard deviations which depends
on 𝑠𝑡, the regime at time t.
We could extend Equation 1 further to specify MSM(M)-VAR(k) model as follows:
𝑦𝑡 − 𝜇(𝑠𝑡) = ∑ 𝑎𝑖
𝑘
𝑖=1(𝑦𝑡−𝑖 − 𝜇(𝑠𝑡−𝑖)) + 𝑢𝑡 (2)
where 𝑦𝑡 represents a k dimensional time series vector, 𝜇 is the vector of means, 𝑎𝑖, 𝑖 = 1,2,…, 𝑝 are matrices
of the autoregressive parameters and 𝑢𝑡 is a white noise vector process dependent on 𝑠𝑡.
In the above equations, we assumed the state variables, 𝑠𝑡, which specify the switching behavior of time
series variable, 𝑦𝑡, follows an irreducible ergodic two-state Markov process. This assumption indicates that
a current regime 𝑠𝑡 depends on the regime one period ago, 𝑠𝑡−1. Hence, the transition probability between
states is as follows:
𝑃𝑟(𝑆𝑡 = 𝑗|𝑆𝑡−1 = 𝑖, 𝑆𝑡−2 = 𝑘,… ) = 𝑃𝑟(𝑆𝑡 = 𝑗|𝑆𝑡−1 = 𝑖) = 𝑝𝑖𝑗 (3)
𝑝𝑖𝑗 denotes the transition probability from state 𝑖 to state 𝑗.
Generally, the transition probability is identified by a (𝑛×𝑛) matrix as follows:
𝑃 =
[ 𝑝11 𝑝12 … 𝑝1𝑚
𝑝21
...
𝑝22 … 𝑝2𝑚
𝑝𝑚1 𝑝𝑚2 𝑝𝑚𝑚]
∑𝑝𝑖𝑗
m
j=1
= 1, i = 1,2, . . . , m, and 0 ≤ 𝑃𝑖𝑗 ≤ 1
There are many Markov switching vector auto regression models that we could use to analyze the effect of
the oil market on the stock market. In Table 2 these models are summarized. All in all, we have two main
Markov switching var models, Markov switching mean and Markov switching intercept. It should be noted
that, MSM and MSI models are different, in that the dynamic response to a regime shift in the mean (𝒔𝒕)
causes an immediate jump of the observed time series vector onto its new level. In contrast, the dynamic
response to a regime shift in the intercept term (𝒔𝒕) is identical to an equivalent shock in the white noise
series 𝒖𝒕.
Table 2 .Different Markov Switching VAR model
M: Markov switching
mean
I: Markov switching
intercept
A: Markov switching
autoregressive
H: Markov switching
heteroskedasticity
MSI MSM
varying invariant 𝝁 varying 𝝁 invariant
Linear VAR MSI-VAR Linear MVAR MSM-VAR 𝜮
invariant 𝑨𝒋
invariant MHA-VAR MSIH-VAR MSH-MVAR MSMH-VAR
𝜮
varying
MSA-VAR MSIA-VAR MSA-MVAR MSMA-VAR 𝜮
invariant 𝑨𝒋
varying MSAH-VAR MSIAH-VAR MSAH-MVAR MSMAH-VAR
𝜮
varying
4. DATA
In this study we use monthly data for TSX from July 1979 to October 2019. Moreover, in order to analyze
the effect of oil prices on the stock market we use monthly data of closing spot prices for West
Texas Intermediate (WTI) crude oil, which is a global benchmark for determining the prices of other light
crude oil in the United States. Some of the main statistics of data are described in Table 3. The maximum
index was 16658, which was reported in October, 2019, and the minimum was 1363, which was reported
in Jun, 1982. However, the WTI has experienced less volatility. The minimum quantity was 12 which was
reported at December, 1998, and the maximum quantity was 133 which was reported at Jun, 2008.
Table 3.Summary Statistics of the Data
TSX WTI
Minimum 1363.329 12.28000
Mean 7747.418 42.17572
Median 6859.800 31.09000
Maximum 16658.60 133.9300
Standard Deviation 4708.876 27.19105
Skewness 0.348992 1.105471
Kurtosis 1.660826 3.223720
Observation 483 483
It should be noted that our analysis is based on the calculated return (𝑟𝑒𝑡𝑢𝑟𝑛 = 𝑙𝑛(𝑃𝑡
𝑃𝑡−1)) for all variables.
In Plot 1, we show the graph for natural log of TSX and WTI on the left side and we depict the return of
the TSX and WTI on the right side.
Plot 1. Return of the variables
5. Empirical Results and Discussion
We tested whether our data was stationary or not. Of the different tests to examine the stationarity, we used
Augmented Dickey Fuller (ADF), and wiatkowski-Philips-Schmidt-Shin (KPSS). Based on Table 4, all the
time series data are non-stationary in the natural log level and stationary in the return level.
7.0
7.5
8.0
8.5
9.0
9.5
10.0
1980 1985 1990 1995 2000 2005 2010 2015
LTSX
2.0
2.5
3.0
3.5
4.0
4.5
5.0
1980 1985 1990 1995 2000 2005 2010 2015
LWTI
-.3
-.2
-.1
.0
.1
.2
1980 1985 1990 1995 2000 2005 2010 2015
DLTSX
-.6
-.4
-.2
.0
.2
.4
1980 1985 1990 1995 2000 2005 2010 2015
DLWTI
Table 4.Unit Root Test
LTSX DLTSX LWTI DLWTI
ADF -1.250770
(0.6535)
-19.52376
(0.000)
-1.935789
(0.3157)
-16.14647
(0.000)
KPSS 2.717497 0.017598 1.609933 0.047755
The value in parentheses represent p-value
Next, we wanted to recognize a long-run relationship between our return variables. In order to test
cointegration in our data we should first find optimal lag. We ran the VAR model to find optimal lag. Vector
autoregression (VAR) is a stochastic process model used to capture the linear interdependencies among
multiple time series. VAR models generalize the univariate autoregressive model (AR model) by allowing
for more than one evolving variable.
For example VAR(p) Model is as follows:
𝑌𝑡 = 𝑎 + 𝐴1𝑌𝑡−1 + 𝐴2𝑌𝑡−2+. . . +𝐴𝑝𝑌𝑡−𝑝 + 𝜀𝑡
As it is clear from Table 5, based on the AIC criteria the optimal lag is 2.
Table 5. var lag order selection criteria
Lag LogL LR FPE AIC SC HQ
0 -789.4335 NA 0.096000 3.332352 3.349881 3.339245
1 1332.094 4216.256 1.29e-5 -5.583552 -5.530963 -5.562871
2 1358.863 52.97582* 1.17e-5* -5.679425* -5.591776* -5.644957*
3 1360.335 2.899628 1.18e-5 -5.668778 -5.546070 -5.620523
4 1361.684 2.647583 1.20e-5 -5.657618 -5.499850 -5.571362
5 1363.208 2.977181 1.21e-5 -5.647192 -5.454365 -5.571362
6 1364.982 3.451311 1.22e-5 -5.637820 -5.409933 -5.548203
7 1367.407 4.696454 1.23e-5 -5.631188 -5.368242 -5.527784
8 1369.556 4.143521 1.24e-5 -5.623393 -5.325387 -5.506201
After finding the optimal lag, we can run the cointegration test. The Johansen test is a test for evaluating
cointegration and it allows to test more than one cointegrating relationship. Johansen test estimates the rank
(r) of a given matrix of time series with a confidence level. Based on Table 6, our data set has two time
series, hence, Johansen tests the null hypothesis of 𝑟 = 0 is that there is no cointegration at all, and the null
hypothesis of 𝑟 ≤ 1 is that there is at most one cointegration relation. For 𝑟 = 0, all of the test values are
greater than the critical values, so we could not reject the null hypothesis and there is no cointegration
relation at all. For 𝑟 ≤ 1, since none of the test values are greater than the critical values, the null hypothesis
is rejected. Therefore, there is no cointegration relation between our variables.
Table 6.Johansen cointegration test
t-statistics 10 percent 10 percent 10 percent
𝑟 = 0 1.65 6.50 8.18 11.65
𝑟 ≤ 1 9.48 15.66 17.95 23.52
In absence of cointegration, the dependent variables diverge from any possible combination of the
regressors. Therefore, running a VAR in levels is not reasonable. If some or all of the variables in a
regression are I(1) then the usual statistical results may or may not hold. One important case in which the
usual statistical results do not hold is spurious regression, when all the regressors are I(1) and not
cointegrated. To avoid spurious regression and to seek nonlinearities in relationship between oil prices and
the stock index we use Markov switching VAR model. Based on the AIC criteria, the best model which fits
the data is MSI(2)-VAR(2) model.
For analyzing our data, we ran MSI(2)-VAR(2) model to identify TSX index’s structure. As it is shown in
Table 7, TSX index has two regimes including positive return (regime 1), when the growth rate of stock
index is positive, and negative return (regime 2), when the growth rate of stock index is negative.
Table 7.MSI(2)-VAR(2) Model for Stock Index in Canada
𝑫𝑳𝑵(𝑻𝑺𝑿)𝒕
Intercepts Const (Regime 1)
0.008563
(0.000)
Const (Regime 2) -0.017862
(0.1646)
Autoregressive
Coefficients
AR(1) 0.031352
(0.4976)
AR(2) 0.022700
(0.6429) The value in parenthesis represent p-value
Then, we computed the transition probabilities of MSI(2)-VAR(2) Model for TSX index. As it is shown in
Table 8, P11, which represents the probability of staying in regime 1 given that you are in regime 1, is 97%,
as well as P21, which indicates the coefficients for the transition from regime 2 into regime 1, is 12%.
Table 8.Transition Probabilities of MSI (2)-VAR (2) Model for Stock Index in Canada
Regime 1 Regime 2
Regime 1 0.976518 0.023482
Regime 2 0.128823 0.871177
The filtered probabilities of being in two regimes for TSX index is depicted in the Plot 2.
Plot 2.Filtered of Transition Probabilities
0.0
0.2
0.4
0.6
0.8
1.0
1980 1985 1990 1995 2000 2005 2010 2015
P(S(t)= 1)
0.0
0.2
0.4
0.6
0.8
1.0
1980 1985 1990 1995 2000 2005 2010 2015
P(S(t)= 2)
Markov Switching Filtered Regime Probabilities
Moreover, based on the AIC criteria, MSI(2)-VAR(2) Model is the best fitted model for examining the
effect of the crude oil market on the stock market. Based on Table 9, the effect of oil prices on the stock
index in regime 1 is more than regime 2. Also, the effect of one period lag of oil prices on the stock price
in regime 2 is more than regime 1, while this effect is very small. Moreover, two period lag of oil prices
increases the stock price in regime 1, while it decreases the stock price in regime 2.
Table 9. The effect of oil price on stock index with MSI (2)-VAR (2) Model(Based on AIC criteria)
𝑫𝑳𝑵(𝑻𝑺𝑿)𝒕 𝑫𝑳𝑵(𝑾𝑻𝑰)𝒕
Intercepts
Const (Regime 1) -0.019351
(0.1397)
-0.010789
(0.4926)
Const (Regime 2) 0.008066
(0.000)
0.003507
(0.3049)
Coefficients
Reg
ime
1
𝑫𝑳𝑵(𝑻𝑺𝑿)𝒕 0.814483
(0.0277)
𝑫𝑳𝑵(𝑻𝑺𝑿)𝒕−𝟏 0.137623
(0.3115)
-0.297722
(0.4507)
𝑫𝑳𝑵(𝑻𝑺𝑿)𝒕−𝟐 -0.3771582
(0.0258)
0.547047
(0.0929)
𝑫𝑳𝑵(𝑾𝑻𝑰)𝒕 0.234637
(0.0353)
𝑫𝑳𝑵(𝑾𝑻𝑰)𝒕−𝟏 -0.053833
(0.6497)
0.508366
(0.0002)
𝑫𝑳𝑵(𝑾𝑻𝑰)𝒕−𝟐 0.209881
(0.0597)
-0.166862
(0.2101)
Reg
ime
2
𝑫𝑳𝑵(𝑻𝑺𝑿)𝒕 0.115740
(0.1109)
𝑫𝑳𝑵(𝑻𝑺𝑿)𝒕−𝟏 -0.006621
(0.8949)
0.165147
(0.0461)
𝑫𝑳𝑵(𝑻𝑺𝑿)𝒕−𝟐 0.073970
(0.1964)
0.046134
(0.5446)
𝑫𝑳𝑵(𝑾𝑻𝑰)𝒕 0.030468
(0.2001)
𝑫𝑳𝑵(𝑾𝑻𝑰)𝒕−𝟏 -0.014181
(0.5653)
0.117371
(0.0308)
𝑫𝑳𝑵(𝑾𝑻𝑰)𝒕−𝟐 -0.032455
(0.1582)
-0.54252
(0.2843)
The value in parenthesis represent p-value
Furthermore, the transition probabilities of MSI(2)-VAR(2) Model for the effect of oil market on Canadian
Stock Index is shown in Table 10. Based on this information, when we consider the effect of oil prices,
P11, which represents the probability of staying in regime 1 given that you are in regime 1, is 88%, as well
as P12, which indicates the coefficients for the transition from regime 1 into regime 2, is 11%.
Table 10.Transition Probabilities of MSI(2)-VAR(2) Model for the effect of oil market on Canada Stock Index
Regime 1 Regime 2
Regime 1 0.887112 0.112888
Regime 2 0.020743 0.979257
6. Conclusion
Based on the unit root test, all variables are non-stationary in the level and stationary in the first difference.
Also, the cointegration test indicates that there is no long-run relation between the crude oil market and the
stock index. Hence, we cannot run a VAR model because of the spurious regression. To avoid spurious
regression and in order to examine the nonlinear relationship between oil prices and the stock index we
used a Markov regime switching model. Based on the MSI(2)-VAR(2) model there are two regimes for the
Canadian stock index including positive return (regime 1), when growth rate of stock index is positive, and
negative return (regime 2), when growth rate of stock index is negative. Moreover, this model shows the
crude oil market has positive effect on the stock market in both regimes, however, the effect of oil price on
the stock market in regime 1 is more than regime 2. Furthermore, a two period lag of oil price increases
stock price in regime 1, while it decreases stock price in regime 2.
7. Reference
Ahamed, F. (2021). "Impact of Public and Private Investments on Economic Growth of Developing Countries." arXiv preprint arXiv:2105.14199. Alam, M. (2021). "Output, Employment, and Price Effects of US Narrative Tax Changes: A Factor-Augmented Vector Autoregression Approach." arXiv preprint arXiv:2106.10844. Balcilar, M., R. Gupta and S. M. Miller (2015). "Regime switching model of US crude oil and stock market prices: 1859 to 2013." Energy Economics 49: 317-327. Cho, J. S. and H. White (2007). "Testing for regime switching." Econometrica 75(6): 1671-1720. Fayyad, A. and K. Daly (2011). "The impact of oil price shocks on stock market returns: comparing GCC countries with the UK and USA." Emerging Markets Review 12(1): 61-78. Filardo, A. J. (1994). "Business-cycle phases and their transitional dynamics." Journal of Business & Economic Statistics 12(3): 299-308. Garcia, R. (1998). "Asymptotic null distribution of the likelihood ratio test in Markov switching models." International Economic Review: 763-788. Hamilton, J. D. (1988). "Rational-expectations econometric analysis of changes in regime: An investigation of the term structure of interest rates." Journal of Economic Dynamics and Control 12(2-3): 385-423. Hamilton, J. D. (1989). "A new approach to the economic analysis of nonstationary time series and the business cycle." Econometrica: Journal of the econometric society: 357-384. Hussin, M. Y. M., F. Muhammad, A. A. Razak, G. P. Tha and N. Marwan (2013). "The link between gold price, oil price and Islamic stock market: Experience from Malaysia." Journal of Studies in Social Sciences 4(2). Kim, C.-J. (1994). "Dynamic linear models with Markov-switching." Journal of Econometrics 60(1-2): 1-22. Krolzig, H.-M. (2000). Predicting Markov-switching vector autoregressive processes, Nuffield College. Mohammad, M. A. and R. I. Mohammad (2010). "Revisiting the Feldstein-Horioka Hypothesis of savings, investment and capital mobility: evidence from 27 EU countries." Park, J. and R. A. Ratti (2008). "Oil price shocks and stock markets in the US and 13 European countries." Energy economics 30(5): 2587-2608. Timmermann, A. (2000). "Moments of Markov switching models." Journal of econometrics 96(1): 75-111.