Studying the Stock Market – Economic Activity Nexus in Poland with a VAR‐VECM Approach

The paper discusses the links between stock market performance and real economic ac‐ tivity and presents results of an empirical inquiry into dynamic relationships between the main stock index quoted on the Warsaw Stock Exchange (WIG) and GDP in Poland over the years 1995–2019. In many empirical studies for highly developed countries not only short‐run dynamic interactions but also a long‐run cointegrating relationship between the stock index and output have been found. Previous studies for Poland reported mainly short‐run linkages between stock returns and changes of economic activity whereas the evidence for a long‐run cointegrating relationship is still quite scarce. In this paper, the VAR‐VECM methodology with the Johansen tests for cointegration is used to study a substantially longer quarterly data interval than has been investigated so far. Research results show that stock returns Granger‐cause GDP growth with up to three‐quarters lead. The evidence for the existence of a long‐term cointegrating relationship has also been found.


Introduction
Economic analysts widely believe that the stock market is a barometer of the economy. Stock index values belong to financial variables known as the leading indicators of the economy's performance and are used to predict economic growth and inflation. According to Stock, Watson (2003), it was already in 1938 that Wesley Mitchell and Arthur Burns, in a study prepared for NBER, included the Dow Jones composite index in their list of leading indicators of expansions and contractions in the US economy. Economic and financial theory offers many arguments that the stock market and the real economy are related to each other. Statistical relations between stock prices and variables reflecting variations in real activity have been explored for many years.
This article seeks to determine whether, and how, the main index of the Warsaw Stock Exchange (WSE) and GDP as the main measure of economic activity were related to each other from the first quarter of 1995 to the second quarter of 2019. In particular, an attempt is made to answer the question about whether the historical stock prices on the WSE confirm the widely shared view about the leading character of stock market changes in relation to changes in the economy. This is the first hypothesis of the paper. The second one is the existence of a long-run relationship between the stock market and the real economy i.e., in statistical terms, a cointegrating relation between the WIG and GDP. Such a relationship has been proven in many studies mainly for highly developed countries, whereas for Poland the evidence is quite scarce. There might be some obvious reasons for that situation: the key problem of small data sample since the systemic economic transformation and the establishment of local stock exchange, structural changes in the economy and the capital market during the time being subject to examination, and the occurrence of the biggest global financial crisis since the 1929 Great Crash resulting in the stock market collapse on a scale in no way comparable to the following weakening in the Polish economy. Despite the fact that both variables, GDP an stock market index, showed permanent growth in the long term, too much variation in stock prices relative to GDP and quite a lot of persistence in their upward and downward swings did not let to building up a common stochastic trend that could be revealed in cointegration tests. This study explores the longest time series that has been investigated so far, including almost a decade in the 21 st century of relatively moderate long-run capital market growth without such dramatic price changes as observed in earlier periods. Although widely assessed by market analysts and commentators as a time of weakness in the Polish stock market, especially in comparison with the situation in global capital markets and uncommonly good economic results of the Polish economy, in statistical terms such a moderate behaviour could paradoxically contribute to building a long-term relationship, i.e. a common stochastic trend, between the Polish stock market and GDP.

