Background

The stock market of a country is a barometer of that country’s economic conditions. Therefore, it is widely argued that the behavior of a stock market mostly depends on the economic performance and political environment of the country. The smooth performance of the stock market is relatively important for developed and emerging economies. Oil is an important source of energy that is important for maintaining smooth economic performance of industries that depend on oil or oil products. Oil is required for the economic performance of emerging economies, including Pakistan. Pakistan’s domestic production of oil is relatively lower than its consumption, and therefore, the country relies heavily on oil imports. The economy produces at most 15% of its total consumption. Figure 1 represents the domestic production and total consumption of the economy. A visual examination of Fig. 1 clearly shows that the economy produces a relatively small proportion of total consumption.

Fig. 1
figure 1

Oil Production and Consumption (Thousand Barrels)

Recent oil price fluctuations have led us to revisit and re-examine the effect of the oil price and its shocks on Pakistan’s stock market behavior. As discussed earlier in the introduction, Pakistan, as an emerging economy, relies heavily on oil imports. Therefore, any oil price fluctuation negatively (positively) affects stock market performance. Because a higher (lower) oil price represents higher (lower) input costs, oil price changes are likely to directly affect the earnings of an organization. Furthermore, any increase (decrease) in the oil price would result in an increase (decrease) in inflation. Therefore, this study attempts to revisit the effects of oil price fluctuation on the stock market of Pakistan before and after the 2007 Asian financial crisis period. There are many reasons for examining the effect of oil price changes on the stock market of Pakistan. First, the literature indicates both positive and negative effects of oil price fluctuations on stock markets and this study attempts to reveal for policy makers whether the effects are positive or negative. Second, to the best of our knowledge, this is the first study to investigate the association of the stock market and oil price in Pakistan by considering periods before and after the 2007 financial crisis period. The use of these two sub-periods provides valuable insights into the effect of the oil price on the stock market of Pakistan. Third, this study applies several econometric techniques to study the association between the oil price and the equity market, there by providing more robust results than would otherwise have been achieved. Finally, this study adds valuable knowledge about an emerging economy that is also an oil importer.

The rest of the paper is organized as follows. Section 2 reviews the related studies. Section 3 presents the many econometric techniques used in this study. Section 4 discusses the results. Finally, Section 5 concludes.

Literature review

There is a plethora of studies that investigate the effect of oil price changes on economic activities (economic growth), but they are limited to studying the relationship between financial markets and oil price fluctuations. Most of these studies have focused on studying the association between the oil price and financial markets in developed countries, like the US (Kling 1985; Sadorsky 1999), the UK (El-Sharif et al. 2005), Australia (Faff and Brailsford 1999), and Canada (Sadorsky 1999). In addition, the oil-exporting Gulf Cooperation Council countries have been a focus of most researchers (Arouri and Fouquau 2009; Hammoudeh and Aleisa 2004). There is still no consensus in the literature on the nature of the association between the oil price and financial markets. The literature indicates both positive and negative effects of oil price shocks on equity markets. Kling (1985) studied the association between the crude oil price and the US financial markets between 1973 and 1982, and suggested that oil prices changes significantly affected the returns of companies that used oil as an input. In a similar study, Sadorsky (1999) examined US data and found that oil price shocks explained greater variations in US financial markets. In addition, Jones and Kaul (1996) tested the association by employing a cash-flow model and suggested that oil price shocks adversely affected the markets. Furthermore, most studies have found negative effects of oil price fluctuations on equity markets, such as Papapetrou (2001) for the case of Greece, Nandha and Faff (2008) for the case of 35 industrial sectors of the FTSE, and most recently, Ekong and Effiong (2015) for the case of Nigeria.

