Macd Rsi Probability
Macd Rsi Probability
2
Safwan Mohd Nor, Guneratne Wickremasinghe, 2014. For example, Chong and Ng (2008) explore the profitability of these
1
The efficient market hypothesis argues that since stock prices instantly trading rules for a sample period that begins in the year 1935 (to 1994),
and rapidly reflect historical information, trading on the basis of even though the RSI was only introduced by Wilder (1978) 40 years
technical analysis will not be able to produce abnormal returns when the later. Therefore, it would not have been possible for traders to use the
stock market is (at least) efficient in the weak-form. strategies in their decisions.
194
Investment Management and Financial Innovations, Volume 11, Issue 4, 2014
(II) 1/1/2001-31/12/2005, (III) 1/1/2006-31/12/2010 whenever RSI > 70 (< 30), it suggests a security is
and (IV) 1/1/2011-30/06/2014. These subperiods overvalued (undervalued). Accordingly, a buy signal
include some major episodes in the Australian is produced when RSI crosses over 30, whereas a sell
market. The first subsample covers the phase where signal is generated when RSI crosses below 70.
the clearing house electronic settlement system
In this article, the buy (sell) trade for both MACD
(CHESS) in the ASX became fully automated. The
and RSI is executed at the next day (t1) index value,
second subperiod includes the abolishment of stamp
following the trading signals generated at t0. This is
duty for marketable securities. The third subsample
to ensure a realistic trading environment and
covers the global financial crisis period, while the
therefore mitigate any possibility of look-ahead
final subsample reflects its recovery phase. Daily
bias1. Consistent with prior studies (e.g. Brock et al.,
closing index values are obtained from Yahoo
1992; Chong and Ng, 2008; Chong et al., 2014), we
Finance (http://finance.yahoo.com) website.
examine the 10-day holding period returns
1.2. Trading rules. In this paper we examine the following a trading signal, computed as follows:
performance of two oscillators as investigated by
Chong and Ng (2008) and Chong et al. (2014), the rt10 log( Pt 10 ) log( Pt ). (4)
MACD and the RSI. We focus on the more established All other signals that are produced within this 10-
signal generators, where trades for both oscillators are day period are ignored. Positive (negative) returns
executed based on their signal lines. The trading for the buy (sell) signals indicate positive profits. In
rules can be described as follows. The MACD, a order to test for statistical significance, we follow
trend-following indicator developed by Gerald the approaches utilized in Brock et al. (1992). The
Appel, is formed on the differences between the t-statistic for buy (sell) returns is calculated as:
long and short exponential moving average (EMA).
The EMA can be mathematically presented as: r
tr , (5)
2 2
2
EMAt ( Pt EMAt 1 ) EMAt 1 , (1)
n Nr N
where EMAt indicates the exponential moving where r and Nr indicate the mean return and
average at time t, Pt denotes the index value at time number of trades (signals) for the trading rules, 2 is
t, while n shows the number of periods for the EMA the estimated variance for the sample, while and N
(Chong and Ng, 2008). The MACD can therefore be denote the unconditional mean and the number of
formulated as: observations. In testing the long-short (buy-sell)
n n strategies, we compute the t-statistic as follows:
MACD EMAk EMAd , (2)
b s
i 1 i 1 tbuy sell , (6)
2 2
where k = 12 and d = 26 reflect the number of days
in EMA. These values are consistent with those Nb Ns
widely used by real-life traders, as argued by
Murphy (1999). We also construct a signal line on where b ( s) and Nb (Ns) indicate the mean return
the basis of the 9-day EMA of the MACD. and number of signals for the buys (sells). In line
Consequently, a buy (sell) signal is generated when with the existing literature, we assume homogeneity
the MACD penetrates over (under) the signal line. of the variances of returns. This allows for
comparability with other documented findings in
The RSI indicator, invented by Wilder (1978),
this area.
measures the magnitudes of recent gains and losses
to establish whether the stock is overbought or 2. Empirical results
oversold. The oscillator ranges from 0 to 100 and
Table 1 describes the summary statistics for the 10-day
can be defined as:
returns and the four subperiods for the Australian All
100 Ordinaries Index. The unconditional (buy-and-hold)
RSI 100 , (3) mean 10-day return for the entire period is about
1 RS
where RS = average up index value / average down
index value over the n period. Following Wilder 1
Note that Chong and Ng (2008) and Chong et al. (2014) do not reveal
(1978), we use n = 14 days. In order for the RSI to whether their trades are executed at the next trading day, although this
emit buy and sell signals, its value is compared with might be the case. Executing trades at day t (the same day when the
signal is emitted) nonetheless would have meant that traders react on
the signal lines that represent overbought (70) and non-available information, and the study would therefore suffer from
oversold (30) thresholds. More specifically, look-ahead bias.
195
Investment Management and Financial Innovations, Volume 11, Issue 4, 2014
0.104%, or 2.593% annually1. It can be seen that the Overall, it has a slightly higher peak than that is
returns are most volatile (having a high standard expected in a Gaussian distribution. In all periods, the
deviation) during the third subsample period, which returns exhibit longer left tails. With the exception of
coincides with the global financial crisis. The distri- the third subsample, a reduction in skewness and
bution of returns is leptokurtic in the early subsample. kurtosis can be observed during the periods.
Table 1. Descriptive statistics for the 10-day returns
Min Max Mean SD Skewness Kurtosis
Whole period -0.0636 0.0401 0.001037 0.0121593 -0.916 3.543
Subperiod
1996-2000 -0.0636 0.0224 0.001115 0.0123425 -1.367 5.460
2001-2005 -0.0325 0.0242 0.001398 0.0090662 -0.680 1.172
2006-2010 -0.0630 0.0401 0.001290 0.0150370 -0.844 2.704
2011-2014 -0.0287 0.0248 0.000040 0.0112857 -0.288 0.029
st th
Notes: Table shows the unconditional (buy-and-hold) 10-day returns for the period of 1 January 1996 to 30 June 2014 including
the four subperiods. All subperiods are equally sized, except for the most recent subperiod.
For illustration purposes only, we provide the (Figure 1). In short, the buy signal is emitted when
graphical depiction of the trading signals generated the MACD (green line) crosses over the signal
by the MACD, along with the historical index value, (dotted red line), and vice versa. The trade is then
for the period of 1 January 2012 to 30 April 2012 executed the next day (t + 1).
Fig. 1. Australian All Ordinaries Index (XAO) index value, MACD and the signal line (9-day exponential moving average of
the MACD) for the period of 1 January 2012 to 30 April 2012
Table12 reports the returns from trading using the only slightly higher than half of the total trades. Long
MACD. On the whole, the number of buy signals trades generate profits only during the first two
“N(Buy)” exceeds the number of sell signals subperiods, with mean 10-day returns of 0.123% and
“N(Sell)”. There are 8.595 (8.108) buy (sell) signals on 0.052%, respectively. Interestingly for the whole
average generated per annum2. The fractions of sample, trading on the buy signals leads to an average
profitable signals for both long and short strategies are 10-day loss of 0.005%, or about 0.043% per annum3.
1
This paper assumes that the average annual number of trading days in
3
the Australian stock market is 250. We annualize the mean 10-day returns on the conditional trading
2
This study investigates a total of 18.5 year of data from 1996 to mid- strategies by multiplying the mean returns with the average number of
2014. Therefore, in the case of the MACD, the average number of buy signals per year. Therefore, mean return is 0.005%* 8.595 = 0.043% per
trading signals is 159/18.5 = 8.595 per annum. annum.
196
Investment Management and Financial Innovations, Volume 11, Issue 4, 2014
The null hypothesis for the equality of returns result is obtained only for the period of 1996-2000.
between the MACD buy signals and the buy-and- Traders can profit from the long-short trading rule,
hold trading rule cannot be rejected. but the result is statistically significant (at 10%
Using MACD for short selling yields positive level) only for the first subperiod. It appears that for
returns overall (annualized profit of 0.641%) and both buy and sell signals, the MACD performs
outperforms the buy-and-hold for the first and worst during the third (global financial crisis)
fourth subperiods, although a statistically different subperiod.
Table 2. The returns of the MACD rule
N(Buy) N (Sell) Buy Sell Buy > 0 Sell > 0 Buy-Sell
-0.00005 -0.00079 0.00074
Whole period 159 150 0.572 0.560
(-0.915) (-1.611) (0.509)
Subperiod
0.00123 -0.00268* 0.00391*
1996-2000 47 43 0.574 0.605
(0.056) (-1.793) (1.709)
0.00052 -0.00029 0.00081
2001-2005 42 39 0.595 0.538
(-0.525) (-1.054) (0.418)
-0.00146 0.00190 -0.00336
2006-2010 38 35 0.526 0.514
(-0.910) (0.209) (0.826)
-0.00067 -0.00169 0.00101
2011-2014 30 31 0.600 0.548
(-0.258) (-0.715) (0.276)
Notes: The table shows the returns for the long and short MACD strategies for the period of 1st January 1996 to 30th June 2014
including the four subperiods. N(Buy) and N(Sell) indicate the number of buy and sell signals generated by the trading rule. Buy and
Sell denote the average 10-day returns from the long and short strategies. Buy > 0 and Sell > 0 show the fractions of profitable
trades. Buy-Sell indicates the differences between the long and short strategies. The numbers inside the brackets indicate the
t-statistics for the mean MACD Buy and Sell from the unconditional 10-day returns, as well as the Buy-Sell from zero. * denotes
statistical significance at the 10% level.
Figure 2 exhibits the index value for XOA, the RSI, crosses over the oversold threshold (red line), while
as well as overbought and oversold signal lines for the sell signal is generated when the RSI penetrates
the period of 1 June 2011 to 30 September 2012. below the overbought threshold (green line). The
The buy signal is emitted when the RSI (aqua line) trade is then executed at t + 1.
Fig. 2. Australian All Ordinaries Index (XAO) index value, RSI, overbought and oversold signal lines for the period of 1
June 2011 to 30 September 2012
197
Investment Management and Financial Innovations, Volume 11, Issue 4, 2014
Table 3 shows the returns from the RSI trading rule. thirds of its trading signals yield profits. For the
On average, the RSI buy (sell) produces 1.838 whole period, the buy (sell) rule appears to perform
(3.568) signals per year. The number of sell signals quite well where it yields positive (negative) returns,
“N(Sell)” generally exceeds the number of buy although the results are not statistically significant. In
signals “N(Buy)”. The RSI (buy) seems to provide a other words, traders following the buy (sell) signals
good degree of predictability, where almost two can earn a profit of 0.630% (0.225%) per year.
Table 3. The returns of the RSI rule
N(Buy) N (Sell) Buy Sell Buy > 0 Sell > 0 Buy-Sell
0.00343 -0.00063 0.00406
Whole period 34 66 0.647 0.530
(1.047) (-1.063) (1.390)
Subperiod
0.00897* 0.00081 0.00817**
1996-2000 8 20 0.875 0.400
(1.754) (-0.108) (2.181)
0.00380 -0.00026 0.00406
2001-2005 9 20 0.556 0.550
(0.719) (-0.772) (0.946)
-0.00511 -0.00355 -0.00156
2006-2010 10 17 0.500 0.706
(-1.173) (-1.251) (-0.187)
0.00882* -0.00058 0.00940*
2011-2014 7 7 0.714 0.571
(1.980) (-0.142) (1.794)
Notes: The table shows the returns for the long and short RSI strategies for the period of 1st January 1996 to 30th June 2014
including the four subperiods. N(Buy) and N(Sell) indicate the number of buy and sell signals generated by the trading rule. Buy and
Sell denote the average 10-day returns from the long and short strategies. Buy > 0 and Sell > 0 show the fractions of profitable
trades. Buy-Sell indicates the differences between the long and short strategies. The numbers inside the brackets indicate the
t-statistics for the mean RSI buy and sell from the unconditional 10-day returns, as well as the buy-sell from zero. * and ** denote
statistical significance at the 10% and 5% levels, respectively.
The RSI (buy) trading rule outperforms the buy- The evidence from this study appears to support the
and-hold rule in all periods, except for the third profit potential of the RSI. The buy signals
subperiod. It offers significant returns at the 10% generally outperform the unconditional mean
level for the first (0.897% vs. buy-and-hold’s returns, and the effect is stronger for the long-short
0.112%) and the last (0.882% vs. buy-and-hold’s strategy. The long and long-short trading rules are
0.004%) subperiods. In a similar vein, the paired also capable of producing significant profits in the
long-short trading rule dominates the buy-and- most recent subperiod. While the annualized returns
hold for the whole period and each of the for RSI are smaller than those from the naive buy-
subperiods, with the exception of the third and-hold strategy (due to the small number of
subperiod. More specifically, the return from the average RSI trades per year). Its greater mean
long-short RSI strategy for the year 1996 to 2000 returns indicate greater profit potential. This can be
is statistically significant at the 5% level (with a achieved by exposing more capital per trade for
mean 10-day return of 0.391%) and at the 10% each RSI signals through the use of proper money
level (average 10-day return of 0.101%) for the management techniques. The use of RSI only during
period of 2011-2014. the non-trending period (as opposed to all periods
Conclusions inclusive) may also offer an even superior trading
performance, as argued by Wong et al. (2003).1
In this study, we investigated whether the MACD
and RSI trading rules can generate profitable To conclude, our results suggest that the Australian
trades in the Australian stock market. The results stock market is not efficient in the weak-form.
reveal that in general, buy signals from trading Nonetheless, since the strategies work well in some
using the MACD underperforms the naive buy- periods (but perform poorly in others), the findings
and-hold strategy, although there is some support of this research support the idea of constantly
for it for short selling. Nonetheless, the profits revising existing trading strategies and optimizing
from the latter are too small and generally the parameters of the trading rules in order to exploit
insignificant, and can be eliminated in the presence market inefficiency. Future studies can explore these
of trading costs. In any event, short selling possibilities on different equity markets. Further,
restrictions mean that such strategy might not be future studies can incorporate practical constraints,
able to fully capitalize on any inefficiency in such as trading costs and short-selling restrictions to
processing historical market data. Overall, the poor see the robustness of the results.
results from MACD are consistent with Chong et
al. (2014) for the developed markets such as
Germany, Japan and USA. 1
It is argued that the RSI works well in a non-trending market phase.
198
Investment Management and Financial Innovations, Volume 11, Issue 4, 2014
References
1. Bessembinder, H. & Chan, K. (1995). The profitability of technical trading rules in the Asian stock markets,
Pacific-Basin Finance Journal, 3 (2-3), pp. 257-284.
2. Brock, W., Lakonishok, J. & LeBaron, B. (1992). Simple technical trading rules and the stochastic properties of
stock returns, Journal of Finance, 47 (5), pp. 1731-1764.
3. Chong, T.T.L. & Ng, W.K. (2008). Technical analysis and the London stock exchange: testing the MACD and RSI
rules using the FT30, Applied Economics Letters, 15 (14), pp. 1111-1114.
4. Chong, T.T.L., Ng, W.K. & Liew, V.K.S (2014). Revisiting the performance of MACD and RSI oscillators,
Journal of Risk and Financial Management, 7 (1), pp. 1-12.
5. Dryden, M.M. (1970). Filter tests of U.K. share prices, Applied Economics, 1 (4), pp. 261-275.
6. Fama, E.F. (1970). Efficient capital markets: a review of theory and empirical work, Journal of Finance, 25 (2),
pp. 383-417.
7. Fama, E.F. & Blume, M.E. (1966). Filter rules and stock-market trading, Journal of Business, 39 (1), pp. 226-241.
8. Gunasekarage, A. & Power, D.M. (2001). The profitability of moving average trading rules in South Asian stock
markets, Emerging Markets Review, 2 (1), pp. 17-33.
9. Lai, M.M., Balachandher, K.G. & Nor, F.M. (2007). An examination of the random walk model and technical
trading rules in the Malaysian stock market, Malaysian Accounting Review, 6 (2), pp. 99-121.
10. Wilder, J.W. (1978). New concepts in technical trading systems, Greensboro, NC: Trend Research.
11. Wong, W.K., Manzur, M. & Chew, B.K. (2003). How rewarding is technical analysis? Evidence from Singapore
stock market, Applied Financial Economics, 13 (7), pp. 543-551.
12. Taylor, M.P. & Allen, H. (1992). The use of technical analysis in the foreign exchange market, Journal of
International Money and Finance, 11 (3), pp. 304-314.
13. Yu, H., Nartea, G.V., Gan, C. & Yao, L.J. (2013). Predictive ability and profitability of simple technical trading
rules: recent evidence from Southeast Asian stock markets, International Review of Economics and Finance, 25,
pp. 356-371.
199