Theoretical underpinnings of relations between the stock market, economic conditions and disturbing factors
The relationship between the stock market and economic performance is well grounded in economics and finance. The present value model defines a current stock price as a sum of discounted future dividends expected by investors. Investors' gains depend on companies' cash flows that in turn are influenced by general economic conditions. Analysts and investors alike study the most recent economic data and signals on a daily basis to make sure that their buy and sell decisions are optimal. The main message of the efficient market theory is that if market players are rational, all information they receive should have an immediate influence on stock prices. The speed with which the stock market reacts to new economic information contrasts with the inertial response of the economy causing business cycle variations to be stretched over longer periods of time. If it is also true that the cross-section of listed companies corresponds to the composition of the economy, then the stock market can be deemed to be "a passive informant" about future economic activity (Morck, Shleifer, Vishny, 1990). In statistical terms, one could expect stock returns to lead and Granger cause output changes. However, it is not the only statistical consequence inferred from this line of argument. Many authors maintain that output and stock prices are generally expected to follow the same stochastic trend over long horizons, i.e. should be co-integrated, just like dividends and stock prices. Rangvid (2006) justifies this claim formally with referring to the now well-known "dynamic Gordon model" introduced by Campbell and Shiller (1989).
However, it is also plausible that the stock market is more than a passive predictor of the economy's future performance, because by influencing decisions of economic agents, it stimulates processes in the real economy. There are several mechanisms that underlie this process. One line of reasoning indicates that a good situation in the stock market stimulates investment activity. According to Tobin's 'q' theory elaborated in Brainard and Tobin (1968), the growth of stock prices leads to a situation where the market value of companies increasingly exceeds their replacement value, to which managers respond by making additional investments.
According to Malkiel (1999), the stock market can influence the economy in three ways. Firstly, rising stock prices lead to a "wealth effect" that directly increases consumption and national income. Secondly, as stock prices go up, companies can raise equity at a lower cost, which increases the profitability of their investments as well as the amount of funds raised during successive stock issues. A rising stock market can also encourage new companies in need of capital for new investments to seek public listing. Thirdly, business and households' expectations of the future that improve with an increase in stock indices, a mechanism known as an "expectation effect", can also be important. Because stock index rises are commonly believed to be related to the expected rate of economic growth, companies increase real investments and households consume more.
Another mechanism involved in the positive impact of the stock market on the real economy includes improving creditworthiness, and therefore a decrease in borrowing costs of companies, as prices of their shares are rising ("credit effect").
The discount rate in the stock-pricing formula is determined by the expected level of interest rates and by a risk premium. Both these elements provide another link between the performance of stock market indices and real activity. In addition to the banking sector, the capital market is an important channel transmitting monetary impulses from central banks to economies. A long period of economic growth can finally meet a demand barrier triggering inflationary pressure. The market players' expectation that the monetary authority will increase interest rates to prevent increases in inflation reduces the prices of financial assets, including stocks. The wealth effect means that the real economy is affected as a result. Be-sides, greater uncertainty in the market and higher risk premiums being charged with the first worrying signs observed in an economy in the final phase of expansion (high levels of companies and households' debt, failed investments, loan repayment problems, inflation, etc.) also bring stock prices down. Discount rate variations affecting stock prices operate in the same direction in the case of real investment and consequently the volume of GDP, but in this case changes take effect with a long lag.
As already mentioned, the theory explaining how the stock market and the economy are related to each other is based on the efficient capital market assumption. Yet, behavioural finance offers numerous examples of market inefficiencies and many explanations of why they happen. It is not unusual for stock market investors to behave irrationally, to derive their decisions from various heuristics, to follow emotions, to display herd behaviour involving euphoria or deep pessimism that makes information more difficult to understand; on top of that, investors also have a problem gaining access to information. As a result, frequent periods when the stock market overreacts to new data are followed by periods of correction. The most spectacular cases of a massive failure of the stock market include asset price bubbles (such as the dot-com bubble toward the end of the 20 th c.) or sudden crashes (e.g. the infamous crash on the New York Stock Exchange in October 1987) that real economic processes cannot explain.
Another factor eroding relations between stock markets and national economies is globalisation and liberalisation of international capital flows. In many countries, stock indices are shaped by the largest (transnational) corporations that frequently earn most of their revenue abroad. Therefore, the financial performance of these organisations, and consequently prices of their stocks, is determined by the economic situation of countries other than those on the stock exchange of which they are listed (Siegel, 2014). As no barriers restrict the free movement of capital, massive amounts of (frequently speculative) funds circulate all over the world in search of investment opportunities offering the best returns. In many countries, the foreign capital's share of stock market trading volume systematically increases. Changing economic prospects and conditions in the particular economy are not always the reason for capital to enter or leave its stock market; capital inflows and outflows also take place when other parts of the world become less or more attractive for investors.
A new term has recently been added to economic vocabulary: 'financialisation of economy' that broadly denotes a process of the financial sector becoming independent of and superior to the real sphere. A symptom of the narrowly understood financialisation is an increasing share of financial operations in the business of non-financial organisations that have traditionally operated in the real sphere (Ząbkowicz, 2009;Ratajczak, 2012). The financial performance of such organisations, and consequently prices of their stock, increasingly depends on revenues from financial activities (that in many cases have purely speculative aims and are conducted globally using complex financial instruments) rather than on traditional operations and real investments. When the capitalisation of the country's stock market largely depends on "financialised" and financial organisations, then variations in their main stock indices do not necessarily reflect changes in real economic processes. Another issue widely discussed recently is that a large part of stock market increases in highly developed countries (mainly the US) can be caused by stock buy-backs, when public companies distribute cash to shareholders instead of investing it (e.g. Lazonick, 2016).
We also need to remember that, being integrated with the worldwide economic and financial system, contemporary stock markets immediately react to developments in its different segments. Because the likely consequences of such developments for national domestic economies usually bring about exaggerated reactions, market corrections become necessary. A similar mechanism of excessive or premature reactions is also set in motion by political events and economic policy announcements which frequently end as a flash in the pan or are only partly implemented. It is also worth noting that because domestic stock markets have a different composition in terms of listed companies' industries, sizes and numbers, the degree to which they can be deemed "representative" of national economies is also different. Many domestic companies with trading partners abroad seek to get their stocks listed on foreign stock markets characterised by higher trading volumes and better opportunities of raising investment funds. In this context, it is worth noting that the Warsaw Stock Exchange is the largest stock market in Central Eastern Europe and one of the largest in Europe, at least in terms of the number of listed companies. Therefore, it is possible that its performance and the performance of Poland's real economy are quite strongly related to each other. It should be remembered, however, that the depth of this market has evolved over time.

