{'fraction_non_alphanumeric': 0.025142820256269568, 'fraction_numerical': 0.01813897944033825, 'mean_word_length': 5.023328149300156, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Testing the Profitability of Technical Trading Rules across Market Cycles: Evidence from India

This study examines the economic feasibility of technical analysis, such as relative strength index, moving average convergence and divergence in Indian context. Bombay Stock Exchange Sensex Index historical data were collected from BSE data base for the period from February, 2000 to May, 2018. The selected data were further categorised into Bull and Bear markets to test the technical tools performance across market cycle. The results exhibited that relative strength index trading rule failed to deliver the positive return even before deducting transaction cost. However, moving average convergence and divergence trading rules’ sell signal outperformed the unconditional mean return and buy signal mean return, during the Bear market period before deducting transaction cost. However, in accordance with the Sharpe ratio, returns generated were not at the level of risk associated in technical trading rules. The findings question the possibility for traders to consistently earn abnormal return with technical analysis.


Introduction
In investment arena, technical analysis is a separate discipline which attempt to consistently earn abnormal returns by exploiting past price patterns and trading volume of financial assets. Hence, technical analysts play a vital role in day-to-day stock price movement and provide a higher degree of liquidity for equity investors. The notable pioneers who contributed significantly to the modern technical analysis are the Japanese rice trader, Homma Munehisa (candlestick charting), Charles Dow (the founder of Wall Street Journal and Dow Theory) and Elliot (the developer of the Elliot wave principle), (Metghalchi et al., 2016). In the world of technical analysis, it is strongly believed that a stock price follows a trend and market participants react in a similar way to the same event in the future. This assumption is valid in the application of technical analysis to predict the future price based on historical price and volume data.
In contrast, Efficient Market Hypothesis (EMH) strongly argues that historical price patterns and volume information are already incorporated in the current security price. The stock price movement depends on new piece of information appearing in the market which is purely random. Therefore, the future price of the security follows a random walk and it is almost impossible to be predicted at least in weak-form efficient markets. Hence, in finance, the acceptance of EMH and technical trading rules is mutually exclusive (Fama, 1970).
The preponderance of literature on technical trading tools and EMH in different markets under different circumstance were contradictory to each other For example, studies like Chiang et al. (2012), Chong and Ng (2008), Krausz et al. (2009), Metghalchi et al. (2019) and Wong et al. (2003) supported the technical analysis whereas the results of Atanasova and Hudson (2010), Balsara et al. (2009) and Chang et al. (2004) supported the efficient market hypothesis. Hence, even after many decades of research, academicians and investors/traders are still in confusion whether to hire or fire technical analysis. Specifically, in a country like India, information is not a commodity for perfect competition due to lack of infrastructure, inefficient capital market regulators and domination of markets by few investors i.e., only less than 3% of the total population investing in the Indian equity market. On the other hand, significant information asymmetries may damage the overall development and inclusive growth of capital markets. Hence, intervention of a capital market supervisory body into this information asymmetry is highly solicited in the absence of EMH. Therefore, research on profitability of technical analysis with most recent data catch the attention of academicians, investors and market regulators to a larger extent.
In this background, the main objective of this study is to examine the profitability of Relative Strength Index (RSI) and Moving Average Convergence and Divergence (MACD) technical trading tools in the Indian stock market. In addition, this research also aims to test the risk adjusted performance of selected technical trading tools across market cycle.
The remainder of this research article is organised as follows. The next section briefly highlights the outcome of earlier literature on technical analysis. Following that, methodology used in this study is elaborated in data and methodology section. This is followed by results of data analysis explained in the result and discussion section, and conclusions are presented in the last section of the paper.

Review of Literature
The existing research on profitability of trading rules and EMH exhibits mixed results. For instance, Brock et al. (1992) examined the profitability of moving average for Dow Jones Index and favour technical trading rules whereas Hudson et al. (1996) applied moving average trading rules for United Kingdom (UK) data and concluded that after deducting trading cost, investors are not able to earn more excess return than excess returns associated with buy-and-hold strategy. Gencay (1998) support the technical trading rules to predict the future stock price but have a doubt on profitability of technical trading rules after deducting the trading cost. Ming-Ming et al. (2002) applied moving average trading rules to predict the Kuala Lumpur Stock Exchange Composite Index for the period of January 1997 to December 1999 and found technical trading rules being able to generate abnormal return even after deducting trading cost. Jensen andBenington (1970), Neftçi (1991), and Allen and Karjalainen (1999) registered the evidence against technical trading rules in making consistent abnormal return and accept the efficient market hypothesis in the US market. Balsara et al. (2007) applied the moving average crossover rule, the channel breakout rule and Bollinger band trading rule to class A and class B shares traded in Shanghai and Shenzhen stock exchanges and ended with profit even after deducting the trading cost of 0.5% . This is in stark contrast to weak-form efficiency of the market. Almujamed et al. (2013) concluded that the profitability of trading rules mainly comes from the slow adjustment to private information when there is information asymmetry. Zhu et al. (2015) found that Trading Rang Break rules outperform Moving Average (MA) rules and short-term Variable Moving Average (VMA) rules outperform long-term VMA rules. However, after deducting the trading cost, profits from technical trading rules disappeared in the Chinese market and this suggests that simple trading rules like Moving Average (MA) and Trading Range Breakout (TRB) cannot beat the standard buy-and-hold strategy for the Chinese stock exchange indexes. Metghalchi et al. (2016) examined the profitability of Moving Average (MA), RSI and MACD technical trading rules for NASDAQ Composite index from 1972 to 2015 and concluded that trading rules have strong predictive power. However, the predictability of trading rules reduced in the recent past sub-sample period from 2005 to 2015 and generated negative return after deducting transaction cost. Metghalchi et al. (2019) examined the profitability of Technical Analysis (TA) for the Morgan Stanly Capital International (MSCI) Emerging Market Index (EMI) over the period of November 1988 to January 2018. They found strong empirical evidence for TA even after considering risk and transaction cost using technical tools like Moving Average, RSI, MACD and Rate of Change. Chong and Ng (2008) examine the strength of MACD and RSI using 60 years data of the London Stock Exchange FT30 Index and concluded that trading rules generate higher return than simple buy-and-hold strategy. Atanasova and Hudson (2010) identified the interaction between technical trading rules and calendar anomalies for Dow Jones Index from 1897 to 2009 and concluded that the predictability of trading rule reduced to a greater extent after removing the calendar anomalies. Krausz et al. (2009) concluded that nullifying the profits from technical trading rules is merely impossible as long as stock information is asymmetric. Balsara et al. (2009) found that the moving average crossover rule, the channel breakout rule and the Bollinger band breakout rule underperform the buy-and-hold strategy between 1990 and 2007. However, they observe significant positive returns on trades generated by the contrarian version of these three technical trading rules, even after considering a 0.5% transaction costs on all trades. Wong et al. (2003) studied the profitability of MACD and RSI technical indicators in Singapore stock market and found that technical indicators offered significant positive returns. Marshall, Young and Cahan (2008) concluded that candlestick technical trading strategies for Japanese stock market failed to add value in both Bull or Bear markets. Wang and Chan (2007) empirical results indicate that the technical trading rules correctly predict the direction of changes in the NASDAQ and Taiwan Weighted Index (TWI). Nor and Wickremasinghe (2014) investigated the profitability of MACD and RSI and concluded that Australian investors can make consistent abnormal return with technical trading rules. Chiang et al. (2012) found that the technical analysis helped to earn profits even after deducting transaction costs in Taiwan. Cohen and Cabiri (2015) employed DJI, FTSE, NK225 and TA100 index data for the period from 2007 to 2012 and found RSI and MACD outperformed the indices in Bear market and delivered negative return during Bull market. Anghel (2015) tested the profitability of Moving Average Convergence and Divergence (MACD) with 1336 stocks of 75 countries with temporal data from 1 st of January 2001 to 31 st of December 2012. The study found that certain companies delivered risk adjusted abnormal return even after deducting trading cost and rejected the random walk hypothesis for many countries. Tian et al. (2002) found that technical trading rules have less power in the US stock market to earn profit whereas the Chinese market gives profit even after deducting trading cost. Chang et al. (2004) examined the power of simple Moving average trading rules in 11 emerging and developed markets (US and Japan) and suggested that emerging equity indices exhibit the scope to earn abnormal return with technical trading rules whereas developed countries' stock indices (US and Japan) do not reject the EMH. Sobreiro et al. (2016) studied the profitability of MACD, RSI and algorithm trading rules in Brazil, Russia, India, China and South Africa (BRICS) and emerging markets and concluded that moving averages outperformed the buy-and-hold strategy in most of the emerging markets except Brazil, Russia and Argentina. Yu et al. (2013) examined the profitability of technical trading rules in seven Asian markets including Indonesia, Malaysia, Singapore, The Philippines, Thailand, Hong Kong and Japan. Fixed and variable moving average and trading range breakout rules were employed and concluded that technical trading tools were more powerful in emerging markets than in developed markets. However, profits from technical analysis disappeared after transaction costs. Similarly, Heng and Niblock (2014) examined the predictive power of technical analysis for stock index futures of Indonesia, Malaysia, Thailand and The Philippines. They employed EMA and MACD and found emerging markets were slowly reaching its informational efficiency after considering the transaction cost. In contrast, Ming-Ming and Siok-Hwa (2006) found that Fixed Moving Averages (FMAs) in China, Thailand, Taiwan, Malaysian, Singaporean, Hong Kong, Korean, and Indonesian stock markets were profitable.
From a contextual perspective, research on profitability of technical trading analyses is limited in the Indian context. Sehgal and Gupta (2007) evaluated the economic feasibility of technical analysis using individual stock data and found the technical trading strategy failed to outperform the passive strategy irrespective of market cycle conditions. They used the daily closing price and volume information of 65 companies constituted in BSE 100 index for the period from January 1999 to December 2004. They concluded that past price and volume information of large size companies were immediately incorporated in current price as these stocks were tracked by several investors and fund managers. Gunasekarage and Power (2001) applied variable length moving average and fixed length moving average in South Asian stock markets and generated excess returns in Colombo Stock Exchange (CSE), Dhaka Stock Exchange (DSE), and Karachi Stock Exchange (KSE) whereas Bombay Stock Exchange (BSE) supported the EMH. Sehgal and Garhyan (2002) examined the On Balance Volume (OBV) technical analysis with transaction cost using daily data of 21 companies listed in BSE for the period from April 1996 to March 1998. The result supports the technical analysis and rejects the EMH. Mitra (2011) analysed the profitability of moving average in Indian stock index for the period from 1998 to 2008. He predicted the direction of index movement using moving average but failed to deliver positive return after transaction costs. Kulkarni and Mode (2014) and Khatua (2016) examined the MACD's prediction ability of individual stocks and supported the technical analysis. However, these studies considered limited data with a small number of companies and ignored the risk adjusted return in Indian context.
Significant earlier studies support the EMH and reject the technical analysis in developed markets at least in weak form (Allen & Karjalainen, 1999;Chang et al., 2004;Hudson et al., 1996;Gencay, 1998;Neftci, 1991;Tian et al., 2002). On the contrary, studies in emerging markets concluded that technical analysts in emerging markets were able to make profit than their counterparts in developed markets (Balsara et al., 2007;Chang et al., 2004;Chiang et al. 2012;Ming-Ming et al., 2002;Metghalchi et al., 2019;Ni et al., 2020). This may be due to the inherent characteristics of emerging markets such as weak competition, inefficient legal systems, absence of strong supervising institutions, less market participants and lack of infrastructure for information dissemination. On the other hand, the most recent studies question the profitability of technical trading rules in emerging markets after considering transaction costs (Heng & Niblock, 2014;Sehga & Gupta, 2007;Tharavanji et al., 2015;Yu et al., 2013;Zhu et al., 2015). Nazario et al. (2017) consolidated the outcome of 85 research papers in a scientific way and concluded that a considerable number of research papers favour weak form of market efficiency without considering the risk adjusted return. However,  survey of market participants indicates that stock traders and investors place more emphasis on technical analysis than fundamental factors. This existing discrepancy in literature demands research on emerging markets' information efficiency in the recent past. Further, the ability of technical trading rules to predict stock returns is inadequately researched in emerging markets. Hence, this study attempts to analyse the profitability of technical trading rules in economically dynamic and rapidly growing emerging markets such as India. Further, the total study period was classified as Bull and Bear market and employed risk adjusted performance measures like Sharpe ratio, ratio of average profit to average loss and percentage of profitable trade to have a microscopic view on the performance of technical analysis in the Indian context.

Data and Methodology
This empirical study covers the period from February 2000 to May 2018 and the total study period is categorised into Bull and Bear market as per Lokeshwarri (2017), which is shown in Table 1 and supported by Figure1. Source: Lokeshwarri (2017) The daily opening, closing, high and low values for BSE Sensex were extracted from BSE data base. The widely used trading rules such as Relative Strength Index (RSI) and Moving Average Convergence and Divergence (MACD) are employed to generate Buy, Hold and Sell signals which are explained below.

Relative Strength Index (RSI)
RSI is a technical indicator which used to identify the overbought and oversold condition of financial securities. First, relative strength is calculated by dividing the simple average of closing values on up days by the average of closing values on down days over a given period of time, which is 14 days in this study. The step-bystep trading decision based on RSI is demonstrated as follows.
Steps in generating Buy, Hold and Sell Signals: = 100 − ( 100 1 + ) 6. Trading Decision 1 : The trading rules were applied as per Welles (1978), Henderson (2002) and Rosillo et al. (2013). Unlike previous studies, in order to imitate the real time stock trading scenario, opening and closing values were considered for executing the trading signals and calculation of return.

Moving Average Convergence and Divergence (MACD)
MACD is constructed based on historical exponential moving average of closing value of index to identify the trend changes in its value. It is computed based on the difference between longer exponential moving averages (26 days) from a shorter exponential moving average (12 days). In addition, nine days simple moving average of MACD is used as a sign to generate buy and sell signals.
Stepby-step trading decision is presented as follows.
Steps in generating Buy, Hold and Sell Signals Further, the following hypotheses were framed to test whether returns of buy or sell signals are different from the unconditional mean return and also whether the mean buy signal return is different from mean sell signal return. The null and alternative hypotheses of the study are stated in Table 2.

Buy -Sell Return
Ho After the formulation of hypotheses, t-statistics were used to test the null hypothesis of equality between unconditional mean return ( ) and mean return of trading rules ( ) which is specified in Equation 1. where, and are the mean returns of buy signal and sell signals, and are the estimated sample standard deviations of buy and sell signals respectively. and are the number of buy and sell signals respectively.

Sharpe Ratio
Reward to total risk is calculated using Sharpe Ratio, which measures the expected return to per unit of total risk taken. In the perspective of trading, the standard Sharpe ratio is modified by excluding the risk free rate by assuming that the trader needs to maintain the liquidity and not investing in risk free rate. Hence, Sharpe ratio is calculated as per Equation 3.
where, ̅ and are respectively the expected return and the total risk of a trading rule in a given period. Higher the ratio, superior the performance indicated by it.

Ratio of Average Profit to Average Loss (AP/AL)
This ratio is calculated by dividing the average profit from profitable trade by average loss from the unprofitable trade. The ratio of more than one indicates on average the trading system correctly predicts the price movement than misleading the traders. Hence, a higher ratio indicates the superior ability of the technical trading rules to predict the future price movement. The absolute value of this ratio is calculated as per Equation 4.

Percentage of Profitable Trade (% of PT)
This ratio indicates the proportion of profitable trade to total trade signal. High percentage indicates that the trading system identifies price change more accurately. This ratio considers the number of profitable trade to total trading signals and ignores the value of profit (loss) earned (incurred). This performance metric is calculated as per Equation 5.

Results and Discussion
The summary statistics for the unconditional intraday return for the entire sample period and the nine non-overlapping sub-periods are presented in Table 3. The intraday mean returns for the entire sample period and for the sub-periods are negative except for the period Bull-2. Bear-2 period exhibits the highest standard deviation of 0.01009. Both, highest (0.030) and lowest (-0.047) daily return for the entire study period recorded in Bull-1 period. The high value of Kurtosis indicates that the intraday return of BSE Sensex is not normally distributed and there are outliers. However, when the market is moving in the Sideway the intraday returns become more or less normally distributed as evidenced from the low Kurtosis. The evidence of excessive Kurtosis in Bull period indicates that the unconditional intraday returns were leptokurtic, with thicker tails than the Bear and Sideway markets. Hence, the variance during Bull periods results from the outliers. The negative skewness indicates that the unconditional daily returns were moderately negatively skewed except for Sideway-1. The result of RSI trading rule for BSE Sensex is presented in Table 4. The first two columns exhibit the number of buy ( ) and sell ( ) signals generated using RSI trading rules for the overall period and non-overlapping sub-sample periods. Third and fourth column show the average buy ( ) and sell ( ) returns along with t-test in parenthesis. The basic assumption of t-test is that the observations are normally distributed. However, Table 1 reveals that the returns were not normally distributed which may question the validity of t-test results and its interpretations. In order to overcome this phenomenon, Brock et al. (1992) suggested the bootstrap method developed by Efron (1979). Hence, this paper employs the bootstrap method adopted by McKenzie (2007) which mimics the procedure followed by Brock et al (1992). Bootstrap process was repeated for 500 times and the resultant t values and corresponding p values are reported in parentheses and square brackets, respectively. However, the acceptance and rejection of hypothesis were similar both in bootstrap p values and t-test. In addition, standard deviation of buy and sell signals and the mean difference between buy and sell signals are also presented in the column five, six and seven respectively. RSI generates more sell signals than buy signals during the Bull market. On the contrary, during the Bear and Sideway market RSI produced higher number of buy signals than sell signals. Since RSI has the upper band of 100, if the stock price goes up continuously, RSI remains in the overbought regime and produce more number of sell signals than buy signals. In this case, a trader shorting the opportunity based on RSI sell signals may not make profit as the price will move to the different/other orbit. On the other hand, if the stock price goes down continuously, the RSI generates more number of buy signals than the sell signals as opposed to the current price movement. Hence, the application of RSI during the long Bull and Bear markets may not help the trader to make profit even before adjusting the transaction cost. From the result of t-test and bootstrap p values, it can be concluded that buy and sell signals does not reject the null hypothesis that the mean return of buy or sell signals is not significantly different from the unconditional mean return. Moreover, averages of buy signal returns and sell signal returns are not significantly different from each other. These results provide evidence of the existence of weak form efficiency across the market cycle. Hence, it can be concluded that traders cannot outperform the market using the RSI signals during the upward or downward movement of the market. Note: SR denotes the Sharpe Ratio; AP/AL denotes the ratio of average profit to average loss; % of PT denotes the percentage of profitable trade to total trading signal. Table 5 exhibits the results of Sharpe Ratio (SR), average profit to average loss ratio (AP/AL) and percentage of profitable trade to total trading signals. For the overall study period and almost all sub-samples periods, buy signal underperforms the sell signal as per the modified Sharpe ratio. The absolute value of average profit to average loss more than one indicates that the average of profitable trade is more than the average of unprofitable trade. However, percentage of profitable trade less than 50% indicates that RSI generate a higher number of unprofitable trades than profitable trade. Hence, average return on buy signal is negative for the overall study period and for six out of nine sub-sample periods. On the other hand, RSI sell signal generated the positive Sharpe ratio for overall period and five out of nine subsample periods. Profitable trade to total trade signal indicates sell signal produced more profitable trade in all sub-sample period except Bull-1 and Sidway-1 market. Though percentage of profitable trade to total trade for overall period is less than 50% (i.e. 48.88%), which indicate that the number of unprofitable trades is higher than the profitable trades, the profit per profitable trade is sufficiently enough to compensate the loss in unprofitable trade. The sell signal trading strategy makes money not only from correctly predicting the market movement but also minimising the loss quickly and allows the profit to run.
The Table 6 exhibits the statistical results for the MACD trading rules. During the study period MACD generated 1522 sell signals and 858 buy signals with the average return of 0.00861 and -0.00128 respectively. The standard deviations of buy signal returns (0.0179) and sell signal returns (0.01068) are also presented along with mean return difference between buy and sell signals (-0.0021). Buy signal produced the average negative return for all the sub-sample periods and they were also not significantly different from the average unconditional mean return. Hence, the null hypothesis was accepted and it can be concluded that buy signal produced a return similar to that of unconditional intraday return. However, the sell signal generated positive average return for the overall period and all sub-sample periods except Bull-2 period. In contrast, the sell signal returns were significantly different for the overall period and five out of nine sub-sample periods. The risk measured by standard deviation is higher in buy signal than sell signal trading rules, for the entire study period and for all the sub-sample periods. This clearly indicates that the trading on buy signal is riskier than the sell signal. Moreover, the sell signal average returns were significantly different from the average buy signal returns in all the Bear market periods and for the overall study period. This result supports the sell signal over buy signal specifically during the Bear market phases. This result sharply contradicts to Tharavanij et al. (2015) who found buy signals outperform the sell signals in Southeast Asian markets.
Sharpe ratio, average profit to average loss ratio and percentage of profitable trade to total trade signal for MACD trading rule are presented in Table 7. For the buy signals, percentage of profitable trade to total trade has more than 50 % in four out of nine sub-sample periods but average profit to average loss is less than one, which implies that the profit from correctly predicting market direction is not sufficient enough to cut down the loss from the failure to predict market direction. Hence, Sharpe ratios for all sub-sample periods and the entire study period were negative. However, the sell signals correctly predict the market with highest percentage of profitable trade to total trade of 80 % in Bear-3 period. Moreover, with less ability to predict market direction in Sideway-1 (47.89%) and Bull-1 (49.05%) periods, sell signal generated profit to cut down the loss from unprofitable trade which results in average profit to average loss ratio of more than one for Sideway-1 (1.22) and Bull-1 (1.09) period. Overall, the result supports the sell signals over buy signals before considering the transaction costs in the Indian context.

Conclusion
This paper examines the profitability of RSI and MACD technical trading rules in the Indian market across market cycles. BSE Sensex data for the period from February 2000 to May 2018 were collected from BSE data base and classified into nine non-overlapping periods as Bull and Bear markets based on the index movement. The t-tests were applied to test the hypothesis that returns from technical trading rules were not significantly different from the unconditional daily returns. In addition, Sharpe ratio, average profit to average loss ratio and percentage of profitable trade to total trade signal were also employed to have a microscopic view on technical trading rules.
Results support the weak-form efficient theory as RSI failed to deliver the positive returns even before deducting the transaction costs. RSI buy and sell signal returns were not significantly different from the unconditional intraday return. In terms of market timing, RSI wrongly predict the market movement and delivered the percentage of profitable trade to total trade less than 50%. Moreover, profitable trades were insufficient to overcome the loss from unprofitable trade. Hence, buy signal generated a negative average return and sell signal posted a low positive average return before deducting transaction costs. Therefore, after deducting transaction costs RSI may not leave any profit in the hands of traders.
MACD sell signal produced significant positive returns compared to buy signal and unconditional intraday return. However, as per Sharpe ratio, MACD sell signal failed to produce the return in line with risk taken. Sharpe ratio of less than one indicates that risk associated with the technical trading rule is more than the return generated by RSI and MACD. In addition, even profitable MACD sell signal does not help in market timing. It makes money from higher average profit from profitable trade than average loss from unprofitable trade. However, MACD does not help to reduce the unprofitable trade. Hence, the study concludes that the trader cannot earn abnormal return consistently with the help of RSI and MACD across market cycle in the Indian context. RSI and MACD are very old and yet still widely used as technical tools in real time stock price prediction. On the other hand, latest development in information technology and changes in legal systems may have helped the market to absorb RSI and MACD signals in current price with no time and cost. However, in order to empirically validate this assumption, a future study may be extended using a proxy for information technology development and its impact on trading rules across industries and individual stocks in emerging markets.

Declaration of Conflict of Interest
The author declared no potential conflict of interest with respect to the research, authorship, and publication of this article.