The Performance of Exponential Moving Average, Moving Average Convergence-Divergence, Relative Strength Index and Momentum Trading Rules in the Pakistan Stock Market

Objective: To examine the performance of exponential moving average, moving average convergence and divergence, relative strength index and momentum rules in Pakistan stock market. Methods/Statistical Analysis: Exponential moving average, moving average convergence and divergence, relative strength index and momentum rules are applied on the daily closing prices of the KSE -100 index of Pakistan stock market covering the period 1st January 1997 to 31st December 2013. The predictability and profitability of these rules in Pakistan stock market was assessed by using simple t-test and “double or out strategy” respectively. Findings: Whole sample period results obtained by the application of EMA, MACD, RSI and MOM rules provided empirical evidence about EMA and MOM that all the variants of these rules possessed substantial prognostic capability and were able to make earnings superior to position trading. Nonetheless in the presence of transaction costs, only (1, 50, 1) and (1, 50, 0) variants of EMA, (12, 26, 9) and (8, 17, 9) variants of MACD and both variants of MOM were found to be profitable in Pakistan stock market. The division of the whole sample data on the basis of financial crisis and non-crisis eras disclosed that the applied trading rules provided more revenues during crisis than in non-crisis periods. This study is a remarkable contribution to the current literature on Pakistan stock market as previously very little research work has been carried out on this stock market. Application/Improvements: The findings of this study are novel and are hoped to be helpful for investors in Pakistan to earn maximum revenues with minimum risk of losing their hard earned money.


Introduction
Technical trading rules are employed by researchers to forecast upcoming price movements based on past price data in various financial markets. The most commonly applied technical trading rules by investigators include Variable Length Moving Average (VMA), Fixed Length Moving Average (FMA), and Trading Range Breakout (TRB), some variants of these rules are reported by many researchers to have considerable predictive power to detect future movement of stock prices, and earn profits superior to simple buy-and-hold plan 1-10 .
Since, technical analysis does not involve fundamental data, it strongly opposes any form of the Efficient Market Hypothesis (EMH), which states that the future direction of stock price movements cannot be predicted on the basis of past prices information when the stock market is at least weak form efficient. In economics literature the term 'efficient market' is applied to a market that adjusts quickly according to novel information. Consequently, a

Literature Survey
Review of the literature published on the predictability and profitability of Exponential Moving Average (EMA), Moving Average Convergence-Divergence (MACD), Relative Strength Index (RSI) and Momentum (MOM) in various financial markets of the developed and developing countries revealed mixed results. For example, the relative strength trading rules applied by Levy (1967) on 200 US listed securities during 1960 to 1965, showed that these rules as against the buy-and-hold plan yielded superior profits 13 . Contrary to this, Jensen and Benington in 1970 14 examined the success of two of Levy's relative strength trading rules on same 200 US listed securities for the period 1960-1965. These researchers found that after transaction costs, the tested rules failed to earn profits more than that of the buy-and-hold plan.
In 15 examined the performance of the Moving Average and Relative Strength Index by utilizing the daily closing prices data of the Singapore stock market for the period January 1974 to December 1994. The authors concluded that both MA & RSI rules were able to earn superior profits for the Singapore stock market.
The MACD And RSI rules were applied on Exchange FT30 Index for the period 1935-1994, to test if these rules are profitable in this market 16 . The authors found that both rules were able to earn profits in excess of simple buy-and-hold strategy. These investigators however, had not included the transaction costs in their study.
The provided evidence that application of momentum-based strategies in emerging currency markets is able to earn excess returns 17 .
In 18 investigated Brazil, Russia, India and China stock markets by applying SMA, RSI MACD, MOM trading rules, using daily closing index return of these markets for the period 1995-2008. These investigators concluded that all the applied rules were most profitable in Russian stock market only. The SMA and EMA technical trading rules were employed on 20 largest companies of Tehran stock market data for the period from March 21, 2001 to June 21,2010, to observe the profitability of these rules in this market 19 . The researchers found that both SMA and EMA rules were profitable even after adjustment for transaction costs. In 20 investigated the performance of RSI, MACD, MOM and stochastic rules in Spanish market during the period 1986 to 2009. These researchers concluded that higher profitability of a particular technical trading rule depends on the type of the stock exchange company.
In 21 examined the profitability of MACD and RSI trading rules on closing prices of the indices in the stock exchanges of five OECD (Organisation for Economic Cooperation and Development) countries during the period January 1976 to December 2002. The authors found that RSI variant (21,50) and MACD variant (12,26,0) were more profitable in Italian and Canadian stock markets, while RSI variant (14, 30/70) in the Dow Jones Industrial Index.
In 22 assessed the profitability of MACD and RSI trading rules in the Australian stock market during the period 1996 to 2014. The researchers concluded that although MACD performed poorly in Australian stock market, RSI showed some profit potentials. In 23 evaluated the performance of momentum based technical trading rules on Dow Jones Industrial average for the period 1928-2012. The researcher noted slow growth of profits during the period mid 1960s to mid 1980s, and thereafter profitability became depended on the ability of investors to short-sell stocks. In 24 evaluated the profitability of