A review of empirical studies
The relations between the stock market and the economic situation have been investigated in many empirical studies but definitive conclusions have not been reached.
Fama's study of the US stock market (Fama, 1981;) demonstrated that the forecasts of economic activity (measured by the rate of growth of industrial production) explained around 50% of variability in the returns on a capitalisation-weighted portfolio of NYSE-listed stocks. Fama's findings were strongly supported by Schwert (1990), who used the same research methodology and a much longer time series data set . Similar results were reported by Barro (1990), who studied time series from the years 1891-1987(USA) and 1928-1987. In both countries, historical changes in stock prices had significant ex-planatory power for the succeeding growth rates of real investment and GNP. More evidence confirming the existence of such relations in the US economy was presented by Chen (1991), Lee (1992) and Galinger (1994). Domian and Louton (1997) additionally noted that the relations between the stock market and the economy were somewhat asymmetric. Their research showed that negative stock returns tend to predict large declines in the growth rates of industrial production, but the increases in industrial production after periods of positive stock returns are smaller and stretched in time. In contrast with these studies, Harvey (1989) reported a weak relationship between the stock market performance and the performance of the economy.
Studies of the relations between stock prices and real economic activity have been conducted in other countries, too. For instance, Peiro (1996) found that in three largest European economies (Germany, France, UK) stock return variations were largely explained by subsequent changes in industrial production (and somewhat less by GDP). The analysis of cointegration and the estimation of error-correction models performed by Choi, Hauser and Kopecky (1999) showed both a long-run equilibrium relationship between the log levels of industrial production and real stock prices as well as a short-run relationship between stock returns and the subsequent changes in industrial production between 1957 and 1995 in all G-7 countries. These findings were then corroborated by Adamopoulos (2010), who used a similar methodology and GDP as a measure of economic activity instead of industrial production, for the German economy in the years 1965-2007. Similar results were obtained by Nasseh and Strauss (2000) in their study of the long-and short-term relationships between stock returns and the domestic and foreign economic activity in six European countries (Germany, France, UK, Italy, Switzerland, and the Netherlands). Evidence of cointegration between national stock market indices and real GNP for five highly developed economies (Canada, Germany, Italy, Japan, USA) was also reported by Cheung and Ng (1998). Hassapis and Kalyvitis (2002) not only confirmed for all G-7 countries that traditionally tested stock returns can predict growth rates of the economy (industrial production) but also found a negative correlation between current stock returns and historical rates of economic growth. According to these authors, one possible reason for this correlation may have been the monetary authority's countercyclical policy and investors' expectations that the overheating (slowdown) of the economy would cause interest rates to go up (down); see also Park (1997). An analogous relationship between the growth rates of US GDP and the returns on the DJIA and S&P 500 indices in the years 1970-1997 was established by Laopodis and Sawhney (2002), who attributed it to changes in the short-term interest rates.
The results of some studies also suggest that a good economic situation can stimulate the stock market. For instance, Sawhney, Anoruo and Feridun (2006) demonstrated that the increase in US GDP between 1970 and 2003 Granger-caused stock returns, but not the other way round. In the same period, two-way causal rela-tions were observed in Canada. Vazakidis and Adamopoulos (2009) made a similar observation for France, finding that its economic growth in the years 1965-2007 Granger-caused and had a positive impact on the stock market.
Interesting conclusions can be derived from Binswanger's study (2000) demonstrating that the strong relationship linking the US stock market and the level of economic activity since the end of the 1940s weakened in the early 1980s. His next study (2004) showed that a similar phenomenon occurred in Canada and Japan, and in the economic aggregate comprising four European members of G-7 (France, Germany, Italy, UK). Binswanger's findings support a hypothesis discussed in the literature attributing the big rises in stock prices in the USA and in many other developed countries in the 1980s and 1990s to an international speculative bubble (Binswanger, 2000;Shiller, 2000). However, subsequent examination by Lyocsa and Baumohl (2014) for the same countries with different methodology and monthly instead of quarterly data on industrial production proves that the "returns -growth" relationship is positive and holds over the entire January 1961 -July 2013 period for all G-7 countries and after the weakening during the 1980s and 1990s, the correlations between stock market returns and output growth get higher in the 21 st century.
Panopoulou, Pittis and Kalyvitis (2010) used non-parametric procedures to re-examine the linkages between monthly changes in industrial production and stock prices in G-7 countries over the period from January 1973 to February 2008. They found that that the correlation between growth and returns was detected at larger horizons than those typically employed in parametric studies.
More recently, Black, McMillan and McMillan (2015) presented the results of a very broad study of cointegrating relationships between stock prices, dividends, output and consumption in 29 OECD countries with very mixed results.
Polish authors have also explored relations between the performance of stock market indices and changes in economic activity. In Wyżnikiewicz (2000), Fundowicz (2003) and Brzeszczyński, Gajdka, Schabek (2009), a high positive correlation between the WIG and GDP (or industrial production) concurrent quarterly (monthly) growth rates was reported. According to Stąpała (2012) and Widz (2016), who calculated correlation coefficients for differently lagged time series over the years 1998-2011 and 2003-2014, respectively, the highest correlation occurred between the WIG stock returns leading GDP growth rates by 2 quarters. Rubaszek (2004) reported results that proved the existence of a cointegrating relationship between nominal GDP and WIG, which is quite strange with such a short time series. Also Fiszeder and Rowiński (2012) demonstrated the existence of a long-run dependence between the Warsaw Stock Exchange Index and selected macroeconomic processes.
A few foreign authors studied the stock market and economic growth nexus in Poland taken in the group of other CEE countries with more advanced econo-metric techniques, taking an autocorrelation in data series into account. Having analysed monthly increments in stock indices and a number of macroeconomic variables from four European post-communist countries from the years 1993-1998, Hanousek and Filer (2000) noted that in Poland (and Hungary) current changes in stock prices were related to delayed changes in macroeconomic factors, including industrial production. This led them to a conclusion that the stock markets in those countries had not exhibited semi-strong efficiency. Horobet and Dumitrescu (2009), analysing quarterly data from 1998 to 2008: Q3, did not find a significant relationship between the changes in stock market prices and the real GDP. Lyocsa, Baumohl and Vyrost (2011), using the autoregressive distributed lag single-equation bivariate framework, found Granger-causality of the WIG in relation to changes in GDP and industrial production over the period 1996-2009 and came to the conclusion that the stock market index is a leading indicator of the state of the real economy. Nevertheless, they did not manage to find evidence for a long-run cointegration relationship between stock markets and economic activity, the result which they asses as "interesting" because cointegration has been identified in many developed countries. Lyocsa (2014) provided further evidence for Granger causality from real stock market returns to real economic activity measured with an industrial production index with monthly data over the period 1996-2012. Both the forward-looking and delayed stock market's responses to monthly changes in industrial production were also proven in Ülkü, Kuruppuarachchi and Kuzmicheva (2017) with the usage of the Vector Autoregression with Asymmetric Leads (VAR-wAL) model 1 . Prats and Sandoval (2016) used the VAR model to study Granger causality between the stock market and economic growth but they focused rather on stock market development (measured with market capitalisation, stock total traded value and turnover ratio) than stock performance (index levels or returns).
4. An empirical study of Poland based on the VAR-VECM methodology 4.1. Data and stationarity analysis GDP and the WIG are used to measure the level of economic activity and stock market performance, respectively. The WIG is a total return index, so besides capital gains/losses it encompasses dividends paid and the value of rights issues. The 1 What is interesting, in this paper, the presented results of tests for cointegration speak in favour of a long-run relationship between the stock index and industrial production but the authors have not stressed these results.
data sample consists of quarterly data from between 1995Q1 and 2019Q2 (98 observations altogether). Eurostat data on real seasonally adjusted GDP at market prices from 2015 is used here. To avoid the disturbing impact of the outliers, the quarterly WIG was calculated as an average of closing prices on all trading days in the quarter. The nominal WIG values were adjusted for inflation with the implied GDP deflator (2015 = 100). As usually practised, the logarithms of the variables are used in the study.
In the first step, the temporal structure of both data series was analysed. Because most macroeconomic and financial variables are non-stationary, using them in regressions leads to the problem known as spurious regressions. In economic research, variables are usually required to be weakly stationary and the statistical analysis of stationarity basically comes down to testing for the presence of a deterministic trend (non-stationarity in mean) and of the unit root, i.e. a stochastic trend (non-stationarity in variance). The results of this analysis were summarised in Table 1. The adjusted GDP and WIG data follow a positive trend. Because strong autocorrelation of the first and higher orders was present in the model's residuals, the unit root hypothesis was tested with the augmented Dickey-Fuller (ADL) and Kwiatkowski, Phillips, Schmidt, Shina (KPSS) 2 . The maximum lag lengths in the ADL, p = 4 for GDP and p = 1 for WIG, were selected based on Akaike's information criterion, making sure that the regression coefficients were significant for the maximum lag lengths. The lag lengths in the KPSS test were based on the last column of Panel A in Table 1. Because the null hypothesis about the existence of a unit root was rejected for the levels of both variables in both tests, 2 Due to page restrictions, the methodology of this tests is not presented here. The reader can find the details in Dickey and Fuller (1981) or Enders (2015: 206-226) and Kwiatkowski et al. (1992).
the analysis was repeated for the increments. As there is no proof for the existence of the unit root now, the time series of lnGDP t and lnWIG t are integrated of order 1.