Apart from the studies discussed in this section, other studies have found significant positive effects of changes in the oil price on financial markets. Al-Mudhaf and Goodwin (1993) reported positive effects of an oil price shock on the returns of 29 oil company stocks listed on the NYSE. Gjerde and Saettem (1999) studied the association between macroeconomic factors and stock returns in Norway, and found significant positive effects of oil price fluctuations on financial markets. The authors further found a negative effect of the interest rate on stock returns. Sadorsky (2001) studied Canadian companies and analyzed the associations between four variables, namely, interest rate, stock price index, exchange rates, and oil prices. Their analyses showed a significant positive relationship between the oil price and stock price index. Furthermore, their results suggested adverse effects of the interest rate and exchange rate on equity indexes. In addition, Boyer and Filion (2007) reported similar results for Canadian oil and gas stock indexes. Ibrahim and Aziz (2003) investigated the association between stock prices and macroeconomic factors using a cointegration test in the case of Malaysia. Their results suggest a long-run and short-run association between stock prices and oil prices. The authors concluded there is a positive relationship between stock indexes and oil prices. Hammoudeh and Li (2004) found a positive effect of the oil price on stock returns of transportation industries in Norway, Mexico, and the US. El-Sharif et al. (2005) suggested that the relationship between the oil price and stock returns was weak in non-oil and gas sectors. Similar results were reported by Osmundsen et al. (2007), who examined oil and gas companies. Eryiğit (2009) found a significant effect of oil price changes on the returns of several industries and sectors, that is, consumer products, financial, manufacturing, industrial products, and trading and services. The authors concluded that emerging economies are more affected by oil price changes than developed economies are.

The aforementioned studies suggest that the oil price has both positive and adverse effects on the activities of a stock market. Nevertheless, researchers have argued that the association between financial markets and the oil price varies from economy to economy (Babatunde and Adenikinju 2012). For example, Park and Ratti (2008) found that the relationship between oil price shocks and financial markets is adverse in oil-importing economies, while that for oil-exporting economies is positive. Similar results have been found by Billmeier and Massa (2009), who examined both oil-importing and oil-exporting countries.

This study explores the relationship between oil price changes and the stock market in the case of an oil-importing country, that is, Pakistan. The results of the study are expected to add valuable knowledge to the existing literature on oil-importing countries.

Methods

This study aimed to examine oil price shocks and stock market behavior for the period before and after the 2007 financial crisis. One of the main reasons for considering the financial crisis period is to analyze the relationship between the stock market and oil price, which would provide better understanding of the effect of the oil price in the two sub-periods.

Data

This study considered daily datasets for the period July 31, 2000 to July 31, 2014. The datasets were further divided into two sub-periods based on the 2007 financial crisis. The first dataset consists of the pre-crisis period and the second dataset consists of the post-crisis period. The pre-crisis dataset is from July 31, 2000 to July 31, 2007. The post-crisis dataset is from August 1, 2007 to July 31, 2014. We considered an equal number of observations in both periods to obtain reliable results. The data for the oil price are obtained from the US Energy Information Administration (EIA).Footnote 1 We considered oil prices of the West Texas Intermediate spot price (US dollars per barrel).The data for the Pakistan Stock Exchange (formerly, the Karachi Stock Exchange) comprise a daily closing stock-price index obtained from Yahoofinance.com.

Methodology

This study applied various econometric techniques to analyze the effect of the oil price and its shocks on stock market behavior in Pakistan. The following econometric methods were applied to achieve the objective of the study.

Stationarity tests

The stationarity of the datasets was examined by applying two commonly used methods, the Phillips-Perron (PP) test (Phillips and Perron 1988) and the augmented Dickey-Fuller (ADF) test (Dickey and Fuller 1979). These two methods were followed to test the stationarity of the stock-price index and oil price datasets. These two tests are well established in the literature.

Johansen-Juselius cointegration test

In prior analyses, this study analyzed the long-run relationship between the oil price and the stock market. This study aimed to analyze the long-run dynamic association in both sub-periods, that is, the pre-crisis and post-crisis periods. The Johansen and Juselius (1990) cointegration test is based on two tests, which follow maximum likelihood procedures. The first test is the trace test and the second is the maximum eigenvalue test. The specifications of both tests are given as follows.

The trace test is based on Eq. (1).

