The Measurement Method of Investor Sentiment and Its Relationship with Stock Market

Investor sentiment is a hot topic in behavioral finance. How to measure investor sentiment? Is the influence of investor sentiment on the stock market symmetrical? ,at is all we need to think about. ,erefore, this paper firstly selects five emotional proxy variables and constructs an investor sentiment composite index by principal component analysis. Secondly, theMS-VARmodel is employed to study the dynamic relationship among investor sentiment, stock market returns, and volatility. Using the model MSIH (2)-VAR (2), we found that the relationship among the investor sentiment, stock returns, and volatility is different in different regimes.,e results of orthogonal cumulative impulse response analysis showed that the shock to investor sentiment has a significant impact on stock market returns, and this impact in the bullish stock market is significantly higher than in the bearish stock market. ,e impact of the shock to stock market returns on investor sentiment and stock market volatility is relatively significant. ,e shock to stock market volatility has significant effects on the stock market returns. Overall, the influence of investor sentiment on the stock market is asymmetric; that is, in different regimes of the stock market, the impact of investor sentiment on the stock market is different. Realizing this, investors can better understand and grasp the market, guiding their own investment behavior. Other researchers can also further study the measurement of investor sentiment on this basis to better guide investors’ behavior.


Introduction
Since Fama put forward the efficient markets hypothesis in 1970, the classical financial theory has developed rapidly.
is hypothesis believes that the investors in the market are rational and the price of assets can fully reflect their basic value. However, more and more abnormal phenomena in the financial market have brought about a great impact on the classical financial theory, which has prompted financial scientists to further consider the basic assumptions of traditional finance. Behavioral finance, developed in the 1970s and 1980s, takes investor behavior as the research object and explains the abnormal phenomenon of financial market from the perspective of sociology based on investor psychology and behavior.
is has also prompted a large number of scholars to study investor behavior and investor sentiment [1][2][3].
Black first introduced the concept of "noise trader" and pointed out that the existence of noise traders improved the liquidity of the market but reduced the effectiveness of the market [4]. Delong et al. proposed a noise trader model (DSSW), which for the first time considered the influence of investor sentiment in the asset pricing model [5]. Lee et al. put forward investor emotion hypothesis (LST) and explained the value of the closed fund with investor's emotion [6]. DSSW model and LST model lay a theoretical foundation for the later research on the relationship between investor sentiment and stock market. And then many researchers discussed the formation and quantification of investor sentiment.
In view of relevant literature research at home and abroad, there are generally two ways to measure investor sentiment. One is the direct method. It is compiled by surveying investors' views on future market trends. It includes Investors' Intelligence (II) Index, American Association of Individual Investors Index (AAII), Friendship Index, and "CCTV Watch Index." e other is the indirect method. It constructs an investor sentiment index by selecting market data related to investor sentiment. It includes Advance Decline Line (ADL), Arms Index (ARMS), New High-New Low Index (HI/LO), Closed-End Fund Discount, and Consumer Confidence Index (CCI). In recent studies, the composite index of sentiment has been used to stand for single emotional indicators, such as that of Baker and Wurgler [7]. ey used principal component analysis (PCA) to construct an investor sentiment composite index from six single sentiment indexes. e central idea of principal component analysis (PCA) is to reduce the dimensionality of a data set consisting of a large number of interrelated variables, while retaining as much as possible the variation present in the data set [8]. For the related theories and applications of principal component analysis, please refer to literature [8][9][10][11]. In this paper, principal component analysis is used to construct the investor sentiment composite index based on Chinese stock market data. e index, constructed in this way, better captures the sentiment of individual investors in China.
Recently, many researchers have considered the relationship between investor sentiment and stock market returns and volatility from an empirical perspective [12][13][14][15].
Hu and Wang studied the influence of investor sentiment on asset value [13]. Ni et al. studied the nonlinear effect of investor sentiment on the monthly stock market return using the panel quantile regression model. e study found that investor sentiment had a significant effect on the stock market's monthly returns [14]. Lutz used a dynamic model to construct a new indicator to measure investor sentiment and found that it was asymmetric [15]. Chen constructed a measure that directly reflects investors' attention toward the global benchmark indices and studied the relationship between this measure and investor sentiment [16]. Debata et al. examined the impact of local and foreign investor sentiment on emerging stock market liquidity. A positive effect of investor sentiment on liquidity was found [17]. Ryu et al. examined how investor sentiment and trading behavior affect asset returns. ey found that high investor sentiment induced higher stock market returns [18]. Debata et al. studied the impact of investor sentiment on liquidity in emerging markets [19]. Takanori investigated the relationships among an exchange merger, investor sentiment, and liquidity by analyzing data from the 2013 merger of the Tokyo Stock Exchange and Osaka Securities Exchange [20]. ey found that the investor sentiment effect occurs more strongly in small stocks. Ding et al. obtained a multirisk asset model by extending the DSSW model and verified the crosssectional impact of investor sentiment on stock returns by using this model [21]. Under this model, investor sentiment is divided into short-run and long-run components, and it is predicted that long-run components are negatively correlated with cross-sectional returns, while short-run components are positively correlated with cross-sectional returns. Chen et al. studied the trend following trading behavior on the Chinese stock market and used the network model to describe the interpersonal relationship [22]. It proved the inefficiency of timing arbitrage in China's stock market. e above research works consider the market as a whole. Chen et al. constructed an investor composite emotional index with principal component analysis. ey used this composite sentiment index as a threshold variable to divide the stock market. TAR model was used to divide the Hong Kong stock market and the Chinese mainland stock market into three states, respectively [23,24]. Linear AR model was established for the stock market return in each state, and its predictive ability was discussed. However, the TAR model can only study univariates. Chiraz and Soumaya investigated the effect of exposure to aggregate volatility risk on stock returns in both high-sentiment and low-sentiment regimes by using both cross-sectional and time series analysis [25]. ey found that exposure to aggregate volatility risk is negatively related to returns when sentiment is low. However, this relation loses its significance when the sentiment is high. Dong et al. discussed the effects of different mechanism probabilities and investor heterogeneity on the risk contagion effect of the stock market [26]. Wang examined the role of institutional investor sentiment in determining betareturn relationships, and through empirical analysis showed that the beta-return relationship is asymmetric between the bearish period and the bullish period [27]. e state of the market in these literatures is predetermined. e method of determining the state of the stock market in advance is subjective and will inevitably ignore some valuable information. In view of the limitations mentioned above, this paper uses the Markov-Switching Vector Autoregressive (MS-VAR) model to study the relationship between investor sentiment and stock market returns and volatility under different market states. is model can dynamically describe the nonlinear relationship between these three variables; that is to say, the parameters in the model will change with the different states of the variables, so that the relationship between the variables can change according to different regimes, which is more practical and more explanatory. Realizing this, investors can better understand and grasp the market, guiding their own investment behavior. e rest of this article is as follows. Section 2 gives the required econometric model. Section 3 gives the data required herein and constructs the investor sentiment index. Section 4 makes an empirical analysis. Finally, the conclusion is given.