VAR models
Because the time series of both log-variables are integrated, the dynamic relationships between them are assessed based on their increments. In the first step, a two-equation VAR model was estimated, in which a variable's values were explained using its own lags and the lags of the other variable. To account for the likely presence of a linear trend in the growth rates, appropriate deterministic variables were entered to the model. So, the following model was estimated:  The selection of the lag length p was made on the basis of the information criteria of Akaike (AIC), Schwarz (BIC) and Hannan-Quinn (HQ) as well as the results of the likelihood ratio (LR) tests. The AIC and HQ criteria point to p = 4, the natural choice for quarterly data, and the BIC criterion to p = 2. Since the LR test also points to p = 4, this value was assumed in the subsequent study. The time variable turned out to be statistically insignificant, therefore it was removed. The results of estimating the final model form are presented in the left panel of Table 2.   In a correctly specified VAR model, the residuals of all its equations should have the characteristics of a white-noise process. The analysis of the autocorrelation function (ACF) and the partial autocorrelation function (PACF) as well as the results of the Quenouille and Ljung-Box tests excluded the possibility of autocorrelation being present in either equation of the model. The runs test confirmed that the residuals were random. However, in the GDP equation, the Jarque-Bera test rejects the null about a normal distribution of the residuals at 1% level, Doornik-Hansen at 2% and Shapiro-Wilk at 6%. In the WIG equation, the normality is rejected, accordingly, at 3%, 4% and 7%. A closer look at the residuals reveals that in each equation there is one residual with a distance from the zero mean exceeding three standard deviations. It is 1996Q4 in the GDP equation, when the quarterly growth rate of s.a. GDP reached its minimum and 2000Q1 in the WIG equation with the maximum quarterly stock return. Two dummy variables for these two outliers, u0496 and u0100 respectively, were introduced. The estimates of this model version are shown in the right-hand panel of Table 2. Not only the test results for the adjusted model show a normal distribution of residuals but also other statistical properties have improved, e.g. the adjusted R 2 increased substantially in both equations and the F-statistic improved in the WIG equation.

