The Impact of Oil Prices on the Stock Market and Real Exchange Rate: The Case of Kazakhstan

In this study, the relationship between KASE stock market closing prices and oil prices is analyzed using ADF and Zivot-Andrews' (1992) unit root tests and monthly data for the period of 2016-2021. First, the variables are tested for causality. Results show that there is a causal relationship between the real exchange rate and closing prices and between oil prices and the real exchange rate. The short-term effects of the variables are investigated using the VAR method. Results show that Brent crude oil prices have a positive effect on KASE closing prices, while the real exchange rate has a negative effect. In conclusion, changes in oil prices affect the formation of stock prices.


INTRODUCTION
As one of the most valuable energy resources, oil plays a key role in today's economy. Oil, which is an indispensable input in many sectors, is important for the functioning of economic processes. Since it is an important cost item, price changes should be followed carefully. According to the classical supply-side approach, increases in oil prices cause an increase in production costs and a decrease in output. Therefore, they cause an increase in the general level of prices.
Increases in oil prices create cost inflation, in turn, central banks raise interest rates to fight inflation. This causes a decrease in the purchasing power of consumers and affects demand negatively, resulting in a decrease in investments. Moreover, high-interest rates divert investors to different areas, causing a decrease in stock demand and a decrease in stock prices.
In the literature, various studies investigated the effects of oil prices on the stock market index and their results are conflicting. While there are studies that argue the existence of a linear relationship between oil prices and the stock market index, the others argue for a nonlinear relationship. In addition, studies are also divided about the direction of the relationship between oil prices and the stock market index. This may be due to differences in the datasets used or the econometric methods employed. However, the differences in the internal dynamics of each country/country group also yield conflicting results.
Many studies examined the relationships between oil prices, exchange rates, and stock prices. Kelikume and Muritala (2019) and Sheikh et al. (2020) showed that positive oil price shocks tend to lower exchange rates and stock prices in emerging markets.  and Hussain et al. (2017) showed that there is a long-term balance between crude oil prices and the exchange rate, and fluctuations tend to balance out. Similarly, Degiannakis et al. (2017) argues that the response of the stock market to the changes in oil price depends on various factors such as general trends in the economy, the amount of oil exports and imports, and the level of economic development. In addition, Sathyanarayana This Journal is licensed under a Creative Commons Attribution 4.0 International License et al. (2018) and Kumar (2019) observed that oil price volatility significantly affects stock markets. Since national economies today rely heavily on oil, changes in crude oil prices are expected to affect various parameters of national economies, particularly the exchange rates and stock markets.
The main purpose of this study is to investigate the effect of oil prices on the Kazakhstan stock exchange (KASE) and real exchange rate using the VAR model. The second chapter summarizes the studies of domestic and foreign researchers on the subject. The third chapter explains the econometric methodology employed in this study. The fourth chapter explains the data presentation method and analysis results. The study ends with a conclusion, which evaluates the findings.