Econometric Model
Based on Hamilton's [28] and Krolzig's [29] studies, this paper adopts Markov-Switching Vector Autoregressive (MS-VAR) model to study the dynamic relationship between investor sentiment, stock market returns, and stock market volatility. 2 Computational Intelligence and Neuroscience Hamilton [28] considered a first-order autoregression in which both the constant term and the autoregression coefficient might be different for different subsamples: where ε t ∼ i.i.d.N(0, σ 2 ) and s t is an unobservable random variable of state.
In this paper, we will consider the p-order autoregression model. e regression parameters of the model depend on an unobservable state variable and the state variable obeys the Markov-Switching process. Suppose that there are m state variables, then MS (m)-VAR (p) is as follows (see Hamilton [28]): where σ ∼ NI D(0, (s t )), ε t ∼ N(0, 1), β 1 , β 2 , . . . , β p are parameters, ands t is an unobservable random variable of state. e transition probability from state i to state j is (3) In this paper, we assume that the stock market has two states (the downturn and the boom of the stock market); then, the corresponding transition probability matrix is where p i1 + p i2 � 1, i ∈ 1, 2 { }. If M represents the means of the Markov Regime Switching model, I represents the intercept item of it, A represents the autoregressive parameters, and H represents heteroscedasticity. en, according to whether the intercept, mean, and parameters of the model depend on the state and the heteroscedasticity of the VAR error term, we can obtain different MS-VAR models. Summarized in Table 1.
For example, in Table 1, MSM-VAR means that the mean varies with the state s t , MSIH-VAR means that intercept terms and variances vary with state s t , and MSMA-VAR means that the mean and autoregressive coefficients vary with state s t .