ΔlnGDP equation
To investigate how the growth rates of GDP and WIG are related to each other, Granger causality tests were performed. In both model versions, the value of F-statistics allowed for rejecting the null hypothesis that none of the lagged growth rates of the WIG index in the GDP equation was significant. This has confirmed the conclusion that changes in the WIG index precede changes in GDP. Thorough analysis of regression coefficients at lagged WIG index returns reveals that that the stock market can precede changes in real economic activity by up to 3 quarters. As regards the WIG equation, F-statistics did not allow the null to be rejected, meaning that the rate of GDP growth was not a Granger cause of variations in the WIG returns. The differences between the determination coefficients in both equations are also noteworthy. Compared with the first equation that explains a significant share of changes in the quarterly rates of GDP growth, the second equation's power to explain the WIG returns is quite limited. We will return to this issue afterwards 3 .

3
Although problems like this are usually analysed in the literature in real terms, the VAR model in nominal terms was also estimated. As their real counterparts, nominal lnWIG and lnGDP are integrated of order one, so the model is estimated using differences. The resulted equations are (logarithms were omitted to save space):

Cointegration and VECM analysis
Because the time series of both log-variables are integrated of order 1, the long-run cointegrating relationship between them can exist, i.e. such a linear combination of these variables that is integrated of order 0 (stationary): β GDP lnGDP + β WIG l-nWIG: I(0), where β GDP , β WIG denote the elements of the cointegrating vector, β = [β GDP β WIG ] T . In this case, the VAR model on first differences (1) should be supplemented with the error correction term. This additional error correction term is the necessary condition of the long-run equilibrium analysis. To test for cointegration, the Johansen (1988) procedure is applied. Johansen's VAR-based cointegration test uses a vector error correction model (VECM): where P is the matrix of coefficients staying at one-period lagged endogenous variables. To determine the rank of cointegration (the number of independent cointegrating vectors β), one should test for the rank of P , i.e. for the number of nonzero eigenvalues of this matrix. If rank(Π) = 0, then model (2) comes down to the VAR model for increments of the variables (1). If Π is of full rank (here 2), then time series of the variables in the X t vector are stationary and model (2) is a simple VAR model for the levels of the variables (joint stationarity case) 4 . Rank(Π) = 1 indicates the existence of the cointegrating vector β which elements can be found in P matrix decomposition process. Two tests of the rank of Π were applied. The trace test investigates the null stating that the number of independent cointegrating vectors is r = r * against the alternative that the full rank case occurs. Testing proceeds sequentially for r * = 0, 1, 2, etc. and the first non-rejection of the null is taken as an estimate of r. In the maximum eigenvalue, test the null as for the trace test but the alternative is r = r* + 1 and, again, testing proceeds sequentially for r* = 0, 1, 2, etc., with the first non-rejection used as an estimator for r. It is also known that the results of these tests depend to a large degree on the specification of the VEC model, i.e. on the maximum lag length of endogenous variables, p, as well as on the type of deterministic regressors, included in the D t vector or in the cointegrating relation.
The maximum lag length was set at the same level (p = 4) as in the VAR model analysed above. The results of previous analyses suggest considering the inclusion of the constant and the linear trend in the model. The final choice of the model's form can be made using appropriate tests based on the likelihood ratio statistics (Johansen, Juselius, 1990;Kusideł, 2000: 56-58;Enders 2015: 380-392). In the first step, four forms of VECM were estimated. If a deterministic component is included in a cointegrating relation, we speak of its constrained or restricted form, otherwise when it is part of the D t vector in the formula (2), it is referred to as an unconstrained form. The four forms of VECM tested are: VECM1 -with unconstrained forms of both a constant and a time trend, VECM2 -with an unconstrained constant and a restricted trend, VECM3 -with an unconstrained constant and without a trend and VECM4 -with a restricted constant and without a trend. The estimated eigenvalues of the matrix were sorted descending separately for each form of the model. The results of cointegration tests for particular forms of the model are presented in Table 3   Note: U -unrestricted, R -restricted (constrained), W -without particular regressor.

