Herding behavior and stock market conditions

Purpose – The purpose of this paper is to investigate whether market conditions have an effect on investors’ propensity to herd in an emerging economy’s stock market. Additionally, given the lack of research on Islamic behavioral finance, the authors further investigate if the herding phenomenon is distinct in Islamic versus conventional stocks. Design/methodology/approach – The authors used daily data for the period of 1995–2016 according to the herding behavior model of Chang et al. (2000), which relies on cross-sectional absolute deviation of returns. Findings – Findings reveal the herding behavior of investors among Shariah-compliant during up and down market exits with non-linear relationship to the market return, while for conventional stocks herding behavior does not exist with linear nor nonlinear relationships during the up and down market. Furthermore, for the whole market, herding behavior only exists during upmarket with a nonlinear relationship to the market return. However, this relationship is not significant. Moreover, the results of this study are robust with respect to the effect of the Asian and global financial crisis. Practical implications – The findings are useful for investors to identify which market conditions are associated with rational and irrational behavior of investors. Originality/value – Most of the theoretical and empirical studies on herding behavior have focused on developed countries. Only a few studies have paid attention to the herding behavior in Islamic financial markets, particularly in the context of an emerging market such asMalaysia. This study fills this void.


Introduction
Stock markets are reflectors of the financial status of a country. As such, if the outlook of stock market is stable; then, it portrays that the economic situation of the country is good and vice versa. If an economy is growing, the growth of domestic products increases, hence, most firms would experience growth on their profits. However, if the economy is stepping into a recession period, stock markets as an indicator of health of the economy would fall. Because of this significant effect of the stock market to economic condition, investment decision in the stock market received regular scrutiny. The irrational behavior of investors implies that investors sometimes disregard their private information in their decisionmakings which changes some payoffs from investment. Series of studies have shown that behavioral elements play a significant role in determining market prices. This view is contradicting the traditional finance theories (Scharfstein and Stein, 1990;Chen et al., 2003;Demirer and Kutan, 2006). Development of behavioral finance theories leads to the herding theory; herding behavior refers to mimicking other investors' actions in the stock market. Studies have examined herding behavior to explain investment decision-making of investors. Willingness of investors to follow other investors' actions or echo other investors' actions has a significant implication for financial markets. As herding behavior theory says, the investors who tend to herd would avoid their own private information and, in the process, cause to place the prices in a position away from the intrinsic values. This could cause the markets to be volatile (Balcilar et al., 2013).
Financial markets are fluctuating over time. Bullish market refers to the position that the market offers a high rate of return. On the other hand, bearish markets are associated with low rates of return. In this regard, the behavior of investors during different market situations may not be the same and it requires further investigation. Moreover, during an up and down market, investor's herding behavior is also changing and the relationship of herding behavior and market (portfolio) return does not remain linear (Chang et al., 2000). The non-linear herding behavior of investors is the concern of this study.
Malaysia, a pioneer of Islamic banking system in the world offers both conventional and Islamic financial products. Behavioral finance for Islamic stocks is understood to be an important area of study which could play a decisive role in explaining investors' approach toward their decision-making process. This is because Islamic stocks lead to avoidance of speculation and any unnecessary risk-taking. Islamic finance is free of interest, gambling and ambiguity, and it has been argued that it can help resolve financial issues. As nonlinearly herding behavior of investors has not been captured often in existing literature of developing markets the understanding of herding behavior of investors during market movements could give an ideal view for investors and policymakers especially for emerging markets like Malaysia. Therefore, research at hand is trying to address the question on whether the herding behavior of investors is different when the market is up or down. With examining the linear and non-linear relationship of market return and herding behavior of investors during up and down markets in Malaysia, the following objectives are addressed by this study: to examine herding behavior of Shariah-compliant Malaysian stocks during up and down market; to examine herding behavior of conventional stocks of Malaysia during up and down market; and to examine herding behavior of the whole stock market of Malaysia during up and down market. Additionally, this study contributes to literature in the following ways: based on the period of study , this research traces herding behavior of investors during the up and down market. Because of lack of evidence on herding behavior of investors and market conditions for less developed countries, this study tries to fill up the gap of area. There are not many existing studies (to the authors' best PRR knowledge) on herding behavior of investors with consideration on Shariah-compliant stocks, especially for Malaysian Islamic stocks. This paper contributes to this void.