Data Sources.
In terms of stock market returns (R t ), this paper selects the monthly rate of return data of Shanghai Securities Composite Index for research. e sample data are selected from January 2004 to June 2014. Meanwhile, the monthly volatility of the Shanghai Composite Index is selected as the volatility of the stock market (VOL t ). All the data come from the RESSET financial database.

Return and Volatility of Stock Market.
e monthly rate of return of the stock market is where P t is the closing price of the Shanghai Composite Index in month t, which is the price of the stock market. e specific calculation method of VOL t is as follows. e standard deviation of the logarithmic daily return of the Shanghai composite index in each month is calculated, and then the monthly return volatility is estimated.
e principal component analysis is used to construct the investor sentiment composite index based on Chinese stock market data. Considering the reality of the Chinese stock market, we select five proxy variables of investor sentiment, namely, the market turnover rate, the number of newly opened A-share accounts, the number of monthly IPO, first-day return of IPO, and discount of closed-end funds. We use these five sentiment proxy variables to construct an investor sentiment composite index with the principal component analysis method.
(i) Market Turnover Rate (TURN). Baker and Stein pointed out that liquidity can be used as a measure of investor sentiment [30]. is is because investors tend to have lower emotions in the downturn of the stock market and higher emotions in the upsurge of the stock market. We can measure the liquidity of the market by the turnover rate of the market. Market turnover rate is included in the investor sentiment index. In this paper, the weighted monthly turnover rate of capitalization for A-share stocks in Shanghai and Shenzhen Stocks is selected.
(ii) Growth Rate of Newly Opened A-Share Accounts (NOPEN). Wu and Han believed that when the investor sentiment is high, the enthusiasm to enter the market will be high, so that the number of new accounts will increase [31].
where ΔOPEN is the number of newly opened accounts in the current month and TOPEN is the total number of opened accounts at the end of last month.

(iii) Number of Monthly IPO (NIPO) and Its First-Day
Return (RIPO). Baker and Wurgler believed that both the number of stock offerings and first-day returns can reflect investor sentiment [3]. e larger the issuing scale, the higher the first-day return, which means the higher investor sentiment and vice versa. In general, when the investor sentiment is high, the issuance of new shares is intensive, while when the investor sentiment is low, the issuance speed of new shares is slow. It is even possible to suspend that issuance of new stock in China. e number of IPO (NIPO) in this article refers to the amount of money raised in initial public offerings each month. First-day return of an IPO Computational Intelligence and Neuroscience (RIPO) is the arithmetic average first-day return of newly listed A-shares in the current month.
(iv) Discount of Closed-End Fund (CEFD). Lee et al. believed that the discount rate of closed-end funds can reflect investor sentiment [6]. e higher the discount rate of closed-end funds, which shows that investors are bearish on the market, the lower the sentiment of investors. In this paper, the formula of discount of closedend fund is where p it is the market price of the fund i at the end of the month t, NAV it is the net value of fund i at the end of t-month, and k is the number of closed-end funds in month t.
(2) Investor Sentiment Construct. Descriptive statistics and correlation coefficients of the five sentiment proxy variables are shown in Tables 2 and 3, respectively. From Table 2, we can clearly understand the basic descriptive statistics of the five sentiment proxy variables. From Table 3, we can find that these five variables are correlated to some extent. e principal component analysis method is used to construct the composite investor sentiment index. e principal component analysis requires the variables to be stable, and ADF is used to test the stationarity of the five proxy variables of investor sentiment. e test results are shown in Table 4.
As can be seen from Table 4, all the five variables are stationary, so the principal component analysis can be available. e analysis results are summarized as follows.
From Table 5, we have e cumulative contribution rate of the first three principal components is 78.44%, so the weighted average of the first three principal components is selected to form the time series of investor sentiment index  Table 6 gives the results. As can be seen from Table 6, the composite investor sentiment index, stock market return rate, and stock market volatility are all stationary; that is, they are integrated of order 0. e composite investor sentiment index and the stock market volatility are integrated of order 0 under the significance level of 5%, and the stock market returns are integrated of order 0 under the significance level of 1%. erefore, we select each variable for quantitative analysis.