$$ \lambda trace\kern0.5em =\kern0.5em - T{\displaystyle \sum } ln\ \left(1\ \hbox{--} \lambda i\right) $$
(1)

The maximum eigenvalue test is based on Eq. (2).

$$ \lambda max = - T\ ln\ \left(1\ \hbox{--}\ \lambda r+1\right) $$
(2)

GARCH model

The effects of oil price shocks on the Pakistan Stock Exchange were explored by applying the generalized autoregressive conditional heteroskedasticity (GARCH) model. The GARCH model considers conditional variance as dependent on its own past lagged values. The GARCH model applied in this study is as follows.

$$ {\mathrm{R}}_{\mathrm{t}\left(\mathrm{PSE}\right)}={\upalpha}_0+{\upalpha}_1{\mathrm{R}}_{\mathrm{t}-1}+\psi {\mathrm{R}}_{\mathrm{t}-1\left(\mathrm{OP}\right)}+{\upvarepsilon}_{\mathrm{t}} $$
(3)
$$ {{\mathrm{h}}_{\mathrm{t}}}_{\left(\mathrm{PSE}\right)}={\upbeta}_0+{\upbeta}_1{\upvarepsilon}_{\mathrm{t}-1}^2+{\delta}_{\left(\mathrm{OP}\right)} $$
(4)

Equation (3) is a mean equation, while Eq. (4) is a variance equation of the GARCH model. In Eq. (3), Rt represents the continuous compounding return of the Pakistan Stock Exchange, and parameter ψ measures the effect of the oil price lagged return on the stock index. In Eq. (4), ht(PSE) represents conditional variance of the Pakistan Stock Exchange, and parameter δ measures the effect of oil price shocks on the stock market of Pakistan. We applied the GARCH model for both sub-periods, that is, the pre-crisis and post-crisis periods.

EGARCH model

In the simple GARCH model, conditional variance is restricted to be positive. Put simply, the GARCH model considers conditional variance as a function of lagged residuals and, therefore, ignores signs. Therefore, a deficiency of the GARCH model is that it does not capture asymmetric (negative) shocks. Some researchers have argued that asymmetric shocks generate more volatility than symmetric shocks do (Jan and Jebran 2015; Jebran and Iqbal 2016a, 2016b). Therefore, we applied the exponential generalized autoregressive conditional heteroskedasticity (EGARCH) model to capture the asymmetric shocks of the oil price on the stock market. The EGARCH model is as follows.

$$ {\mathrm{R}}_{\mathrm{t}\ \left(\mathrm{PSE}\right)}={\upalpha}_0+{\upalpha}_1\;{\mathrm{R}}_{\mathrm{t}-1}+\psi {\mathrm{OP}}_{\mathrm{t}-1}+{\in}_{\mathrm{t}} $$
(5)
$$ {\mathrm{lnh}}_{\mathrm{t}\ \left(\mathrm{PSE}\right)} = {\upbeta}_0++{\upbeta}_1\;\left|\frac{\in_{\mathrm{t}}-1}{\sqrt{{\mathrm{h}}_{\mathrm{t}-1}}}\right|+\varphi \frac{\in_{\mathrm{t}}-1}{\sqrt{{\mathrm{h}}_{\mathrm{t}-1}}}+{\upbeta}_2{\mathrm{h}}_{\mathrm{t}-1}+{\delta}_{\left(\mathrm{OP}\right)} $$
(6)

Equation (5) is a mean equation, while Eq. (6) is a variance equation of the EGARCH model. In Eq. (6), parameter φ captures the asymmetric shock, while parameter δ (OP) measures the effect of oil price shocks on the stock market of Pakistan. We applied the EGARCH model for both sub-periods.

Variance decomposition

We applied variance decomposition to measure the variance contribution of the oil price to the stock market of Pakistan. This method analyzes the responses of variables to shocks of other variables in the model. If a shock were to occur through the error term, its impact on other variables would be observed, as such evidence is obtained by the percentage of error variance as well as the time horizon. Furthermore, this method provides information about the contribution of variations in a specific variable in a specified period, and forecasts variations in other variables in the previous period. Specifically, this analysis shows how much variation in a variable is explained by its own innovation and shows the percentage contribution of other variables to the underlying variable.