Source: own elaboration
To test for the null hypothesis about the existence of a particular deterministing regressor in the cointegrating vector (the constrained form of the model) against the alternative stating that this regressor is the element of the D t vector (the unconstrained form of the model), the likelihood ratio statistic is used: where * i l denote eigenvalues of the matrix Π in the unconstrained form of the model in the descending order, λ i are eigenvalues for the constrained form of the model, n is the whole number of eigenvalues (equal to the number of equations in the model), r is the number of eigenvalues in the unrestricted form of the model. The LR statistics has the asymptotic χ 2 distribution χ 2 with (n -r) degrees of freedom. 5 In all versions of VEC models studied with nominal series of GDP and WIG, the rank of the P matrix suggested by Johansen tests equals O. It means that cointegration between these series cannot be found with the usage of this methodology and VAR model for differences without the EC term is properly specified.
In order to decide if a given deterministic factor should be removed from the model (null hypothesis) or included in the cointegrating relation (alternative hypothesis), the statistical test of zero restriction imposed on the corresponding parameter of the cointegrating vector was used. The likelihood ratio statistics in this test have the form: where * i l is the descending sequence of eigenvalues of the Π matrix in the model version with the imposed zero restriction (the lack of deterministic factor), and λ i is the descending sequence of eigenvalues in the unrestricted model, n and r as before. The LR * statistics have an asymptotic distribution χ 2 (m) with the number of degrees of freedom equal to the number of imposed restrictions (here m = 1).
Using the above-presented tests, the appropriate version of the VEC model was chosen. Particular stages and results of this study are presented in Table 4. Because the rank of the matrix in the selected VECM (with unrestricted constant) is 1, there is a cointegrating relationship between the lnGDP and lnWIG. Therefore, the appropriate form of the VECM is estimated. The Π matrix is decomposed into: where β = [β GDP β WIG ] T is the cointegrating vector and α = [α GDP α WIG ] is a vector of weights with which each cointegrating vector enters the equations of the VECM. In a sense, α can be viewed as the vector of the speed of adjustment parameters.
We refrain from introducing any dummy variables into the model in advance. The results are presented in the left panel of Table 5.  The likelihood ratio test (3) was used to test if the regression parameter on lnWIG in the cointegrating equation (error correction term) is significantly different from unity 6 . According to ACF, PACF and the results of the Quenouille and Ljung-Box tests, there is no autocorrelation in residuals of both equations. The runs test confirmed that the residuals were random. However, in the GDP equation, the Doornik-Hansen and Jarque-Bera tests reject the null about a normal distribution of the residuals at 1% level and Shapiro-Wilk at 2.5%. There is one residual referring to 1996Q1 with a distance from the zero mean exceeding three standard deviations. The alternative model with the dummy variable u0496 shows normality in residuals of both equations. The adjusted R 2 for the GDP equation improved substantially but for the WIG equation it got a little worse.
The error correction term is statistically significant in both equations and the adjustment coefficients (α) have the expected signs. It shows that deviations from the common stochastic trend play a statistically important role in explaining the short-run dynamics of GDP and WIG, although the speed at which both variables come back to the "equilibrium" growth path after deviating from it is rather slow. The regression parameter on lnWIG in the cointegrating equation (error correction term), which is significantly different from unity, measures the elasticity of GDP in relation to WIG on the equilibrium path. As it is lower than one, it shows that the WIG grows faster in the long run than GDP. In terms of the adjusted R 2 , introducing the EC term to the VAR system increased the fit of the GDP line but but it slightly worsened the already low explanatory power of the second equation. The difference between the two equations (and the two variables) has become even more pronounced.