Literature review
Herding behavior is one of the behavioral phenomena connected to financial markets which is visible among investors in nearly all asset classes. It has thus been the subject of strong attention of researchers. Influence of herding behavior, particularly, had shown itself in the financial crisis of 1990s. The Study of Devenow and Welch (1996) confirms the origin of herding behavior. They found that if investors copy and follow other investors, they feel more secure. However, while the market is up or down, investors are turned to be intense toward their individual and confidential aspects and information on their decisions about investment strategies and they would lean on the shared information on market. Thus, herding will be more widespread during periods of market stress. Therefore, presence of herding behavior among investors would cause market imbalances by maneuvering the securities' prices away from their innate values. Hence, in this case the securities' prices would reflect both the rational and irrational expectations from investors (Kataria and Choudhary, 2015).
Study of Christie and Huang (1995) investigated the herding behavior of investors in the US market. To capture the herding behavior, they used the cross-sectional standard deviation of returns and their findings stated the inconsistency of herding behavior of investors during the large price movements. They have also stated the inconsistency of herding behavior for the low and high frequency data sets. Additionally, Chang et al. (2000) studied herding behavior of investors for various international markets such as the USA, Hong Kong, Japan, South Korea and Taiwan. They found for all five markets, herding behavior which was measured by the dispersion was having a high coefficient during the up market in respect to the down market. Moreover, they have also investigated herding behavior of investors across various developed and emerging markets. In this regard, they stated the existence of herding behavior among emerging markets are partially related to the disclosure of information in emerging markets. These are the market efficiency implications of herding behavior of investors toward the markets.
Herding behavior in the Chinese stock market with regards to market conditions has been investigated by the study of Demirer and Kutan (2006); they analyzed the behavior of return dispersions during periods of unusually large upward and downward changes in market index. They indicate that herd formation does not exist in Chinese markets which is in line with the rational asset pricing models and market efficiency hypothesis. Several key recent developments on herding behavior are worth mentioning. First, Omay and Iren (2019) investigate the behavior of foreign investors in Malaysia during the crisis period. The authors investigated the herding behavior by using smooth-transition autoregressive as well as generalized impulse response functions, and they concluded on the existence of herding behavior among foreign investors in Malaysia during crises period. Additionally, they also stated foreign investors react faster than domestic investors toward crises. Moreover, regime dependent and dynamic models of investigating the herding behavior are getting popular in the recent empirical works on herding behavior. In this regard, Ah Mand and Sifat (2021) examined regime dependent herding behavior of investors in Malaysia. They used a two-state Markov Switching model and found the herding behavior is heavily regime-dependent and a non-linear phenomenon in Malaysia. Furthermore, study of Kumar et al. (2020) explores the herding behavior by discrimination of herding behavior of investors with respect to different market conditions and found the existence of herding behavior among the investors of Asia-Pacific region.

Herding behavior
Islamic finance has been explored from many different viewpoints like Islamic financing products, Islamic credit cards, attitude, perceived behavioral control and moral norms on investor's intention to invest in socially responsible investments and Islamic insurance. However, to the best knowledge of the researchers, there are no existing investigations which study herding behavior of Shariah-compliant assets (Musse and Echchabi, 2015). On top of that, the herding behavior of Malaysian investors also needs urgent attention. In this regard, Lai and Lau (2004) used the cross-sectional standard deviation of returns, covering a period of ten years' monthly prices of all stocks from January 1992 to December 2000. They discovered the evidence of herding behavior among Malaysian market participants related to the low market situation. Their result contradicts findings of herd behavior as documented by Christie and Huang (1995), albeit for developed markets. On the other hand, they also revealed, Malaysian investors acted according to their own opinions during periods of market uptrend.
Herding behavior of investors in Malaysia has also been done by Chiang et al. (2013). Their study examines investor herding behavior in Pacific-Basin equity markets (including Malaysia) by following herding measurement of Chang et al. (2000) and concluded that level of herding is time-varying and is present in both rising and falling markets for Malaysia. The mentioned literature has shown the inconsistent results on herding behavior of investors for developing countries. However, whether existing results on herding behavior in conventional financial instruments likewise apply to Islamic securities remains unexplored.
One recent study on the determinants of herding behavior with concern of Malaysian stock market has been done by Ah Mand et al. (2018). The authors investigated the determinants of herd behavior in the Malaysian stock market for Shariah compliant, conventional stocks and the whole market of Malaysia and found that the trading volume of the market is determining the herding behavior for Shariah-compliant, conventional stocks and the broad market in Malaysia.

