The effect of foreign investment flow on commonality in liquidity on the Brazilian stock market

ABSTRACT The aim of this study was to analyze the characteristics and determinants of commonality in liquidity in the Brazilian stock market. Since the internationalization of the Brazilian stock market (Bolsa, Brasil, Balcão - B3), the flow of foreign investment in Brazil has increased over the years, except in times of crisis. Thus, the present study argues that, in the Brazilian stock market, commonality in liquidity is partly determined by foreign investor trading. Despite the benefits obtained from foreign resources in the Brazilian stock market, it is important to analyze the effect of this flow of foreign investment into the Brazilian stock market. This paper contributes to the current literature by providing evidence for commonality in liquidity in the Brazilian stock market and by showing its stronger effect in periods of market decline. Therefore, investors pay greater attention to the risk of commonality in their portfolios when executing orders and to their trading timing due to the increase in transaction costs of the stocks most sensitive to commonality in liquidity. The study sample consisted of a set of companies listed on the Brazilian stock exchange from January 2007 through December 2017. To analyze commonality in liquidity, we used the model proposed by Karolyi, Lee, and Djik (2012) and by Qian, Tam, and Zhang (2014). To measure the influence of foreign investors on the Brazilian stock market, we used three measures based on Gonçalves and Eid (2016). The results showed that commonality occurs in the Brazilian stock market and that it peaks during international financial crises, as well as indicated that commonality might be higher in times of crisis due to capital constraint. In addition, the results showed that foreign investor participation partly determined commonality.