Model Selection of MS-VAR.
is section constructs an MS-VAR model including investor sentiment (SENT) and the rate of return of Shanghai stock index (R) and its rate of volatility (VOL). In MS-VAR model, the mean value, variance, regression coefficient, and intercept of the model may change with the change of state. us, MS-VAR model with parameters changing with the state can be formed. In this paper, we select two states, namely, the stock market boom (bullish) and a downturn (bearish) to study the relationship between variables in these two states. Appropriate models are selected according to AIC, SC, HQ, and log-likelihood ratio of the model, as shown in Table 7.
As can be seen from Table 7, although the LR of the MSIH (2)-VAR (2) model is not optimal, its linear test value is 655.787, the chi-square statistic has also passed the test, and the AIC, HQ, and SC of the model are all optimal, so we choose MSIH (2)-VAR (2).  Figure 1 shows the relationship between investor sentiment, stock market returns, and volatility, and Figure Tables 8 and 9, respectively.
As can be seen from Tables 8 and 9, the probability of maintaining the system in state 1 is 0.821, and 64.30% of the time is in state 1. e average duration is 5.60 months. e probability of maintaining state 2 is 0.678, about 44.6% of the time is in state 2, and the average duration of state 2 is 3.1 months. e probability of transitioning from state 1 to state 2 is 0.179, and the probability of from state 2 to state 1 is 0.322. e correlation coefficient of the same period for each regime is in Table 10.
From Table 10, we can find the following.
In regime 1 (a period of stock market downturn), there is a negative correlation between investor sentiment and stock market returns; that is, the higher the investor sentiment (namely, investors are optimistic), the lower the stock market returns; conversely, the lower the investor sentiment (namely, investors are pessimistic), the higher the stock market returns. However, in regime 2 (the period of stock market upsurge), there is a positive correlation between investor sentiment and stock market returns; that is, the higher the investor sentiment is, the higher the stock market returns will be; on the contrary, the lower the investor sentiment is, the lower the stock market returns will be.
ere is a positive correlation between investor sentiment and stock market volatility in regime 1; that is, the higher the investor sentiment is, the greater the stock market volatility is, and the lower the investor sentiment is, the smaller the stock market volatility is. In regime 2, the two are negatively correlated; that is, the higher the investor sentiment is, the smaller the stock market volatility will be, and the lower the investor sentiment is, the greater the stock market volatility will be. As for the stock market return rate and volatility, there is a negative correlation between regional system 1 and regional system 2.

Pulse Response Analysis of Different Regimes.
In order to further investigate the dynamic response relationship among investor sentiment, stock market returns, and stock market volatility, and compare the differences between such dynamic response relationships when stock markets are in different states, this paper uses the cumulative impulse response based on regionalization for analysis.

