Posted by Frugal on 30th November 2007
I am testing MACD and RSI technical indicators by back-testing its utility of these technical trading signals. It is still a work in progress. But I already have some interesting results.
Since I’m most interested in precious metal and energy sectors, I used them for my back-testing. I’m going to write about MACD (Moving Average Convergence/Divergence) first, which is indeed a much more “reliable” technical signal than RSI. With some of my custom tweaks, I was able to generate a 2.67X return better than buy-and-hold approach in HUI index. However, there are many caveats that can make this technique not so useful.
First of all, the killing point is that a single day of delay in the MACD information will reduce the 2.67X return down to 1.18X return. This single day delay comes from that if I use the previous closing MACD information to make decisions for the next day, the price that I get for the next day at the closing price is overall much worse than if I “try” to use the same day MACD value, and obtains the closing price for that day. This almost means that you should probably try your best in predicting the closing price near the end of trading session and trade accordingly.
Secondly, due to the frequent buy/sell signals that are generated, overall there are only net of 10% of the signals that actually give you a better re-entry price. However, it’s these 10% that give you the out-sized return.
Thirdly, MACD is quite “reliable” in the sense that when I tried to use quite different averaging schemes instead of (26,12,9) default settings, the final decisions are quite close to each other. In constrast to RSI, RSI fails miserably on this point. Instead of reliable, I prefer to call it less sensitive or perturbable.
Fourthly, the performance of MACD on OIH and HUI behaves quite differently. I haven’t tuned enough on OIH. But it appears that the trading thresholds around the crossing need to be different for a more optimal result.
At last, without some amount of tuning, most settings of MACD-based trading will actually give you a negative performance versus buy-and-hold. This is also true with RSI-based. I don’t know whether this has anything to do with the bullish trends in both HUI & OIH. But it appears that trading in and out tends to let you out-of-market sufficiently enough such that your final performance actually deteriorates versus buy-and-hold approach.
Currently, I generate buy/sell signals whenever there is a crossing between slow & fast MACD curves. I am trying to figure out some ways to reduce the number of signals generated, but still retain the performance. The current trading frequency that I get is one for about every 15 trading sessions. That seems to be too much for me, although may not be too much for a swing trader. I hope to tune my trading algorithm so that I can generate more reliable and less frequent signals.
I hope that eventually I can put these algorithm development platform on my website, so that anyone can back-test their own strategies on any selected stock.
Also, I would like to enhance the trading algorithm with non-binary decisions by trading only a portion, instead of everything. This is to attempt to reduce the overall volatility of all or nothing trading approach. The other enhancement that I want to add is to do some adaptive tuning in the parameters, based upon recent history.
I should know enough math, signal processing, computer algorithms, and software programming to take this mini-project to a very advanced stage. Unfortunately, I usually don’t have the time to do it. Instead, I simply rely on my native analog neural networks (my brain) to process stock market prices, news, and signals to generate decisions. And certainly these decisions are greatly affected by my limbic system (that is my emotion).
Hopefully, I can bring something useful for all of you from this when it’s more mature.