Variance decomposition and impulse response results
All previous analyses may lead to the presumption that lnWIG is a more exogenous variable of the model, meaning that the process of lnWIG t is less determined by changes in lnGDP than the process of lnGDP t by changes in lnWIG. This conclusion is corroborated by the Cholesky forecast error variance decomposition, the results of which may vary depending on the "order of equations" 7 , particularly in the case of short-term forecasts. It is so, because a random disturbance (innovation, shock) in the variable explained by the "first" equation simultaneously affects this and the other variable; an innovation in the variable explained by the "second" equation does not have a contemporaneous effect on the second one. 6 If it was not, the model should be estimated again with this restriction imposed. 7 The "order of equations" is related to the number of zero restrictions levied on parameters in particular equations in the structural form of VAR model, the issue called identification problem, see Enders (2015: 290-302). Figure 1 shows the results of this analysis for a forecast horizon of 20 quarters. The numbers on the X-axis denote periods after a disturbance occurred and the Y-axis shows the percentage contribution of the disturbance (innovation) in a variable in explaining its own or the other variable's forecast error variance.
the "order of equations" , particularly in the case of short-term forecasts. It is so, because a random disturbance (innovation, shock) in the variable explained by the "first" equation simultaneously affects this and the other variable; an innovation in the variable explained by the "second" equation does not have a contemporaneous effect on the second one. Figure 1 shows the results of this analysis for a forecast horizon of 20 quarters. The numbers on the Xaxis denote periods after a disturbance occurred and the Y-axis shows the percentage contribution of the disturbance (innovation) in a variable in explaining its own or the other variable's forecast error variance.
A. order of equations: ΔlnGDPt, ΔlnWIGt Source: own elaboration 7 The "order of equations" is related to the number of zero restrictions levied on parameters in particular equations in the structural form of VAR model, the issue called identification problem, see Enders (2015: 290-302). Response of lnWIG to innovations lnGDP lnWIG The comparison of Panels A and B in Figure 1 shows that the order of equations has some effect on the results of the analysis. The proportion of the forecast error variance of GDP explained by innovations in lnWIG t expands with increasing the forecast horizon, stabilising after several quarters at the level of 42% or 60%, depending on whether the "first" equation in the analysis is for lnGDP t or lnWIG t . On the other hand, innovations in lnGDP t account for a relatively small proportion of the forecast error variance of WIG, rising gently as the forecast horizon proceeds. Similar conclusions can be drawn by analysing impulse response functions, which are presented in Figure 2. They trace out the effects of one-unit innovations on the time paths of the {lnGDP t } and {lnWIG t } sequences. Whereas the response of GDP to innovation in the WIG is comparable with the response to its own shock (in Panel B, it is even stronger, which corresponds with Panel B in Figure 1), there is strong discrepancy between these two in the case of WIG. After some quarters, the subsequent values of the {lnGDP t } and {lnWIG t } sequences converge to some fixed levels (their increments converge to zero), which proves the stability of the system.