Research framework
This part includes three Samples of study which are Sample for conventional stocks, Islamic stocks and samples for the whole market. Data for this study covers from 1995-2016. This period consists of two financial crises (Asian financial crisis, June 1997-September 1998 and global financial crisis, September 2008-September 2009). Hence, this study investigates the effect of financial crisis on herding behavior of investors separately. This decision is in line with prior empirical finance papers. For each sample of study, herding behavior during upmarket and downmarket is discussed separately. Table A1 shows the dependent and independent variables (including ordinary and dummy variables) for this study. In this table R (Up and Down) refers to the return of stocks on the up and down market and D (Up and Down) refers to the dummy variables for the up and down market, respectively. Furthermore, j R Down j and j R Up j refers to the absolute value of return for down and up market and cross-sectional absolute deviation of returns (CSAD) presents cross-sectional absolute deviation of return.
3.1 Herding model of CCK (Chang et al., 2000) Following is the model was undertaken to investigate herding behavior of investors: (1), R i , t is the return on firm i at time t and R m , t is the return in the form of cross-sectional average for N firms in the market portfolio at time t, and CSSD is cross-sectional standard deviation of return. Following de Almeida et al. (2012), the current study the CSSD regarding whether the dispersion of the returns on individual securities in relation to the market return are significantly lower than the mean during periods of extreme market swings. On the other hand, cross-sectional absolute deviation of return (CSAD) is the absolute value of CSSD. The research at hand studies the relations between the market return and CSAD. CAPM can be expressed in the form of a conditional version of the Black (1972) in the following manner: where g 0 is return on zero-beta portfolio, b i is a time-invariantsystematic risk measure of the security, i = 1, . . .; N and t = 1; . . .; T. Also, let b m be systematic risk of an equally weighted market portfolio. Hence: Rearranging the above sequences, the absolute value of deviation (AVD) of security i's expected return in period t from t th period portfolio expected return can be expressed as: Hence, expected cross-sectional absolute deviation of stock returns (ECSAD) in period t can be defined as follows: Growing and direct relation between dispersion and the market expected returns can be shown as follows: Possibility that degree of herding may be asymmetric in up and down market, the following equation is used: Herding behavior where CSAD t is the average AVD t of each stock relative to return of equally weighted market portfolio, R m,t in period t, and (R UP m;t ) (R DOWN m;t ) is the absolute value of an equally weighted realized return of all available securities on day t when the market is up (down).
The implication of asset pricing models on the dispersions of securities are expected to increase consistent with the growth of market returns (de Almeida et al., 2012). In other words, the herding behavior will slow down the growth rate of dispersion or results for the reduction of dispersion for the extreme herding behavior situations.
This research uses the daily data frequency in the analysis of herding behavior. Moreover, to ease the differentiation between coefficients in equations (8) and (9) the absolute values of returns are used. In this regard, if investors do follow each other's actions during up or down market, the relationship between CSAD t and average market return would be non-linear. The non-linearity is captured by a negative and statistically significant g 2 coefficient. For detection of herding as CH proposed, the following expression will be used: D L t ¼ 1 if the market return on day t lies in the extreme lower tail of the return distribution; D L t ¼ 0 otherwise; D L t ¼ 1 if the market return on day t lies in the extreme upper tail of return distribution; and D L t ¼ 0 otherwise. where S t is an indication for the average of CSAD for a sample of study. From equation (10), the statistically significant and negative number of coefficients b 1 and b 2 indicates the presence of herding behavior for the down or up market. Negative amount for coefficient of up and down tail of return distribution shows existence of herd behavior for each sample. Following the methodology of CH, the extreme upper and lower tail of return distribution is defined as returns during time t that are within the 5% highest or lowest returns for the sample of study. Similar rule is applicable for dummy variables of financial crisis.
The hypotheses of this research are as below: Ha. Relationship between herding behavior of Shariah-compliant and market (portfolio) return is non-linear when market is up.

Hb. Relationship between herding behavior of Shariah-compliant and market (portfolio) return is non-linear when market is down.
Hc. Relationship between herding behavior of conventional stocks and market (portfolio) return is non-linear when market is up.
Hd. Relationship between herding behavior of conventional stocks and market (portfolio) return is non-linear when market is down.
He. Relationship between herding behavior of the whole market of Malaysian stocks and market (portfolio) return is non-linear when market is up.