e Effect of Investor Sentiment on the Stock Market.
When investor sentiment is positively impacted by a standard deviation, the dynamic changes of stock market returns and volatility are shown in Figure 3.
(1) Given a positive impact of one standard deviation of investor sentiment, as shown in Figure 3(a), in regime 1 (that is, the downturn of the stock market), it will immediately cause a decline in the stock market return and then gradually decline until 10 months later the decline decreases. After the 15th month, the cumulative decline is basically stable, and the cumulative stock market return declines. In   Note. c, t, and k represent constant term, trend term, and lag order, respectively. * p < 0.01, * * p < 0.05, and * * * p < 0.1.
Computational Intelligence and Neuroscience Figure 3(b), we can find that in regime 2 (that is, the high period of the stock market), the positive impact of investor sentiment will cause an immediate rise in the stock market return and then gradually decline. After the fourth month, the cumulative response starts to be negative, and until the 15th month, the cumulative decline is basically stable and the cumulative stock market return declines. In the short run, investors' optimism will lead to a decline in stock market returns in the bear market state and an increase in stock market returns in the bull market state. In the long run, investors' optimism will lead to a decline in stock market returns no matter in the bear market or bull market state. (2) In regime 1 and regime 2 (Figures 3(a) and 3(b)), given the positive impact of one standard deviation to investor sentiment, this has little effect on the volatility of the stock market. But under the two regimes, the direction of influence is still different. In regime 1, the positive impact of investor sentiment does not immediately change the stock market volatility, but gradually increases the cumulative response of the stock market volatility. However, the increase is small, and the cumulative response remains stable after about 7 months. In regime 2, the positive impact of investor sentiment will immediately reduce the volatility of the stock market, and then the cumulative response will gradually increase. After the fourth month, the cumulative response will gradually become positive, and after about the ninth month, the cumulative response will remain unchanged. Overall, investor sentiment has little impact on stock market volatility. In the short run, investors' optimism will not affect the market volatility in the bear market state of the stock market and will reduce the market volatility in the bull market state. However, in the long run, regardless of the bull or bear market state, investors' optimism will aggravate the market volatility.

Impulse Response Analysis of Stock Market Returns
Shock. When stock market returns are shocked by a positive standard deviation, the dynamic change of investor sentiment and stock market volatility are shown in Figure 4.
(1) Given that stock market returns the positive impact of one standard deviation, no matter in regime 1 or regime 2 (see Figures 4(a) and 4(b)), investor  Note. c, t, and k represent the constant term, trend term, and lag order, respectively. * p < 0.01, * * p < 0.05, and * * * p < 0.1. Note. LR represents the maximum likelihood ratio. " # " represents the optimal choice under each rule. sentiment will not change immediately but gradually rise. After 15 months, the cumulative response of investor sentiment remains stable. In regime 1 (see Figure 4(a)), it is about 0.001, and in regime 2, it is about 0.0024. Obviously, in regime 2 (see Figure 4(b)), the impact of stock market returns on investor sentiment is greater than that of regime 1. In general, the positive impact of stock market returns, whether in the bull market or bear market, will not immediately affect investor sentiment, but it will still increase investor sentiment in the long run. (2) Given that stock market returns the positive impact of one standard deviation, no matter in regime 1 or regime 2, stock market volatility will immediately decline: in regime 1, the decline of stock market volatility is less than that in regime 2. In regime 1, the stock market volatility immediately decreases by 0.0002 and then continues to decline. e cumulative response reaches a negative maximum in the first month. e cumulative effect increases slightly from the first month to the second month and then decreases again, until the cumulative response remains stable at −0.0003 in the 12th month. In regime 2, the stock market volatility immediately decreases by 0.006, and then the cumulative response continues to decline until it remains stable at −0.0032 after 5 months. Overall, the increase of the stock market returns makes the stock market volatility immediately fall no matter in a bull market or bear market. In the long term, the stock market volatility will gradually tend to be stable. e impact of stock market returns on volatility is greater in the bull market than in the bear market.