INTRODUCTION
One of the most significant changes in global financial markets over the past 20 years has been the growth in total trading volume in the stock market (Foran, Hutchinson, & O'Sullivan, 2015). In addition, less liquid assets require a higher return rate than more liquid assets. Thus, in equilibrium, the expected returns are a growing function of risk and illiquidity. Then, when analyzing assets, financial analysts must take into consideration not only the risk and expected return of an asset, but also liquidity (Machado & Medeiros, 2011).
Although different studies have indicated that systematic liquidity factors affect stock returns, this line of research is exclusively focused on the covariance between systematic liquidity and returns. However, until the early 2000s, no empirical or theoretical study had analyzed the covariance between systematic liquidity and asset liquidity (Brockman & Chung, 2002).
The pioneers in this line of research were Chordia, Roll, and Subrahmanyam (2000), who characterized commonality in liquidity as the covariance between individual stock liquidity and market liquidity, which constitutes the commonality in liquidity risk, that is, variations in stock liquidity are determined not only by specific factors, but also by systematic factors.
This study aims to add to the literature regarding commonality in liquidity by identifying its determinants based on supply-side explanations, relying on empirical evidences that foreign investors potentially explain commonality in liquidity, an aspect that is not addressed in past studies, especially in Brazil.
In theory, commonality may result from liquidity providers, information sharing, and capital constraints (Coughenour & Saad, 2004;Hameed, Kang, & Viswanathan, 2010), that is, commonality generated by liquidity provision may derive from the systematic variation of liquidity costs (Coughenour & Saad, 2004), such as market volatility and local interest rates.
According to Karolyi et al. (2012), commonality tends to be higher in countries where markets are less developed, very volatile, and have high interest rates. In this sense, the Brazilian stock market presents favorable conditions for the existence of high commonality, given the low liquidity and high volatility of the market. Moreover, market volatility is one of the main determinants of variations in market liquidity and is highly sensitive to capital constraints in low-liquidity markets, significantly affecting individual liquidity (i.e., commonality) (Brunnermeier & Pedersen, 2009).
In this sense, since the internationalization of the Brazilian stock market Bolsa, Brasil, Balcão (B3), the flow of foreign investment in Brazil has increased over the years, except in times of crisis (Barbosa & Meurer, 2014;Meurer, 2006;Sanvicente, 2014), during which the phenomenon of flight to liquidity occurs. Thus, considering that foreign investors play a more important role than that of domestic investors regarding commonality in liquidity in emerging markets (Karolyi, et al., 2012), the present study argues that, in the Brazilian stock market, commonality in liquidity is partly determined by foreign investor trading.
The supply-side explanations for commonality establish that it derives from liquidity providers, information sharing, and capital constraints, and foreign investors are one of the main capital providers of the Brazilian stock market (Meurer, 2006), increasing the shareholder base and market liquidity. Despite the benefits of foreign investment, such as increased investor base and market liquidity, the market inevitably becomes sensitive to the demand and supply of these agents (Gonçalves & Eid, 2016).
Then, it is believed that one of the determinants of commonality in liquidity is the trading process of foreign investors as liquidity providers, which may also influence other market makers' trading. Another issue that leads to defending such argument regards the investment horizon, since foreign investors are believed to have a short-term strategy, which leads them to withdraw their investments due to negative information or expectation for the market. Such strategy is coherent with the phenomena known as flight to liquidity and flight to quality, in which investors, in moments of crisis or negative information/expectation for the market, move their resources to more liquid and less risky assets.

R. Cont. Fin. -USP, São Paulo
According to evidence of Meurer (2006), foreign investors use a contemporary strategy to deal with the behavior of Índice Bovespa (Ibovespa), buying low and selling high. Still, it is worth mentioning that such investment strategy persists among Ibovespa investors and, therefore, it is possible that they partly determine the behavior of market liquidity.
Furthermore, considering the capital constraint model of Brunnermeier and Pedersen (2009), lowliquidity markets are more sensitive to supply conditions and capital constraints, and in the case of the Brazilian stock market, foreign investors play a key role as capital providers (Gonçalves & Eid, 2016).
Overall, in the Brazilian stock market, commonality in liquidity is presumably partly determined by the participation of foreign investors, given the large volume of resources invested and their influence on other investors. Thus, due to significant differences between developed and emerging markets and because of the characterization of commonality in liquidity as a source of non-diversifiable risk, with implications for investors, companies, and market regulators, the following questions are asked: (i) What are the determinants of liquidity commonality in the Brazilian stock market? (ii) Does foreign investment flow affect commonality in liquidity?
The present study aimed to (i) report the existence of commonality in liquidity, using trading volume as a proxy for liquidity, as suggested by Machado and Medeiros (2011), and (ii) identify its characteristics and determinants. This study is relevant considering the specific characteristics of the Brazilian stock market: (i) low market liquidity compared to other markets; (ii) high volatility; and (iii) high participation of foreign investors, who directly influence liquidity formation in the Brazilian stock market (Meurer, 2006). This paper analyzed the determinants based on supply-side explanations, observing the role of liquidity provision and the financial constraint theory of Brunnermeier and Pedersen (2009), which links an asset's market liquidity and traders' funding liquidity and attributes a strong role in market liquidity to foreign investors, who influence liquidity increase (Meurer, 2006). Therefore, the role of foreign investors in the Brazilian stock market is interesting considering the trading power characteristics. This introduction is followed by another four sections. The next section includes a literature review addressing the theoretical foundation and the determinants of commonality in liquidity, culminating in the research hypothesis. In the third section, the methodological procedures are presented, while in section 4 the study results are presented and analyzed. Then, in section 5, the final considerations are presented, ending with the references.

LIQUIDITY COMMONALITY
The financial literature about liquidity considers the following possible relationships between four different variables (Table 1): stock return (R i ), stock liquidity (L i ), market return (R m ), and market liquidity (L m ) (Sadka, 2011). Table 1 shows the covariance matrix of these four variables and their possible relationships. Table 1 Covariance matrix with possible measures of liquidity uncertainty Note: The variables are described in the text. Source: Sadka (2011).
The covariance matrix in Table 1 depicts the interactions between the four measures and the possible fields of study of liquidity. One of those fields consists of studying liquidity at the stock level, that is, the liquidity volatility ( ). The present study aims to assess the extent of systematic variations in liquidity, (cov(L i , L m )), as first reported by Chordia et al. (2000), termed commonality in liquidity. Another field of research consists in studying the stock liquidity risk pricing (cov(R i , L m )). A challenging aspect in understanding market liquidity is the analysis of the relationship between unforeseen changes in return and in market liquidity, in addition to the relationship between individual stock returns and liquidity, a set of relationships commonly known as liquidity risk (Anderson, Binner, Hagströmer, & Nilsson, 2015).
Throughout its development, the literature about market microstructure has focused almost exclusively on individual stocks (Chordia et al., 2000). The initial models of the market microstructure theory, based on inventory risk, analyzed the trading process as a trading combination problem in which the market maker should use prices to balance supply and demand over time. In this approach, the main factor of the model is the inventory position of the market maker (O'Hara, 1995).
Despite seldom focusing on traditional paradigms, studies of commonality in liquidity show that inventory risk and information asymmetry affect intertemporal changes in liquidity (Chordia et al., 2000).
On the next item, we will discuss the funding constraint model of Brunnermeier and Pedersen (2009), which theoretically demonstrates that commonality in liquidity may be explained by the mechanism of funding liquidity.

The Funding Constraint Model
The funding constraint model of Brunnermeier and Pedersen (2009), which links an asset's market liquidity and traders' funding liquidity, explains the following empirically reported factors of market liquidity: (i) sudden decreases in liquidity; (ii) commonality among stocks; (iii) its relationship with volatility; (iv) flight to quality or flight to liquidity; and (v) co-movement with the market.
The model is based on the logic that when capital/ funding is required during market deterioration, agents are required to sell even more to meet their margin requirements, further decreasing the prices of assets (Schäffler & Schmaltz, 2009).
More specifically, when a trader needs capital, he may use the security as a collateral, but cannot borrow the entire price because, as a protection against default, traders do not trade the security's total market value. Therefore, the margin is the difference between the security's price and collateral value, which must be financed with the trader's own capital (Brunnermeier & Pedersen, 2009).
The model of Brunnermeier and Pedersen (2009) comprises two mechanisms of liquidity spiral: margin spiral and loss spiral. This liquidity model demonstrates that funding businesses affects market liquidity in a profound way. When funding liquidity is tight, traders become reluctant to take on positions, especially "capital intensive" positions in high-margin securities. This lowers market liquidity, leading to higher volatility (Brunnermeier & Pedersen, 2009).
Therefore, when markets are illiquid, market liquidity is highly sensitive to the changes in funding conditions. This way, the model establishes that market liquidity and funding liquidity are mutually reinforcing, leading to liquidity spirals, as shown in Figure 1. First, the margin spiral emerges if the margins are increasing in market illiquidity. In this case, a funding shock to the speculators lowers market liquidity, leading to higher margins, which tightens speculators' funding constraint further (Brunnermeier & Pedersen, 2009).
Second, a loss spiral arises if speculators hold a large initial position that is negatively correlated with customers' demand shock. In this case, a funding shock increases market illiquidity, leading to speculator losses on their initial position, forcing speculators to sell more, causing a further price drop (Brunnermeier & Pedersen, 2009).
These liquidity spirals reinforce each other, implying a larger total effect than the sum of their separate effects. To sum up, a security's market illiquidity is the product of its margin and the shadow cost of funding (Brunnermeier & Pedersen, 2009). According to the model of Brunnermeier and Pedersen (2009), commonality in liquidity and the phenomenon of flight to liquidity are the main causes for the reduction of liquidity in moments of market decline (Rosch & Kaserer, 2013). In addition, the constraint model predicts that commonality in liquidity is greater when the asset is illiquid.
Commonality in liquidity refers to the proposition that the liquidity of individual assets is, at least partially, determined by broad market factors (Brockman & Chung, 2002;Chordia et al., 2000). This proposition's intuitive appeal derives from other company-specific attributes (for example, the risk-return relationship) that are affected by systematic factors.
Considering the evidence of commonality in liquidity, a range of studies analyzed the temporal behavior of commonality and observed that it varies over time (Coughenour & Saad, 2004;Rosch & Kaserer, 2013) and that its effect is heightened during periods of market decline (Coughenour & Saad, 2004;Narayan et al., 2015), when all companies are subjected to the risk of commonality in liquidity (Hameed et al., 2010).
Liquidity providers likely experience capital constraints during market declines and, to manage their wealth, remove liquidity through different actions, leading to high commonality in market declines compared with periods considered normal (Coughenour & Saad, 2004).
This behavior of commonality in liquidity increase in periods of market decline is known in the literature as asymmetric effect of market returns, in which negative market returns have a greater effect than the positive ones (Hameed et al., 2010). Based on the above, the first research hypothesis is postulated: H1: commonality in liquidity has an asymmetric effect and is higher during periods of market decline.

Sources of Commonality
The first evidence of commonality in liquidity was reported by Chordia et al. (2000), Hasbrouck and Seppi (2001), and Huberman and Halka (2001), who noted that little theoretical attention and virtually no empirical study had been devoted to common determinants of liquidity, their empirical manifestation, or correlated movements in liquidity.
In general, commonality in liquidity may be induced by two basic sources: common variation in demand-side liquidity, supply-side liquidity, or both (Coughenour & Saad, 2004;Koch, Ruenzi, & Starks, 2016). This paper argues that, in the Brazilian stock market, commonality in liquidity is partly determined by the trading conducted by foreign investors. Due to the interaction between supplyside and demand-side explanations, the role of foreign investors in commonality may be identified from either perspective. In this sense, the topics Demand-side and Supply-side present a survey of the main evidences for the sources of commonality in liquidity.
According to demand-side explanations, commonality in liquidity emerges from the behavior of investors and traders, due to herding behavior, in that investors tend to imitate the actions of bigger groups. In addition, according to studies conducted in different markets, institutional investors are given the role of dominant group that leads other traders' to herding behavior (Kamara et al., 2008;Karolyi et al., 2012;Koch et al., 2016).
Both in the international and national literature, many are the studies that seek to survey and identify the sources of demand-side explanation of commonality. For example, the studies of Karolyi et al. (2012), Victor et al. (2013), Milani, Bender, Ceretta, Vieira, and Coronel (2014), and Silveira et al. (2014) documented the existence of commonality in liquidity for the Brazilian stock market and, according to demand-side explanations, identified that commonality emerges from the herding behavior of institutional investors (Karolyi et al., 2012;Silveira et al., 2014) or from the participant adjustment to shared information (Victor et al., 2013). In addition, Lowe (2014) identified that, for the Taiwan stock market, the stocks with higher commonality are those that present aggregate ownership by qualified foreign institutional investors and by mutual funds; aggregate ownership is measured by the number of stocks held by such groups.
In turn, Qian et al. (2014) identified that commonality in liquidity is positively related with correlated trading. In addition, consistently with the findings of Karolyi et al. (2012), they found that commonality in liquidity tends to increase with investor sentiment.
All this considered, and considering that demand-side explanations for commonality have been well explored in the literature, this paper focuses on supply-side explanations, which will be covered on the following item.

Supply-side
In financial literature, few are the studies that attempt to identify the supply-side sources of commonality (Bai & Qin, 2015;Coughenour & Saad, 2004;Hameed et al., 2010;Karolyi et al., 2012;Qian et al., 2014). In general, most studies seek to identify the behavior of commonality over time and the demand-side sources of commonality, especially the role of institutional investors.
This study aims to complement the literature regarding commonality in liquidity by identifying its determinants based on supply-side explanations, relying on empirical evidences that foreign investors potentially explain commonality in liquidity, which is an aspect not covered in previous studies, especially in Brazil. The role of foreign investors as determinants of commonality in liquidity is analyzed considering that those investors play a key role in liquidity provision and capital constraints in the Brazilian stock market.
From the perspective of supply-side explanations, commonality derives from liquidity providers, information sharing, and capital constraints (Coughenour & Saad, 2004;Hameed et al., 2010), that is, commonality generated by liquidity provision may result from systematic changes in liquidity provision costs (Coughenour & Saad, 2004).
The supply-side factors that conduct the existence of commonality may be explained by theoretical models that investigate the role of funding constraint in liquidity provision, as seen in item 2.1. In this sense, the model of Brunnermeier and Pedersen (2009) predicts that a large market decline or high volatility adversely affect the liquidity provision of financial intermediaries, which eventually results in a reduction of market liquidity and increase in commonality in liquidity (Karolyi et al., 2012).
The results found by Qian et al. (2014) demonstrate that funding liquidity has a significant impact on commonality in liquidity. To analyze the relation between supply-sources and commonality in liquidity, the authors used the participation of new investors in the Chinese stock market and identified that they lead to a reduction in commonality in liquidity.
In turn, Bai and Qin (2015) analyzed the inventory risk as a source of commonality in liquidity in 18 countries (including Brazil), according to supply-side explanations. They found that commonality is bigger for emerging countries and that factors such as volatility, low market development, weak governance, and noise trading are factors that contribute to high commonality in these markets.
These findings are consistent with the evidence of Karolyi et al. (2012), who identified higher commonality in liquidity in countries whose markets are less developed, more volatile, and have higher interest rates. In addition, Karolyi et al. (2012) found that foreign investors play a superior role than domestic investors in commonality in liquidity. Indeed, some studies have correlated market opening to large investors with liquidity behavior (Barbosa & Meurer, 2014;Meurer, 2006). In general, a mixture of low market liquidity and high volatility is observed in emerging markets, causing a lack of financial market development.
Accordingly, the opening of emerging markets to foreign investors should improve the liquidity of those markets (Meurer, 2006). In addition, as pointed out by Gonçalves and Eid (2016), factors such as credit risk rating, local interest rates, market performance, investment grade, and inflation are factors that contribute to increase foreign investors' buy and sell orders in Brazil, which may lead to a raise (reduction) in liquidity and, consequently, a reduction (raise) in commonality. For example, the behavior of numerous sell orders during financial crises may have an impact on prices, thereby increasing the transaction costs of shares considered more liquid, reducing market liquidity (Poon, Rockinger, & Stathopoulos, 2013).
In summary, regardless of credit risk rating, investors play a key role in the market. Accordingly, because most trading in the Brazilian stock market is conducted by foreign investors, they presumably play a key role in determining the effect of market liquidity on individual stock liquidity. Based on this argument and explanations for supply-side commonality, the order flow (investment flow) of this group of investors must be analyzed, in addition to their role in commonality in liquidity. Therefore, one more hypothesis is postulated for this study: H2: the inflow (outflow) of foreign resources into (out of) the Brazilian stock market directly decreases (increases) commonality in liquidity.

Sample
The study sample consisted of a set of companies listed on the Brazilian stock exchange B3 from January 2007 through December 2017. Such time span was chosen because it covers a period during which financial market crises occurred, and these crises may have directly affected changes in market liquidity (Chordia, Sarkar, & Subrahmanyam, 2005). Furthermore, these changes made it possible to analyze the effect of foreign investment flow on changes in liquidity in different market cycles because during those years, foreign investment increased in the Brazilian stock market, as shown in Table 2.
The data used to conduct this study were collected from the Thomson Reuters ® database and B3. The following sample selection criteria were used: (i) the most liquid stock of each company was selected using the trading percentage; (ii) stocks not traded on at least 15 days in a trading month were excluded; (iii) stocks with a trading price equal to or below R$ 1.00 were excluded from the sample because they tend to experience higher variations in return due to their low value (Chordia et al., 2000) and, additionally, these stocks are more volatile and easier to manipulate, consequently, B3 no longer allows their trading; and (iv) stocks with missing data were excluded from the sample.

Measuring commonality in liquidity
To analyze commonality in liquidity, we used the model proposed by Karolyi et al. (2012) and Qian et al. (2014). In this model, commonality in liquidity is measured by the coefficient of determination (R²) using a two-step estimation method. First, we obtained measures of innovations in liquidity using the residuals of an autoregression model for each stock (i) and daily observations of liquidity in each year t, according to equation 1.
wherein Liq i,d,t and Liq i,d-1,t are the trading volume in Brazilian reais (R$) on days d and d-1 of year t, respectively, the variable D w is a dummy for weekdays (from Monday to Thursday), and Hol i,d,t is a dummy for days considered holidays; these two variables were included to eliminate seasonal variations in liquidity (Chordia et al., 2005;Qian et al., 2014).
It should be noted that unit root tests were performed for variables Liq i,d,t and its lagged variable Liq i,d,t-1 in order to avoid regressions with spurious results due to trends common to both variables. For this, we ran the Dickey-Fuller and Phillips-Perron tests with these variables, after which we can conclude that the variables are stationary. Based on the results of the residuals in equation 1, we obtained a measure of commonality in liquidity, R², by using the regression model, according to equation 2: wherein û m,d,t , û m,d+1,t and û m,d-1,t are market liquidity innovation measures obtained by market-value-weighted average on December 31 of the previous year of û i,d,t , û i,d+1,t , and û i,d-1,t (obtained using equation 1) on days d, d+1, and d-1 of year t, respectively.
Thus, with the values of daily measures of innovation of individual stocks and market liquidity, we obtained the value of monthly commonality for each stock in the study sample based on the R² values calculated using equation 2. In addition, we obtained the market commonality in liquidity by using the mean of individual commonalities.
Finally, because R² is a measure that ranges from 0 to 1, ordinary least squares (OLS) might not be appropriate to estimate the relationship proposed. Thus, we applied a logistic transformation to cope with that problem, i.e., to linearize the distribution of a limited dependent variable. Therefore, we use the logistic transformation of R² to include the value of this measure in the time series regressions, according to equation 3.
wherein Commonality i,m,t is the measure of individual commonality in liquidity of stock i in month m of year t after logistic transformation, for use in the time series regressions. Figure 2 shows the design of this research study, highlighting that commonality consists in the effect of market liquidity on individual asset liquidity, and that two reasons are proposed for its existence: demandside explanation, whereby commonality derives from investor behavior, and supply-side explanation, whereby commonality derives from liquidity providers, information sharing, and capital constraints.  Evidence from international studies suggests that commonality may derive from the behavior of institutional investors (Koch et al., 2016;Narayan et al., 2015). In turn, studies regarding the Brazilian stock market used demand-side explanations to support their findings, that is, they argued that commonality derives from investor behavior, whereby commonality results from herding (Silveira et al., 2014) or from participant adjustment to shared information (Victor et al., 2013).

Commonality in liquidity and foreign investor influence
Our paper focuses on the supply-side explanation of commonality (left-hand side of Figure 2) and brings empirical evidence that foreign investors potentially explain commonality in liquidity, an aspect not covered in previous studies, especially in Brazil.  The present study analyzes the influence of foreign investors on commonality in liquidity in the Brazilian stock market, according to equation 4.
wherein COM_Liq m,t is the market commonality in liquidity in month m of year t, obtained by using the average of all stocks' individual commonality estimate equally weighted average, Ribov m,t is the contemporaneous return of the Ibovespa, obtained on the percentage variation in monthly performance of the Ibovespa, COM_Liq m,t-1 is the market commonality in liquidity at time t-1, Vol m,t is the contemporaneous market volatility, obtained on the monthly standard deviation (SD) of the Ibovespa, Liq m,t is the contemporaneous market liquidity, obtained by using the natural logarithm of the monthly average trading volume, and Inv m,t is the variable used to represent the measures constructed to calculate foreign investor participation in the Brazilian stock market in month m of year t.
Variables COM_Liq m,t-1 , Ribov m,t , Vol m,t , and Liq m,t were included in the model as control variables, as suggested by Chordia et al. (2000). Lagged commonality was included in the model to control the existence of autocorrelation in the time series and a negative effect of this variable on contemporaneous commonality is expected (Chordia et al, 2000). A negative effect of market return on commonality in liquidity is also expected (Hameed et al., 2010;Qian et al., 2014). Finally, a negative effect of market liquidity and a positive effect of volatility on commonality in liquidity are expected, in line with the capital constraint theory.
To measure the influence of foreign investors on the Brazilian stock market, we use three measures: foreign purchases (FP), foreign sales (FS), and net volume flow (NVF) of foreign investors in the Brazilian stock market.
Given the empirical evidence showing that foreign investor inflow in the Brazilian stock market increases liquidity and therefore lowers volatility (Gonçalves & Eid, 2016), the inflow of foreign resources, as measured by the variables FP and NVF, is expected to directly decrease commonality. Conversely, the outflow of foreign resources, as measured by FS, will increase commonality.
In addition to the analysis of commonality, the effects of variables that affect capital supply/constraints in the Brazilian stock market on commonality in liquidity will be assessed, according to the study by Gonçalves and Eid (2016) and to the category to which they belong, that is, macroeconomic factors or exogenous factors. Thus, the regressions per category were estimated according to equations 5 and 6.

Category 1 -Macroeconomic factors
wherein COM_Liq m,t is the market commonality in liquidity in month m of year t, Ribov m,t is the contemporaneous return of Ibovespa, COM_Liq m,t-1 is the market commonality in liquidity at time t-1, Vol m,t is the contemporaneous market volatility, Liq m,t is the contemporaneous market liquidity, ∆EMBI m,t-1 represents the monthly change at time t-1 in the Emerging Markets Bond Index Plus (EMBI+) Brazil index, an index that express Brazil's level of risk, ∆SELIC m,t-1 is the monthly change at time t-1 in Brazilian federal funds rate, and, finally, ∆IPCA m,t-1 is the monthly change at time t-1 in inflation.
The analysis of the effect of Brazil's risk rating on commonality is important because, until 2007, Brazil had a speculative risk rating, and from 2008 to September 2015, the investment grade fluctuated; finally, in late 2015, the investment grade decreased. Given those changes in country risk rating and investment grade, inflow and/or outflow of resources resulting from those changes may be considered determinants of commonality in liquidity (Barbosa & Meurer, 2014;Gonçalves & Eid, 2016;Meurer, 2006;Sanvicente, 2014).
The special system for settlement and custody (Sistema Especial de Liquidação e de Custódia -SELIC) rate represents the cost of investment opportunities in stocks in Brazil, and its increase would result in lower current asset prices, thus attracting new resources to the Brazilian stock market (Meurer, 2006) and decreasing commonality. In turn, a reduction of inflation is also expected to increase the inflow of foreign resources (Gonçalves & Eid, 2016), thus decreasing commonality. wherein COM_Liq m,t is the market commonality in liquidity in month m of year t, Ribov m,t is the contemporaneous return of the Ibovespa, COM_Liq m,t-1 is the market commonality in liquidity at time t-1, Vol m,t is the contemporaneous market volatility, Liq m,t is the contemporaneous market liquidity, Crisis t is a dummy used to assess larger financial crises, and Invest Grade t is a dummy used to assess the increase in Brazil's investment grade.
In the study period, the subprime crisis peaked in August 2008; the Greek crisis, which was narrower, occurred from February 2010 to April 2012, and the economic crisis in Brazil occurred from April 2014 to December 2016. We use the procedure described by Gonçalves and Eid (2016) to assign a value to the Crisis t dummy, where the variable was assigned a value equal to 1 for a period of 12 months, starting in the month after the starting month of the crisis (in the case of the subprime crisis), and 0 otherwise. Accordingly, commonality is expected to increase in periods of financial crisis due to capital constraints.
Regarding Brazil's risk rating, the dummy was equal to 1 when Brazil was granted the "investment grade" status, based on Standard & Poor's credit rating; afterwards, from May 2008 to September 2015, when Brazil lost the investment grade, the dummy was 0. Commonality in liquidity is expected to decrease with the decrease in Brazil's risk rating.
We estimated equations 4 and 6 by using the OLS method and the RStudio software package.

Descriptive Sample Analysis
The study sample consisted of all companies with stocks traded on B3 from January 1 2007 to December 31 2017, excluding stocks for which the number of days with a return equal to 0 was greater than 80% per trading month, stocks not traded on at least 15 days in a trading month, and stocks with a trading price equal to or below R$ 1.00.
Thus, after applying the exclusion criteria, data regarding 1,492 stocks were collected. An average of 140 stocks per year were analyzed (37% of the population), with a minimum of 73 stocks (18% of the population) analyzed in 2007 and a maximum of 170 stocks (49% of the population) analyzed in 2017, as indicated in Table 3. Compared with the samples used in international studies, the number of stocks analyzed herein is small, which is one of the problems associated with the Brazilian stock market, for which the number of companies with The effect of foreign investment flow on commonality in liquidity on the Brazilian stock market 12 R. Cont. Fin. -USP, São Paulo traded stocks is low (Machado & Medeiros, 2011). For example, in the international studies that included the Brazilian stock market, Karolyi et al. (2012) analyzed data of 126 stocks from 1999 to 2009, while Bai and Qin (2015) analyzed data of 232 stocks for the period between 1990 and 2005. As to the Brazilian studies, Victor et al. (2013) analyzed data regarding 30 stocks, whereas Silveira et al. (2014) analyzed data concerning 69 stocks traded on B3. Moreover, as indicated in Table 3, over the years, the number of companies with stocks traded on B3 has decreased, which may result from the low stock prices and the high cost of remaining listed on the Brazilian stock exchange.

Evidence for Commonality in Liquidity
To obtain the commonality value for each stock, twostep regressions were estimated. The first step consisted of obtaining liquidity innovation measures using daily liquidity measures in each year t, according to equation 1. After obtaining the liquidity innovation measure of each stock, the R² (commonality) in equation 3 is from the regression of liquidity innovation on market liquidity innovation variables (equation 2). The number of stocks and mean, minimum, and maximum commonality in liquidity values of the study stocks in each year are outlined in Table 4. The results of the descriptive statistics outlined in Table 4 show that, from 2007 to 2014, the number of stocks selected to form the sample increased, which may have resulted from the increase in market liquidity and in the number of participants during this period, that is, the criteria used for sample selection.
Furthermore, Table 4 indicates that the mean value observed, which represents the Brazilian stock market commonality, is greater than that found in the international literature, albeit consistent with the results found for the Brazilian stock market. For example, Chordia et al. (2000) found a commonality value of 0.09 for the United States of America market. Conversely, Silveira et al. (2014), who analyzed the existence of intraday commonality in liquidity in the Brazilian stock market from January 15 2013 to March 18 2013, found a commonality value of 0.2204. In turn, Karolyi et al. (2012) and Bai and Qin (2015) found a value of 0.24 and 0.18, respectively, for commonality in the Brazilian stock market.
Furthermore, the analysis of commonality in liquidity values of the Brazilian stock market shows that the highest values are concentrated from 2007 to 2010, a period encompassing the subprime crisis, during which a mean value over 0.20 and a maximum value over 0.97 are observed. Therefore, commonality in liquidity is a phenomenon present in the Brazilian stock market.
In addition, we analyzed the existence of a size effect concerning commonality in liquidity, that is, higher or lower stock sensitivity to systematic variations in liquidity depending on company size, as reported in the international literature (Brockman & Chung, 2002;Chordia et al., 2000;Foran et al., 2015;Tayeh et al., 2015).
To assess the existence of a size effect concerning commonality in liquidity, the selected stocks were classified into quartiles (from first to third quartile) based on their market value. Subsequently, the mean annual commonality value was calculated for each quartile to assess whether there was an increase in the commonality value with the increase in the market value of the sample throughout the quartiles. The results of the effect size analysis are outlined in Table 5.  Chordia et al. (2000). This size effect may be explained by the effect of outliers for certain stocks within the quartiles. However, the 10% winsorized mean was calculated for each quartile and the results were unchanged, thus indicating the existence of a size effect concerning commonality in liquidity.

Commonality in liquidity and stock market conditions
To assess the effect of market conditions on commonality in liquidity, the following variables reported in the literature were used as determinants of commonality in liquidity: past commonality in liquidity (Com_Liq t-1 ), market return (Ribov), market return volatility (Vol), and market liquidity measure (Liq).
It should be noted that unit root tests were performed for all four variables to avoid regressions with spurious results due to trends common to all variables. Table 6 outlines the results of the analysis of the effect of market conditions on commonality in liquidity.  (Brooks, 2008). *, **,*** = significance at 10, 5, and 1% levels, respectively. The results presented in Table 6 show that only the market liquidity variable had no significant effect on commonality in liquidity, with a negative coefficient of -0.256, as expected. In line with the findings of Chordia et al. (2000), past commonality negatively affected contemporaneous commonality, with a coefficient of -0.593 significant at the 1% level. Market return also negatively affects commonality in liquidity, with a coefficient of -0.746 significant at the 10% level.
The market volatility variable had a positive coefficient (6.191), which was significant at the 5% level. This result corroborates that found by Silveira et al. (2014) for the Brazilian stock market, wherein market volatility positively and significantly affected the fluidity of trading of individual stocks.
This evidence for a positive effect of market volatility and a negative effect of market return results from capital constraints, which reduce liquidity supply during market declines and therefore increase commonality in liquidity (Qian et al., 2014). Accordingly, we assessed whether an asymmetric effect on commonality in liquidity occurs in the Brazilian stock market, that is, whether the negative effect of market return is bigger than the positive effect of market volatility on commonality in liquidity (Coughenour & Saad, 2004;Hameed et al., 2010;Narayan et al., 2015). The results are presented in Table 7.
The results outlined in Table 7 show that the dummy variable representing the negative market return had no significant effect. Accordingly, the effect of commonality in liquidity is nonsignificant only in periods of decline of the Brazilian stock market, that is, no asymmetric effect occurs, with an equal effect during bull market periods.

Table 7
Analysis of commonality in periods of market decline Standard error t statistic p-value

Note: COM_Liqt is the market commonality in liquidity in month t obtained by averaging the individual commonalities,
COM_Liqt-1 is the market commonality in liquidity in month t-1, included to control for the existence of autocorrelation in the time series, Ribovt is the market return, Volt is the market volatility, LIQt is the market liquidity, and Rnegative t is a dummy whose value is 1 when the market return is negative and 0 when positive. The White test was performed to identify heteroscedasticity and the Lagrange multiplier (LM) test was used to identify autocorrelation. The LM test indicated the presence of autocorrelation. Accordingly, correction based on the robust Newey-West estimator was performed. Based on the Jarque-Bera statistic (0.236), the null hypothesis of normal distribution was not rejected, thus indicating the normality of the residual. The variance inflation factor (VIF) was used to detect the presence of multicollinearity. A VIF of 1. 024, 1.306, 1.291, 1.300, and 1.142 was obtained for the variables, which is below 2.0 for all variables and within the acceptable maximum (up to 5.0), thus indicating a lack of collinearity (Brooks, 2008). *, **,*** = significance at 10, 5, and 1% levels, respectively.

Source: Elaborated by the authors.
An explanation for the nonsignificant effect of negative return on commonality may be related to extreme market conditions. In this case, according to Qian et al. (2014), a dummy was used for negative return in extreme conditions, that is, if the market return is 1.5 time greater than the SD of the unconditional mean, the dummy is equal to 1, and it is 0 otherwise. Thus, a new equation was estimated, including the dummy for negative returns in extreme conditions. The results are presented in Table 8.
As indicated in Table 8, the dummy for negative returns under extreme conditions had a negative coefficient of -0.280 and was significant at the 1% level. The other variables maintained the signs of their coefficient and their significance.  (Brooks, 2008). *, **,*** = significance at 10, 5, and 1% levels, respectively.

Source: Elaborated by the authors.
The significance of this dummy for negative returns corroborates the findings of Hameed et al. (2010) and Qian et al. (2014), who observed a higher market return effect on commonality in liquidity in periods of market decline under extreme conditions. Accordingly, commonality in liquidity exhibits an asymmetric effect limited to extreme conditions, that is, the effect of commonality in liquidity is heightened in periods of extreme market decline. Based on this result, research H 1 , postulating that commonality in liquidity has an asymmetric effect that is stronger in periods of market decline, cannot be rejected.

Analysis of the effect of foreign investors on commonality in liquidity
This section assesses the effect of foreign investor participation in the Brazilian stock market on commonality in liquidity. Three measures were used to calculate foreign investor participation: cumulative FP in R$ -Model 1; cumulative FS in R$ -Model 2; and monthly net inflow of foreign investors, computed as the difference between the monthly financial volume of purchase and sale orders (NVF) -Model 3.
The results of equation 4 are outlined in Table 9, which presents the estimates of three models for each foreign investor measurement variable: FP, FS, and NVF. The results show that, after including the variables measuring foreign investor participation, the other variables maintained the signs of their effects on commonality in liquidity, and a negative effect of market return plus a positive effect of market volatility on commonality in liquidity were again observed.

Source: Elaborated by the authors.
According to Table 9, cumulative FP (Model 1) had a negative effect on commonality in liquidity, as expected. Thus, H 2 , which postulates that the inflow of foreign resources directly decreases commonality in liquidity, cannot be rejected.
Furthermore, the effect of resource outflow was assessed using the variable cumulative FS (Model 2). The results presented in Table 9 show that the cumulative FS variable had a positive (1.627) and significant effect at the 1% level on commonality in liquidity, as expected. Based on this result, H 2 , postulating that the outflow of foreign resources directly increases commonality in liquidity, cannot be rejected.
Accordingly, the effect of foreign investor participation in the Brazilian stock market may be captured by the market trading volume (Meurer, 2006). Thus, an increase in trading volume will increase market liquidity and therefore decrease commonality in liquidity.
Another measure used to analyze the effect of foreign investors on commonality in liquidity was the monthly NVF, which is the difference between the monthly total FP and sales. The results of the analysis of the NVF effect are also presented in Table 9 (Model 3). Contrary to expectations, the free flow variable had a positive, albeit nonsignificant, coefficient.
A possible explanation for the nonsignificant effect of the NVF variable is that, as found by Meurer (2006), foreign resource inflow is not directly captured by this variable, and its effects are observed via increases in market liquidity or by assessment of the effects FP and sales separately, as in Gonçalves and Eid (2016). Furthermore, the free flow variable may not be ideal for assessing the inflow of foreign resources into the Brazilian stock market since part of this net flow may result from reallocation of resources that have already been internalized (Gonçalves & Eid, 2016).

Analysis of the effect of capital constraint on
commonality Subsequently, a key question of the analysis of commonality was the assessment of the effect of macroeconomic variables on commonality in liquidity. Thus, the variables EMBI, Selic, and Índice de Preços ao Consumidor Amplo (IPCA), identified by Gonçalves and Eid (2016), were used as determinants of foreign capital inflow in the Brazilian stock market. Accordingly, the role of foreign investors and the variation in macroeconomic variables associated with the Brazilian stock market on commonality in liquidity were analyzed using equation 5.
The results of equation 5 are outlined in Table 10. Similar to previous results, the signs of the coefficients of lagged commonality, market return, and market volatility did not change, although market volatility was no longer significant in explaining commonality. In the first model, using the FP variable in the presence of macroeconomic variables (EMBI, Selic, and IPCA), the effect of FP on commonality increased, remaining negative (-1.591) and significant at the 1% level.   (Brooks, 2008). *, **,*** = significance at 10, 5, and 1% levels, respectively.

Source: Elaborated by the authors.
Among the macroeconomic factors included in Model 1, only the change in Brazil's risk rating was positive (0.568) and significant, as expected. This positive effect of the country's risk rating on commonality in liquidity may be explained by the phenomenon known as flight to liquidity/quality, in which investors shift their resources to countries with greater liquidity and lower risk (Rosch & Kaserer, 2013). Regarding cumulative FS (Model 2), the results were similar to the findings for FP, albeit with the opposite sign for the variable measuring foreign investor participation (1.468). In the regression using the net purchases variable (Model 3), except for lagged commonality and country risk, the other variables exhibited no significance.
Another aspect analyzed as an explanatory factor of commonality in liquidity was the effect of factors exogenous to the Brazilian stock market, such as the occurrence of international financial crises and the investment grade awarded to Brazil. To analyze the effects of those factors, we estimated equation 6.
The results of equation 6 are outlined in Table 11 and indicate that the variables Crisis and Investment Grade exhibit no significant difference in any model analyzed, thus corroborating the findings of Gonçalves and Eid (2016), according to whom those variables are less relevant in the resource inflow/outflow process, and therefore, their effect on commonality in liquidity is weaker. Furthermore, the results also showed that FP, FS, and foreign participation in stock market capitalization, used to measure the foreign investor effect, significantly explain commonality in liquidity.  is the estimated market liquidity, Invm,t is the variable used to represent the measures constructed to measure foreign investor participation in the Brazilian stock market (Table  7) in month m of year t, Crisist is a dummy used to assess larger financial crises, and Invest Gradet is a dummy used to assess the increase in Brazil's investment grade. Correction based on the robust Newey-West estimator was performed in all regressions. The Jarque-Bera test used in all regressions did not reject the null hypothesis of normal distribution. The variance inflation factor (VIF) was used to detect the presence of multicollinearity. A VIF below 2.0 was obtained for all variables, within the acceptable maximum (up to 5.0), thus indicating a lack of collinearity (Brooks, 2008). *, **,*** = significance at 10, 5, and 1% levels, respectively. Source: Elaborated by the authors.

CONCLUSION
Liquidity is one of the main characteristics of stock markets and the object of desire of risk-averse investors. However, Chordia et al. (2000) highlighted that when choosing investments based on stock liquidity, in addition to market return effects, market liquidity effects should also be considered; the authors referred to such effects as commonality in liquidity.
The results showed that the commonality in liquidity of the Brazilian stock market was greater than that found in the international literature and that the mean commonality in liquidity may be considered reasonable, considering the high number of variables that affect the stock market and that cannot be represented in a single statistical model.
In addition, commonality was higher in periods of market decline; thus, H 1 , which states that commonality has an asymmetric effect, could not be rejected. Accordingly, the present study contributes to the current literature by providing evidence for commonality in liquidity in the Brazilian stock market and by showing its stronger effect in periods of market decline. Therefore, investors pay greater attention to the risk of commonality in their portfolios when executing orders, and to their trading timing due to the increase in transaction costs of the stocks most sensitive to commonality in liquidity.
Furthermore, the present study reveals the consequences of foreign investor participation as liquidity providers in the Brazilian stock market because, during periods of market decline, those liquidity providers experience capital constraints and, in an effort to manage their wealth, they restrict the supply of liquidity by settling their positions, thereby increasing commonality.
Thus, the results showed that the inflow/outflow of foreign resources decreases/increases commonality in liquidity and that this effect is significant even in the presence of variables previously reported in the literature as determinants of commonality (return, volatility, and lagged commonality). Accordingly, H 2 , which postulated that the inflow/outflow of foreign resources directly decreases/increases commonality, cannot be rejected.
Finally, there are signs that when the country's risk rating grows, the Brazilian stock market performs badly, which is partly explained by the exit of foreign investors' resources, a phenomenon known as flight to liquidity/ quality, in which investors take their resources to countries with greater liquidity and lower risk.