Exponential Moving Average
In EMA, the latest data is given more weight and the weights of former data are consequently decreased 25 . The shorter the length of EMA's period, the more weight is assigned to the most recent price.
EMA is calculated by using the formula: Where, ∝ = the weight of rececent data.
The value of ∝ is ( ) The greater the value of , ∝ more weight is assigned to recent data. In EMA buy signal is indicated if short period EMA is greater than the long period EMA, while sell signal is detected when short period EMA is less than the long period EMA.

Moving Average Convergence Divergence
MACD developed by 26 , is one of the simplest trading rules used to identify change in the trend. It is calculated by deducting longer EMA from a shorter EMA. Mostly 12 and 26 days are respectively used to measure shorter and longer EMAs to calculate MACD.
The formula used to calculate MACD is: Where k=12 days EMA and d=26 days EMA. In order to identify buy and sell signals, signal lines of zero day and nine day EMA of MACD are respectively plotted on top of the MACD. A buy/sell signal is generated when the MACD cuts the respective signal line from beneath/ above. Following a trading signal MACD is computed at the next day index value using fixed holding period of 10 days as adopted by many 16,21,22,27 .

Relative Strength Index
RSI is a momentum oscillator developed by Wilder in 1978 28 . It demonstrates the strength or speed of the asset price movements by comparing the individual uphill or downhill movements of the succeeding closing prices.
RSI is calculated as follows: The RSI ranges in between 0 and 100, where 100 represent pure upward price movements and 0 pure downward price movements. RSI 50 (centerline) is a signal of no trend since it indicates that the stock is fairly priced. The market is supposed to be at top (oversold) when RSI is above 70 and bottom (overbought) when it is below 30. The range in between 30 and 70 is often considered as the cut-off point of weak and strong markets respectively. The RSI trading rule at time t is calculated as under: According to this rule a buy signal is produced if the RSI crosses 30 from beneath and a sell signal when it crosses 70 from above. After the generation of trading signal, RSI is computed from the next day index value using fixed holding period of 10 days as adopted by others 16,21,22 . In RSI trading signals are more stable and less frequent for longer time period than for shorter time period. Volatile markets as against the less volatile markets have shorter RSI.
Usually 14 days RSI is considered as the most popular length by traders, therefore, in this study 7, 14 & 21days RSI trading rule with 30/70 and 50/50 is applied to gauge the asset price movement's trend in the Pakistan stock market.

Momentum
MOM indicator represents the speed or velocity of increase or decrease in stock prices. Market momentum, specifically, the N-day momentum of a selected number of preceding days 10 and 40 as a reference taken by 18 is determined by subtracting the closing price from the current closing price at time t and plotting the obtained positive or negative values around a zero line. A buy signal is generated if the MOM crosses the zero line from below, while a sell signal when it crosses the zero line from above.
This indicator is said to be unique trend following tool that indicates both current trend and a changing trend. For example if stock prices are on rise and the momentum indicator is overhead the zero line then it is deduced that the current trend is strengthening. In case when stock prices are going upwards but the momentum indicator dropping beneath the zero line, then it is interpreted as a signal of change in trend. The reverse is true for a declining market.
The formula used to calculate momentum is:

Buy-and-Hold Strategy
In buy-and-hold strategy investors buy stocks in the beginning of test period and sell them in the end of the period. For calculation of daily and ten day non-overlapping returns 9 is followed. The unconditional buy-and-hold returns of each index for whole sample period are calculated by using following formula: Where, R t = Unconditional mean return at day t t p = day t closing price p t-1 = day t-1 closing price Unconditional 10 days returns are calculated by using the following formula: The conditional mean buy and mean sell returns are computed as under: Where, µ (b) = mean buy days returns µ (s = mean sell days returns N (b) = total number of buy days (s) = total number of sell days R b = daily returns of buy days Rs = daily returns of sell days The conditional annual return for Pakistan stock market is computed with a fixed trading period of 240 days per year as following: The predictability of technical trading rules applied in this study is assessed by using the simple t-test as proposed by 27 technical trading rules are considered to have predictive ability when buy signals generate positive returns and sell signals generate negative returns, and these on average yield returns significantly different from the returns earned by a simple buy-and-hold strategy.
The formula used to calculate the mean buy (sell) returns is given as under: The t-statistic for the buy-sell difference is calculated by using the following formula: If t-statistics value of returns yielded by a trading rule is significantly higher than the returns earned through simple buy-and-hold strategy than that rule is considered to have significant predictive power to forecast future movement of stock prices.

Profitability of Technical Trading Rules
For assessing the profitability of technical trading rules applied in this study, a "double or out" strategy used by 27,1,29 is revised. Under this strategy, a trader reacts to the buy signals by borrowing money at a risk-free rate to double his/her investments and to the sell signals by liquidating any equity holdings and investing in risk-free assets. The investor is assumed to take long position when neither buy nor sell signal is generated. The idea underlying this method is that with buy signals, investors make profits by doubling their investment and continuing in the upward trending market, while with sell signals investors earn profits in the form of cost savings by selling out their investments and leaving the downward trending market.
Two assumptions are made regarding determining the profitability of technical trading rules by a "double or out" strategy. Firstly, it is assumed that borrowing and lending rates in the market are same. Secondly, the risk in buying or selling the assets during buys and sell periods are same.
The excess return ( π ) produced by technical trading rules, without considering the transaction costs, are computed by using the formula: As transaction costs incurred under technical trading rules are inevitable, hence to find out whether applied technical trading rules after inclusion of transaction costs are profitable or not, a method proposed by 1 is followed. According to this method, first breakeven costs (that are the percentage costs needed to counterbalance the additional returns generated by the technical trading rules compared to the simple buy-and-hold strategy) are computed. For this purpose we used following formula: the estimated actual transaction costs, then that technical trading rule is considered to have profitability. But, if the breakeven costs are less than the estimated actual transaction costs, then that technical trading rule is taken as having no profitability.
We have used the same variants of technical trading rules as reported in literature by others, in order to avoid any likelihood of data snooping biases in addition to be able to compare the results of my study with that of the previous studies reported in literature.

Results and Discussion
The descriptive statistics of daily and non-overlapping 10-day returns for the full sample and five non-overlapping sub-sample periods is shown in Table 1. The highest daily and non-overlapping 10-day mean returns are noticed in sub-sample period II (Post-Asian currency crisis) followed by in sub-sample period V (Post-global financial crisis). Similarly, the lowest daily mean returns are observed in sub-sample period IV (During global financial crisis), followed by in sub-sample period I (During Asian currency crisis).
The highest and the lowest standard deviations (volatilities) for daily returns are noticed in sub-sample periods I and V respectively. While for non-overlapping 10 day returns in subsample periods IV and V respectively. This suggests that KSE-100 index was most volatile during Asian currency crisis and global financial crisis periods, while least volatile after global financial crisis.
Skewness and Kurtosis index is used to see the normality of the returns data. The daily and non-overlapping 10-day returns of the data suggest symmetric distribution, since the values of skewness are between -2 to + 2 30 and of kurtosis between -7 to +7 31 respectively. This implies that t-test is appropriate to apply on KSE-100 index data.
The negative values of skewness obtained in full as well as in five sub-sample periods of both daily and nonoverlapping 10-day returns indicate that the returns are negatively leptokurtic. Our descriptive statistics results for daily returns are in line with the study reported by 10 .
The statistical results for 12 EMA trading variants (6 each with zero percent and one percent bands respectively) are summarized in Table 2. In column 1 of the table, each variant is characterized as (short, long), where short and long represent the short and long moving average periods. Columns 2 and 3 of the table respectively show the number of buy and sell signals generated by EMA. In columns 4, 5 and 7, 8 respectively daily mean returns generated during buy days, during sell days and the standard deviations of returns for buy days, for sell days are presented. In column 6, the differences between mean buy and mean sell periods returns are shown. The numbers in the parentheses represent t-statistics for a two-tailed test. T-statistics values greater than 2.576, 1.96 and 1.645 respectively denote 0.01, 0.05 and 0.1 significance levels. Test results show that the number of buy signals produced by each variant of EMA is significantly larger than the number of sell signals, indicating an up trending of the KSE-100 index throughout the sample period. On average more returns are generated by buy than the sell signals. Buy (sell) signals for all variants of EMA yielded positive (negative) returns. The mean buy returns for 10 of the 12 EMA variants are statistically significantly higher than the mean returns earned through 1-day buyand-hold plan. Likewise, the mean sell returns for all EMA variants are statistically significantly different from the mean returns earned through buy-and-hold plan. The buy-sell differences in returns for all variants of EMA are positive and statistically significant at the 0.01 level. This infers that our null hypothesis of equality with zero i.e., the mean daily buy earnings and the mean daily sell earnings generated through exponential moving average are equal to daily mean earnings obtained through simple buy and hold strategy or the equality of mean buy returns with mean sell returns is rejected.
Results suggest that with exception to variants (5, 150, 0) and (5, 150, 1), remaining EMA variants have signifi-   19 . EMA variants (1,50,1) and (1,50,0) yielded statistically significantly higher mean buy returns as compared to daily mean buy-and-hold returns. This implies that the recent past prices as compared to old ones are important for correct prediction of the future movement of stock prices by EMA in the Pakistan stock market.
The average daily buy returns with zero and one percent bands are approximately 0.20% and 0.21 % respectively, that is equivalent to 59.76% and 64.27% annually. Similarly, the average daily sell returns are approximately -0.23% and -0.26% respectively, that is equivalent to -42.59% and -46.40% annually. Compared to conditional EMA returns, the annual one day mean unconditional returns are 17.57%. The introduction of 1% band had although decreased the number of both buy and sells signals, it had increased the overall profitability.
In all EMA variants, it is seen that the standard deviations for sell days are higher than that of the buy days, indicating that KSE-100 index was more volatile during sell days than the buy periods. Table 3 shows the statistical results for 3 trading variants of MACD. The number of buy and sell signals produced by MACD variants are significantly less than the EMA variants. This is because MACD is computed at the next day index value following a trading signal using fixed holding period of 10 days.
The only MACD variant that yielded significantly higher mean buy (sell) returns as compared to 10-day buy-and-hold plan is (12,26,0). Our observation is in full agreement with the report of 21 , who also found highest profitability of this MACD variant in Italian and Canadian stock markets.
The buy-sell difference in returns for 1 of the 3 MACD variants is statistically significant at the 0.01 level. This suggest that our null hypothesis of equality with zero i.e., the mean daily buy earnings and the mean daily sell earnings generated through MACD are equal to the mean earnings obtained through 10 day buy and hold strategy or the equality of mean buy returns with mean sell returns is accepted.
The annual mean buy (sell) returns for MACD is 43.39% (-11.58%). In comparison to this, the annual 10-day mean unconditional returns are 477.21%.
In all variants of MACD, it can be observed that the standard deviations for sell days are higher than the buy days, indicating that KSE-100 index was more volatile during sell days than the buy periods. Our result is in accord 17 .
In Table 4, results for six variants of RSI are presented. The number of buy and sell signals produced by each variant of RSI are markedly less than that of the EMA variants, but are considerably more than that of the MACD variants. This is because RSI after the generation of trading signal is computed from the next day index value using fixed holding period of 10 days.
It is interesting to note that unlike other employed trading rules, buy signals for 2 of the 6 RSI variants generated negative returns, while sell signals for 4 of the 6 RSI variants yielded positive returns. Amongst the RSI variants, (21, 50) provided the highest mean buy returns. The annual mean buy (sell) returns for RSI rule is 287.65% (-55.14%). Compared to this the annual 10-day mean unconditional returns are 477.21%. These results therefore, indicate that RSI rule has no predictive power to forecast future trends in share price movements in KSE-100 index. This implies that our null hypothesis of equality with zero i.e., the mean daily buy earnings and the mean daily sell earnings generated through RSI are equal to the mean earnings obtained through simple buy and hold strategy or the equality of mean buy returns with mean sell returns is accepted. Table 5 depicts summarized results for 2 variants of MOM. The data show that the number of buy and sell signals produced by each variant of MOM is significantly greater than both MACD and RSI but is less than the EMA variants. Both buy and sell signals generated by each variant of MOM is equal; buy signals generated positive returns, while sell signals provided negative returns. Both mean buy and mean sell days returns for MOM variants are statistically significantly higher than the mean returns earned through simple buy-and-hold plan. Similarly, buy-sell differences in returns for both variants of MOM are positive and statistically significant at the 0.01 level. Consequently, our null hypothesis of equality with zero or the equality of mean buy returns with mean sell returns is rejected.   MOM results indicate that both the variants of MOM have significant predictive power to detect future changes in share price movements in KSE-100 index. The annual mean buy (sell) returns for MOM are 1366.57% (-94.79%). In comparison to this, the annual one day mean unconditional returns are 17.57%.
In both variants of MOM, it can be observed that the standard deviations for sell days are higher than that of the buy days, indicating that KSE-100 index was more volatile during sell days than the buy periods.
In Tables 6, 7, 8 and 9 we respectively report the profitability of EMA, MACD, RSI and MOM rules after adjusting for transaction costs. It is observed that 4 of the 12 EMA variants, 2 of the 3 MACD variants, 2 of the 6 RSI variants; and both MOM variants are profitable as their breakeven costs are greater than the estimated actual transaction costs in Pakistan stock market.
Summarized sub-sample period results for each variant of EMA, MACD, RSI and MOM rules (shown in appendix ' A') are consistent with the full sample period results, therefore only important findings of sub-sample period results are described here.
It is observed that EMA rule with exception to subsample period I (in which EMA produced more sell signals than the buy) has generated considerably more buy than the sell signals. In sub-sample period IV, highest number of EMA variants yielded statistically significantly more mean buy returns than the mean returns obtained by simple buy-Vol 12 (26) | July 2019 | www.indjst.org Salma Khand, Vivake Anand, Muhammad Nadeem Qureshi and Naveeda K. Katper and-hold plan. Similarly in sub-sample period II, highest number of EMA variants is found to yield statistically significantly more mean sell returns than the mean returns obtained by simple buy-and-hold plan. The highest and the lowest average buy signals are recorded in sub-sample periods II and IV respectively. Similarly the highest and the lowest average sell signals are noticed in sub-sample periods I and V respectively. The highest and the lowest average daily buy (sell)returns generated by EMA rule are recorded in sub-sample periods II (after Asian currency crisis) and V (post-global financial crisis) respectively. The highest and the lowest buy (sell) standardreturns generated by EMA rule are recorded in sub-sample periods II (after Asian currency crisis) and V (post-global financial crisis) respectively. The highest and the lowest buy (sell) standard deviations (volatilities) are seen in sub-sample periods I (during Asian currency crisis; period of financial instability) and V (after global financial crisis; period of economic and financial stability) respectively. In all sub-sample periods, EMA variants (1, 50, 0) and (1, 50, 1) provided excess returns than the remaining EMA variants.
Results for MACD rule show that the highest and the lowest buy (sell) signals are recorded in sub-sample periods I and IV respectively. The highest and the lowest average buy returns generated by MACD variants occurred in sub-sample periods III and I respectively. The highest buy and sell standard deviations (volatilities) are recorded in sub-sample periods I and IV respectively. Similarly, the lowest buy (sell) standard deviations are noticed in sub-sample period V. In all sub-sample periods except II, MACD variant (12, 26, 0) yielded highest mean buy days returns.
Similarly results for RSI rule demonstrate that the highest and the lowest buy signals are generated in sub-sample periods I and V respectively. The highest and the lowest average buy returns yielded by RSI variants occurred in sub-sample periods II and IV respectively. The highest buy and sell days volatilities are observed in sub-sample periods IV and I respectively. Similarly the lowest buy and sell days volatilities are seen in sub-sample period V.
Results for MOM rule show that the highest and the lowest buy (sell) signals occurred in sub-sample periods I and III respectively. The highest and the lowest average buy returns generated by MOM variants are noted in subsample periods I and V respectively. The highest buy and sell standard deviations are recorded in sub-sample periods II and I respectively. Similarly, the lowest buy (sell) standard deviations are noticed in sub-sample period V. In all sub-sample periods both variants of MOM yielded statistically significantly higher mean buy returns than the mean returns obtained by simple buy-and-hold plan.

Conclusion
In this study 10 of the 12 EMA and both MOM variants are found to generate significantly more buy than the sell signals indicating an upward trend in the KSE-100 index throughout the sample period. Buy days returns and buysell differences in returns for all variants of EMA and MOM are noted to be positive, while sell days returns for all variants of EMA and MOM are negative. The mean buy returns for 10 of the 12 EMA variants and for both variants of MOM are statistically significantly higher than the daily mean returns earned through buy-and-hold plan. Likewise, the mean sell returns for all EMA and MOM variants are statistically significantly different from the daily mean returns earned through buy-and-hold plan. The buy-sell differences in returns for all variants of EMA and MOM are positive and statistically significant at the 0.01 level. These results suggest that 10 of 12 EMA variants and both of the MOM variants have significant predictive power to detect future changes in share price movements in Pakistan stock market.
The observation that in all EMA, and MOM variants, the standard deviations for sell days are higher than the buy days in all sub-sample periods, indicate that KSE-100 index was more volatile during sell days than the buy periods. Buy-Sell = Difference between the mean buy and the mean sell period returns.

Variant
Nb Ns Buy Sell Buy-Sell SDb SDs Buy-Sell = Difference between the mean buy and the mean sell period returns. ***= p<0.01