Hf. Relationship between herding behavior of the whole market of Malaysian stocks and market (portfolio) return is non-linear when market is down.
Detecting herding behavior will be seen clearly during different market situations which generate more reliable and robust results for Malaysian stock market. Based on a period of study which covers 21 years, for this paper, a total amount of 1,414,592 daily observations from a total number of 806 publicly listed companies has been collected. However, Because of missing data, companies for which data were missing were deleted from the sample of study and a total number of 248 companies were used for analysis.

Sample sizes and descriptive statistics
Sample of conventional stocks of Malaysia consists conventional stocks of Malaysia. Where the sample of Shariah-compliant only contains the Islamic stocks in Malaysia; it should be mentioned that this sample is a bigger size (74% of the whole market sample). Last sample is the sample for the whole market that contains publicly listed companies in the stock market of Malaysia. Furthermore, classifications of companies between the samples are based on the Bursa Malaysia (BM) main listed companies and each company is placed into conventional or Shariah-compliant categories. Table A2 presents a number of stocks which have been used to investigate for the study.

Results
The findings are presented into six different categories which are, conventional stocks when the market is up and conventional stocks when the market is down, Shariah-compliant when the market is up and when the market is down. The last group is the whole market of Malaysia while the market is up and down. Following the methodology of model on herding behavior of Christie and Huang (1995), the stocks which their return distribution leans among the 5% lower tail of return distribution of sample is classified as a market down (bear market) and stocks on which their return laying among 5% upper tail of return distribution of sample is classified into upmarket conditions. Table A3 presents descriptive statistics of study for a sample of the whole market of Malaysia. The highest return is 8.532, and the lowest return in the stock market during the period of study is 7.631 with the negative sign of it. The standard deviation of the whole market shows the number of 0.655 during the period of study. Unit root test is used on samples of the whole market, Shariah-compliant and conventional stocks. As it presented by Table A4 for the sample of the whole market of Malaysia, results of augmented Dickey-Fuller (ADF) is the amount of t-statistic is À8.810 and is significant at the 1% level because it is less than 0.01. Therefore, the null hypothesis that variables in the whole market sample is not stationary is rejected. As the amount of t-statistic is significant at 1%, there is no requirement to run the first difference test. Hence, it confirms that variables in whole market samples are stationary. Similar analysis applied to the Shariah-compliant and conventional stocks and null hypothesis for each sample are rejected and data are stationary according to the unit root test. Table A5 shows the relationship between herding behavior and market return for each sample separately. Where Abs MR = absolute value of market (portfolio) return and Abs (MR)2 = second degree of the absolute value of market (portfolio) return. Note that, to avoid the autocorrelation error in the sample of study, the heteroscedasticity auto-correlation (HAC) test was implemented. As it presented by Table A5, a sample of the whole market while the market is up, indicates herding behavior exists with the second power of absolute value of market (portfolio) return because coefficient is negative (À0.151). However, this herding behavior is not statistically significant. Therefore, the conclusion is herding behavior is not significant during upmarket samples of the whole market of Malaysia. Following with the hypothesis of study, the second situation refers to the situation of the down market for a sample of the whole market. Coefficient amount for both markets (portfolio) returns are positive and statistically significant. Therefore, herding behavior does not exist among the investors during the down market. For Shariah-compliant stocks based on coefficient (À0.013) herding is appearing among investors during upmarket concerning the second power of the absolute value of market return, and it is statistically significant at 10% level. It shows that the relationship of herding behavior of investors is not linear with market return and investors of Shariah-compliant stocks are following other's actions.
On the other hand, a positive amount of coefficient of absolute value of market return (0.505) indicates no existence of herding behavior among investors with regards to the absolute value of market return even though it is statistically significant at level 1%. For the situation of upmarket for samples of Shariah-compliant stocks, a non-linear relationship between herding behavior and market return exists. For the down market of Shariah-compliant stocks, the coefficient amount for the absolute value of market (portfolio) return is À0.438 and statistically significant at level 1%. On the other hand, coefficient for the absolute value of market return is À0.005, but it is not statistically significant. It means that herding behavior exists among Shariah-compliant during down market but it has a linear relationship with market return.
Next is a sample of conventional stocks. During up market, herding behavior exists among investors concerning the second power of absolute value of market (portfolio) return Because of negative value of coefficient (À0.0064). However, this coefficient is not statistically significant; therefore, it is believed that herding behavior does not exist. On the other hand, based on the positive amount of coefficient of the absolute value of market return for the sample of conventional stock, it is accepted that herding behavior is not existing among investors. During down market herding behavior does not exist among investors of conventional stocks. Because both coefficients for absolute value of market return and a second power of the absolute value of market return are positive (0.415 and 0.003, respectively).
Finally, for the whole market of Malaysia, the nonlinear herding behavior of investors exists during down market only but this herding behavior (coefficient of À0.151) is not significant. Findings of this study are in line with the findings of CCK which states the relationship between herding behavior and security market line is not linear (Chang et al., 2000). However, analysis of non-linearity of herding behavior among Shariah-compliant stocks is a new era of the finding of this study.