Impulse Response Analysis of Stock Market Volatility
Shock. When stock market volatilities are shocked by a positive standard deviation, the dynamic change of investor sentiment and stock market returns are shown in Figure 5.    (1) Given that stock market volatility returns the positive impact of one standard deviation, for investor sentiment, the cumulative response in the two regimes is basically the same. However, the cumulative response in regime 2 (see Figure 5(b)) is greater than that in regime 1 (see Figure 5(a)). Investor sentiment will not be immediately changed by the positive impact on stock market volatility but gradually increases from 0. In regime 1, the cumulative response remains stable at 0.001 25 after the 10th month. But in regime 2, the cumulative response remains stable at 0.003 after 10 months. Overall, stock market volatility has little impact on investor sentiment. In the short run, no matter in the bear market or in the bull market, the increase of stock market volatility will not immediately change the investor sentiment, but in the long run, it will increase investor sentiment and gradually stabilize investor sentiment. (2) Given that stock market volatility returns the positive impact of one standard deviation, in the two regimes, the cumulative response of stock market returns is basically the same. e positive impact of stock market volatility cannot significantly change the cumulative response of stock market returns in the current month. In the two regimes, the cumulative response of stock market returns is gradually reduced from scratch. After 1 month, the cumulative response drops from the maximum value of negative and then gradually rises. After 2 months, the cumulative response starts to be positive, and after 7 months, the cumulative response remains stable. In regime 1, the stock market returns decreased to the 8 Computational Intelligence and Neuroscience maximum negative value 0.0375 and gradually rose and remained stable at 0.00875 after 7 months. In regime 2, the stock market returns gradually rose after dropping to the maximum negative value 0.007 and remained stable at 0.025 after 7 months. In comparison, the influence of stock market volatility on investor sentiment and stock market returns is greater in regime 2 (i.e., high stock market) than in regime 1 (i.e., low stock market). In general, no matter in the bull market or the bear market state of the stock market, the stock market volatility is affected; the stock market returns in roughly the same way: in the short term, the stock market returns will not change immediately; in the long term, the stock market returns will increase and gradually stabilize.

Conclusions
In this paper, we use MS-VAR model to study the dynamic relationship between investor sentiment, stock market returns, and stock market volatility in China's stock market from January 2004 to June 2014. e research results found the following: (1) It is reasonable to divide China's stock market into two regimes: regime 1 represents the downturn of the stock market (i.e., bear market) and regime 2 represents the upsurge of the stock market (i.e., bull market). Investor sentiment and stock market returns are negatively correlated in the bear market state and positively correlated in the bull market state. Investor sentiment and stock market volatility are positively correlated in the bear market state and negatively correlated in the bull market state. ere is a negative correlation between stock returns and volatility in both bull and bear markets. (2) Based on the cumulative impulse response, analysis of different regions shows that the impact of investor sentiment's shock on stock market fluctuation is not obvious. However, it has a relatively obvious effect on stock market returns, and the impact is different in bull market and bear market states. In the short run, in a bear market, optimism can cause stock market returns to fall immediately, but in a bull market, it can because the stock market returns to rise immediately. In the long run, no matter in the bull market or in the bear market, the stock market returns have the same response to the impact of investor sentiment. e impact of stock market returns on investor sentiment and stock market volatility is quite obvious, and the impact is basically the same in both bull and bear market state. But the impact in a bull market is greater than that in a bear market. e impact of stock market volatility has little impact on investor sentiment, but it has a significant impact on stock market returns: no matter in the bull market or in the bear market, the impact of stock market volatility will not have an immediate impact on stock market returns but have a delay, and the impact will gradually tend to be stable.
In China, generally speaking, the overall quality of investors is not high. e phenomenon of going with the tide is serious. Investors tend to be affected by some noise. And then they can influence stock market returns and volatility. Stock market returns and volatility, in turn, affect investor sentiment. e above conclusions can help investors better understand their own characteristics of investment risk and return and provide some help for relevant regulatory authorities to grasp investor sentiment and market risk in a more specific way. It is conducive to the relevant departments to make better policy decisions.