Impulse response function

The impulse response function is used to analyze the response of a variable to a random shock that involves a positive shock of one standard deviation in each system. Furthermore, it is useful for capturing the response of the dependent variable to the shocks of independent variables. In this study, we applied the impulse response function to explore the response of the stock market to oil price shocks before and after the financial crisis period.

Results and discussion

Descriptive statistics

Table 1 presents the summary statistics of the stock price index and oil price returns for the pre-crisis and post-crisis periods. The results show that the mean returns of the stock market and oil price in the pre-crisis period are 0.11 and 0.057%, respectively, while those for the post-crisis period are 0.043 and 0.013%, respectively. These results suggest a significant decrease in the returns of the oil price and stock market after the 2007 financial crisis period. Figure 2 clearly shows that the stock market and oil price declined significantly after the 2007 financial crisis period. Furthermore, the results indicate that the stock market index is least volatile (1.19) in the post-crisis period and more volatile (1.43) in the pre-crisis period. Oil price returns are more volatile (2.38) in the post-crisis period and least volatile (2.36) in the pre-crisis period. The results indicate that the datasets are negatively skewed in both sub-periods, except for the oil price, which is positively skewed in the post-crisis period. The kurtosis coefficients for all datasets show leptokurtic distribution. The Jarque-Bera statistics reveal that the datasets are not normally distributed.

Table 1 Summary Statistics and ARCH test
Fig. 2
figure 2

Stock Indices and Oil price

We examined the presence of the autoregressive conditional heteroscedasticity (ARCH) effect in the datasets. The ARCH effect represents the presence of autocorrelation and heteroskedasticity problems in the datasets. The results of the ARCH effect, reported in Table 1, show the presence of autocorrelation and heteroskedasticity in the datasets of the stock index and oil price. Hence, the GARCH and EGARCH models can be applied after confirming the ARCH effect in the datasets.

Unit root tests

The results of unit root tests are reported in Table 2. The unit root analyses were carried out on the ADF test. In addition, we applied the PP test to obtain more reliable results. The ADF test results indicate that the stock-price and oil price dataFootnote 2 are non-stationary at level. Similar results of non-stationarity are obtained on level from the PP test. The PP and ADF tests indicate that the variables exhibit stationarity at the first difference. In addition, the results obtained from the stationarity tests are similar for the pre-crisis and post-crisis periods.

Table 2 Unit root results
Table 3 Cointegration test results

Johansen-Juselius cointegration test

Next, we tested the long-run relationship between the stock index and the oil price. The cointegration test is applicable to datasets that are stationary at the same level (either first difference or second difference). Since our datasets are stationary of the same order (first difference), we estimated the cointegration equation so as to explore the long-run association. Furthermore, to estimate the cointegration equation, a suitable lag value is required to obtain robust results and this is mostly obtained from vector autoregressive (VAR) statistics. In VAR statistics, the lower value of the Schwarz criterion is selected as a suitable lag order for estimating the cointegration method. We applied two cointegration models, the first model for the pre-crisis period, and the second model for the post-crisis period. Therefore, we obtained two lag values for the two sub-periods from the VAR statistics based on the minimum value of the Schwarz criterion. The Shwartz criterion results showed a lag of one for the pre-crisis period and a lag of two for the post-crisis period in the estimation of the cointegration equation.Footnote 3 The cointegration results in Table 3 indicate that the stock index and the oil price have a significant long-run relationship in the pre-crisis period. However, there is no association between the stock market of Pakistan and the oil price in the post-crisis period. The result shows that the 2007 financial crisis significantly affected the relationship between the oil price and the equity market of Pakistan.

GARCH and EGARCH models