LITERATURE REVIEW
In their study, Park and Ratti (2008) analyzed the USA and 13 European countries using the VAR Model. They found that Norwegian stock market returns responded positively to increases in oil prices. On the other hand, in many European countries, increased volatility affects real stock returns negatively. Cong et al. (2008) analyzed China using monthly data from January 1996 to December 2007 and the Multivariate Vector Autoregression Model. They showed that oil price shocks do not affect Chinese stock indices. Aloui and Jammazi (2009) analyzed England, France, and Japan using the Markov Regime-Switching EGARCH Model. They concluded that oil price increases play an important role in both the volatility of stock returns and in the regime changes. Chang and Yu (2013) analyzed the USA using the monthly data from January 1957 to May 2009 and the MS-ARJI-GJR-GARCH-X Model. They concluded that the effect of oil price shocks on stock returns depends on the regime in practice. Singhal et al. (2019) analyzed Mexica using the ARDL Boundary Test. They found that oil prices negatively affect the exchange rate in the long term. Nurmakhanova and Katenova (2019) analyzed Kazakhstan using Bivariate and Multivariate Vector Granger Causality Tests. They showed that stock prices and exchange rates are affected by the oil price. Niyazbekova et al. (2020) also analyzed Kazakhstan using the Engle-Granger cointegration test. The results showed that variables such as exchange rate, 10-year long-term bond rate, consumer price index, and Brent oil price are cointegrated with the stock index. Therefore, in the long term, the stock market index is affected by these variables. Abubakirova et al. (2021) used Hatemi-J asymmetric causality, Dickey-Fuller (ADF), and Phillips-Perron (PP) unit root tests. The asymmetric causality test reveals the existence of asymmetric information by distinguishing positive and negative shocks. Thus, it can detect hidden relationships that cannot be detected using the symmetric causality test. Azretbergenova and Syzdykova (2020) examined the importance of the oil sector in the Kazakh economy and the current situation of the non-oil sectors. They also provided important insights for the development of exports in non-oil sectors. Baimaganbetov et al. (2021) examined the effect of oil prices on food prices using monthly data from 2004 to 2019. They found that crude oil prices have an indirect effect on food prices. Bolganbayev et al. (2021) showed in their study, the effects of the price changes in Brent crude oil on the economic growth and energy security of these countries were examined using Panel data analysis with the quarterly data for the period 2007-2020. The long-term relationship between the series is examined using Westerlund cointegration tests and it is concluded that they had a long-term cointegration relationship.

DATA AND METHODOLOGY
This study uses monthly data on variables such as Brent crude oil prices, real exchange rate, and KASE closing prices from January 2016 to May 2021. Brent crude oil prices are obtained from the International Energy Agency database, closing prices from the KASE database, and the real exchange rate was from the Kazakhstan Central Bank database. The graphs of the variables are given below (Graph 1).
The chart in Graph 1 shows the changes in the price of Brent crude oil. We can see a sharp decline in 2019. The most important cause of this decline is a supply-demand imbalance. Thanks to the developments in shale oil production technology, the USA has stopped being an importer and become a net oil exporter.
As Graph 2 shows stock market closing prices have constantly increased. Prices remained relatively stable in 2020 due to COVID 19 and started to increase again in 2021. The graph also shows that in years when oil prices increase the closing prices also increase, and in years when oil prices decrease they remain constant.
As we can see from Graph 3, the real exchange rate is very volatile. The main reasons are the monetary policy of the USA, the Russian exchange rate, and oil prices. If we examine the Graph 3, we examine the graph, we can see that the real exchange rate of Kazakhstan showed a serious fall in 2017.