Financial crisis and herding behavior
Considering that period of this study includes two financial crises (Asian financial crisis of 1997 and global financial crisis of 2008). To find robust answers on findings, this study investigates the effect of financial crisis on herding behavior of investors in Malaysia. Results are presented in Table A6. Abs MR = absolute value of market (portfolio) return and Abs (MR) 2 = second power of the absolute value of market (portfolio) return and dummy variable of crisis mentioned. Sample of whole market while market is up, model indicates that herding behavior exists with second power of absolute value of market (portfolio) return because coefficient is negative. However, this coefficient is not statistically significant. Thus, herding behavior is not significant during upmarket. Coefficient for absolute value of market (portfolio) return is 3.387 and statistically significant at level 5%. However, this coefficient does not indicate appearance of herding behavior among investors PRR of the whole market sample during upmarket. Findings of tests on the non-linearity relations of herding behavior with market return by taking into consideration the financial crisis for sample of the whole Malaysia also confirms previous findings of this study.
For Shariah-compliant subsamples, based on value of coefficient (À0.013) which is significant at 10% level, herding is appearing among investors during upmarket when considering the second power of absolute value of market return. It shows that the relationship of herding behavior of investors is not linear with market return and investors of Shariahcompliant stocks are following other's actions during the high price movements. As presented by Table A6 during the upmarket for a sample of conventional stocks, herding behavior exists among investors concerning the second power of absolute value of market (portfolio) return. However, this existence is not statistically significant; therefore, it is believed that herding behavior does not exist. On the other hand, based on the positive amount of coefficient of the absolute value of market return for a sample of conventional stock, it is accepted that herding behavior is not existing among investors with respect to the absolute value of market return during upmarket among investors of conventional stocks.
Finally, the consideration of financial crises for conventional stocks while the market is down that shows herding behavior does not exist among investors of conventional stocks. Because both coefficients for absolute value of market return and a second power of absolute value of market return are positive. Thus, for samples of conventional stocks also by taking into the consideration of financial crisis effect, results of analysis on non-linear relationship of herding behavior of investors and market return confirmed.
Herding behavior findings are vitally important to the market participants such as institutional investors, individual investors because it sheds light on the behavior of market participants and indicates how the investors behave when making decisions on buying or selling financial securities. Results of the herding behavior indicates the level of market efficiency; therefore, policymakers could trace the market efficiency through herding behavior (markets are less efficient if herding exists). Policymakers, therefore, should be able to adopt suitable policies to lead the market toward more efficient points by monitoring and enhancing the quality of information transmission. Investors, on the other hand, could also benefit from the results on their choice of optimal portfolio to enhance the return of their investment.

Conclusion
Current study investigates the relationship of herding behavior of investors with market return during up and down market among Malaysian investors for the period of 1995-2016 by using daily data. Findings of this study reveals herding behavior of investors among Shariah-compliant exists when the market is up and has a non-linear relationship with market return. While for the conventional stocks herding behavior exists with linear relationship during down market only. Additionally, considering the whole market sample, non-linear herding behavior only exists during down market; for up market, herding behavior has a linear relationship with market return. These findings are robust with consideration of financial crises for all samples and market situations.  Note: HAC standard errors and covariance (Bartlett kernel, Newey-West fixed bandwidth = 10.000); * and **represent significant at 1% and 5% levels, respectively Notes: HAC standard errors and covariance (Bartlett kernel, Newey-West fixed bandwidth = 10.000); *,** and ***represent significant at 1, 5 and 10% levels, respectively