Final remarks
The stock market and the real economy of a country are commonly regarded to be related to each other. In statistical terms, this relationship can express itself in two different ways. The long term relationship takes the form of a common stochastic trend between the levels of stock market index and GDP or industrial production (IP). The short-run dynamics reveals Granger causality between stock returns and GDP or IP growth rates, usually in the direction from stock returns to economic growth. It is why the stock market is one of the leading economic indicators.
The leading properties of WIG returns in relation to changes in economic activity in Poland were corroborated in a few previous studies, although the results were not fully unambiguous because the opposite direction of causality (from industrial production changes to stock returns) was detected as well (Hanousek, Filer, 2000). However, there was no clear statistical evidence for a long-run cointegrating relationship between the stock index and GDP. As was explained in the Introduction, this might be due to a relatively short data sample, structural changes and too much variation in stock prices.
This study explored the longest data time series that has been investigated so far, including almost a decade in the 21 st century of relatively moderate long-run capital market growth without such dramatic price changes as observed in earlier periods. The results of the VAR-VECM analysis confirmed that stock returns Granger-cause GDP growth with up to three-quarters lead. The opposite direction of Granger causality, i.e. the impact of past GDP changes on current stock returns, has not been found. These results support the thesis according to which stock prices lead (predict) real economic activity. However, an analysis like this cannot show whether the lead is merely a result of stock prices passively discounting future changes in the economy, or whether, and to what extent, it arises from the impact of the stock market on the economy. To answer these questions, the analysis should also consider other macroeconomic variables (consumption, real investments, lending activity, etc.) that are directly involved in the specific mechanisms of this impact. The evidence for the existence of cointegration between the levels of WIG and seasonally adjusted GDP was provided with application of the Johansen procedure, which is the most critical result compared with previous findings with shorter data series. Deviations from the common stochastic trend play a statistically important role in explaining the short-run dynamics of GDP and WIG in the VECM, although the speed of the coming back to this trend after deviating from it is rather slow.
In general, the dynamics of GDP is much better explained by the VAR system than changes of the stock index. Compared with the equation of GDP growth rates in the VECM that explains more than a half of variability in GDP, the explanatory power of the regression for the WIG returns is quite limited. It is consistent with the capital market efficiency theory according to which historical data have no predictive value for stock returns. The WIG is an exogenous variable to the extent to which it is corroborated with the variance decomposition analysis. While innovations in the WIG account for an outstanding proportion of the forecast error variance of GDP, the portion of the forecast error variance of WIG explained by GDP innovations is negligible.
The practical implications of this study are twofold. What is straightforward is that the results support the use of WIG returns as the leading indicator of economic swings (changes in GDP growth). On the other hand, the existence of a cointegrating relationship can have practical consequences for long-horizon investors. Some studies show that such a long-run relationship may imply predictability of stock returns over long horizons using the stock price to GDP ratio (see ex.: Rangvid, 2006). Further research in this area can be done for Poland.