ANALYSIS AND DISCUSSION
Time-series analysis shows that the variables tend to increase or decrease. In this case, the process is made stationary by taking the difference if there is only a stochastic trend, and by transforming if there is a deterministic trend. The degree of difference is determined using unit root tests. If the series under examination is not stationary, the results are often not significant. Therefore, to make predictions and obtain some statistical results, the series must first be tested for stationarity. If the possibility of a non-stationary series is ignored, that will lead to errors. In addition, unit root tests are also used to determine how stationary the difference is in time series.
In practice, one of the most preferred unit root tests is the Extended Dickey-Fuller (ADF) test. If the ADF approach developed to prevent autocorrelation is arranged by considering the time series processes, the lagged values of the dependent variable can be added to the model and the equation is written as follows: When examining whether the series is stationary using the ADF test, the statistical value calculated for the H 0 :δ=0 hypothesis is compared with the tau critical value. If the H 0 hypothesis is not rejected, the ∆Y series is not stationary, that is, it contains a unit root. When the H 0 hypothesis is rejected, the ∆Y series is stationary.  This series is called first-order integrated and is referred to as I(1) in the literature. Table 1 shows that both oil prices, stock market closing prices, and real exchange rate variables are in the order of integration of 1 or I (1), and they become stationary after the first difference.
The structural break is the name given to permanent sudden changes that occur in the structure of the examined time series due to reasons such as war, policy change, economic crisis, and natural disasters. The most preferred test to analyze the effect of these shocks is the Zivot Andrews test.
When the graphs of the variables are examined, it is seen that there is at least one break. The ADF is not a powerful tool for testing stationarity. Zivot-Andrews unit root test gives much more reliable results in case of a break. Therefore, in our study, the results of the ADF test and Zivot-Andrews unit root test are given together. Table 2 shows that the integration order of both oil prices, stock market closing prices, and real exchange rate variables is 1 or I (1) and they become stationary after the first difference.
The Granger Causality Test is a general approach used to test for causality between two (or more) variables. It is widely used due to its simplicity in implementation. Using Monte Carlo simulations, Guilkey-Salemi (1982) and Geweke-Meese-Dent (1983)  In equation (1), α10 is the constant parameter; the error term (u1t) has zero mean and constant variance [ut ~ ND (0, σu 2 ] and is a white noise process. L11, L12, L21, and L22 Akaike information criteria (AIC) are optimal lag lengths determined according to one or more of the criteria such as Schwarz information criterion (SC) or log-likelihood ratio (LR). If the basic hypothesis is rejected, namely that the coefficients vector of the lagged values of the variable X (α12j) is equal to zero, then the variable X is the Granger cause of the variable Y. Likewise, equation (2) is used to test whether variable Y is the Granger cause of variable X. If the basic hypothesis is rejected for both equations (1) and (2), then it is possible to talk about bidirectional causality. According to the results, other possible situations are one-way causality and no causal relationship.
As in the standard Granger causality test, if the basic hypothesis H0 is rejected, variable X is the cause of variable Y. Similarly, if the basic hypothesis is rejected for equation (2), namely that the coefficients vector (λ21) of ∆Y is equal to zero, the variable Y is the Granger cause of the variable X.
As seen in Table 3, there is a causal relationship between the real exchange rate and the closing prices, and between oil prices and the real exchange rate. There is no Granger causality relationship between the other variables.
VAR models are preferred for time series as they do not impose any constraints on the structural model and do not require internalexternal separation of variables. It is also possible to make strong predictions with VAR models since they include lagged values of the dependent variables. Since the interpretation of the coefficients calculated with the VAR model is quite complex and difficult, usually impulse-response analysis and variance decomposition methods are applied. Impulse-response analysis gives the reaction of the other variable(s) to a change in one variable. Variance decomposition, on the other hand, investigates what percentage of the change in the variance of each of the examined variables is explained by their lags, and what percentage is explained by the other variables.
The left chart in Graph 4 shows the response of the closing prices of the Stock Exchange to the real exchange rate. The response is negative and lasts for 5 periods. The chart on the right shows the response of stock market closing prices to oil price shocks. The response is positive and lasts for 3 periods.

CONCLUSION
This study empirically examines the direct and indirect effects of the oil price shocks on Kazakhstan's real exchange rate and KASE stock market closing prices within the framework of the VAR model, using the monthly data for the period 2016-2021. First of all, the series is tested for stationarity and the ADF and Zivot-Andrews unit root tests showed that the series is stationary at the first difference.
Empirical findings show that KASE closing prices are affected negatively by the real exchange rate and positively by oil price shocks. The findings also show that the effect of the real exchange rate is statistically significant, while the effect of oil price is not. The reason is that although Kazakhstan is an oil-exporting country and derives most of its budget revenues from oil, the number of oil companies listed on the stock exchange is low and there has been a decrease in oil prices in recent years.
The real exchange rate is most affected by the KASE closing prices. The reason behind this is an increase in the foreign exchange demand due to high external deficit leads to a consequent pressure on the exchange rate. A rise in exchange rates encourages domestic and foreign investors to sell depreciating stocks and turn to foreign exchange and instruments that yield interest.
The results show that in the absence of perfect substitution among the factors of production, increases in oil prices may cause an increase in production costs, resulting in a decrease in cash flow and a decrease in stock values. In conclusion, oil prices are effective in the formation of stock prices.