In the next step, we estimated the effect of oil price returns and oil price volatility on the stock-index returns of Pakistan. Table 4 reports the results of the GARCH and EGARCH models. The results of the GARCH model indicate that oil price returns have a significant positive effect on the returns of the stock market in the pre-crisis period only. However, the results from the EGARCH model show that the effect of oil price returns is significantly positive in both periods (pre-crisis and post-crisis). This result is evidence that the oil price is an important variable that enhances stock returns. This result corroborates studies that have reported a positive relationship between stock returns and the oil price (Al-Mudhaf and Goodwin 1993; Gjerde and Saettem 1999; Hammoudeh and Li 2004). Furthermore, the results of the GARCH model indicate that oil price volatility has a significant negative effect in the pre-crisis period, but the effect is significantly positive in the post-crisis period. The EGARCH model indicates that the oil price has a significant asymmetric volatility effect in the pre-crisis period. However, the results are insignificant in the post-crisis period. The results reveal that the effect of volatility of stock returns in the pre-crisis period is higher than in the post-crisis period.

Table 4 Results of GARCH and EGARCH models

Variance decomposition analyses

The variance decomposition analyses were carried out for a period of 10 years to reveal the forecast variance of the Pakistan Stock Exchange. Table 5 reports the results of the variance decomposition. We performed the analyses for both periods (pre-crisis and post-crisis periods).The results indicate that most of the variations in the Pakistan Stock Exchange are explained by its own innovations, and the oil price explains negligible variations in the variance of the Pakistan Stock Market. The results are almost the same for the pre-crisis and post-crisis periods.

Table 5 Variance Decomposition of Pakistan Stock Exchange

Impulse response function

The impulse response function was carried out to examine the response of the stock market to oil price shocks. The impulse response function results consist of analyses for a period of 10 years. Figure 3 shows the pre-crisis period analyses, while Fig. 4 shows the post-crisis period impulse response function analyses. The results suggest that a positive shock in the oil price of one standard deviation would cause the stock market in Pakistan to decrease in the pre-crisis period. However, the results suggest that the shocks in the oil price positively raise the equity market in the post-crisis period. These results imply that the oil price shocks have an adverse effect in the pre-crisis period but a positive effect in the post-crisis period.

Fig. 3
figure 3

Response to Cholesky One S.D. Innovations ± 2 S.E. IRF in pre-crises period

Fig. 4
figure 4

Response to Cholesky One S.D. Innovations ± 2 S.E. IRF in post-crises period

Conclusions

The aim of this study was to explore the oil price and its volatility effects on the stock market of Pakistan before and after the 2007 financial crisis period, specifically from July 31, 2000 to July 31, 2014. This study opted to use the cointegration procedure of Johansen and Juselius (1990) to test the long-run relationship between the oil price and stock indexes. The stationarity of the datasets was analyzed by using unit root tests. The GARCH and EGARCH methods were applied to test the effects of oil price returns and oil price volatility on the stock market of Pakistan. Furthermore, we applied a variance decomposition test to understand the forecast variance and impulse response function in order to analyze the effect of the oil price shock on the financial market. From the results of the study, we obtained the following key conclusions. The results of the cointegration method indicate a significant long-run relationship between stock indexes and oil prices in the pre-crisis period, but there is no such relationship in the post-crisis period. The EGARCH model indicates that oil price returns have a significant effect on stock returns in both periods, but the results of the GARCH model show significance only in the post-crisis period. In addition, we found a significant effect of volatility of the oil price on the stock market by applying the GARCH model. Furthermore, the EGARCH model shows an asymmetric effect of volatility on the stock market in the pre-crisis period. The variance decomposition shows that stock market variations are mostly explained by self-innovation. Moreover, the impulse response function results show that oil price shocks negatively affected the equity market in the pre-crisis period and positively affected the equity market in the post-crisis period.

This study suggests that economic policymakers should consider the oil price as an important factor that could boost the economic performance of the financial market. Furthermore, the volatility of the oil price is a considerable area, which might adversely influence the activities of the financial market. Thus, investors might consider the oil price as an important determinant of their stock returns while constructing their portfolios.