Tuesday, February 26, 2013

Does EMAs crossing really work?

I've been challenged by a reader from Market Watch to demonstrate that my system works. I have demonstrated this almost three years ago when another sceptic said that the system doesn't actually work. Have a look at this article that goes back to the stock market in the 70's. Both sceptics said they back-tested my system and it was actually producing loses, not gains. I was puzzled since I was using this system every day and I knew, from practice, that was working and was producing money. So I said "let's have another look at the charts to see if I am wrong or not". I was going to test EMA25 crossing EMA 50 on weekly (5 days) chart which I knew from previous years that signaled a bull or a bear market (it's just a coincidence that I am using the same pair of EMAs for two hours chart). The software I am using allows me to go back only to 2000. At the same time I can use the chart on 9 days (which is almost two weeks) that allows me to go back to 1996. Since I was using 9 days chart instead of 5 days chart I had to adjust the EMAs, 5/9 = 0.5555, and 50 multiplied with 0.5555 is almost 28. So I had to use EMA 14 crossing EMA 28 on 9 days chart. You know that I am also using a SMA for confirmation but I left it out this time for clarity. 

Here it is the 1996-2000 period. For the sake of simplicity I assumed that both "buy and hold" and "EMAs crossing" entered the market at the same time, at 650 on SPX in 1996. Again, for simplicity I assumed that no new money came into market between 1996 and 2013. How did they perform?

Everything was beautiful (don't you miss the 90's?) both B&H and EMAs guys made the same amount of money. Let's say they started with 10,000. For every period I am going to calculate a multiplication factor by dividing the highest level to the lowest, in this case, 1320/650 = 2.03, so in 2000 both portfolios were showing $20,300.

Next come the first big plunge, 2000-2003. B&H lost his shirt, EMAs guy made money. The EMAs guy portfolio shows now 26,796. I don't need to calculate for B&H since he didn't close the position. I am going to calculate it at the end.

2003-2007, another bull market. B&H recovers everything lost, his portfolio is back to $20,000. EMAs guy portfolio shows $35,370.

Here comes the bear market again, a nasty one. B&H guy loses his shirt, EMAs guy makes money on the short side. His portfolio shows now $44, 567. Notice that EMAs crossing did not capitalize a good chunk of the plunge and also the entry on the long side was quite late. This was due to the fact that it was a very sharp "V" recovery. Still the EMAs guy made money.

Good times are here again, another bull market from 2009 to present day. B&H guy is happy that his portfolio shows $20,000 once again. He didn't made a dime from 2000 to 2013. EMAs guy portfolio shows now $63, 730. So in the end the B&H guy made 10,000 profit and EMAs guy made 53,000, this is a 5x difference. Do I need to be clearer than this?

The question is why does the system work when looking at charts and doesn't work when is  backtested? I had the curiosity to ask what exactly he did when he backtested my system.  In short, the guy calculated EMA 25 and EMA 50 from 1950 to 2013 then asked the computer to give a "1" if EMA25 was higher than EMA 50 (profit) and a "0" if EMA25 was lower than EMA50 (out of the market). Then he compared the results with "buy and hold" and reached the conclusion that "buy and hold" has better performed than EMAs crossing over the last 60 years!  It took me exactly 5 seconds to realize why his backtesting showed a loss. He considered me out of the market when the sell signal was generated instead of being short and making money, he pretty much cut my profit in half. His answer was "if the system produced losses by being invested during the bull market and out of the market during the bear market is going to be even worse if I considere you invested during the bear market". 
How can it be worse? Is not like I am going to go short during the bull market. If you really want to find the equation that describe my system you need to consider me invested during the bull market, invested on the short side during the bear market and subtract from this gain the whip-saws, the only moments when the system is actually losing money. 

Anyway, I showed him the mistake but he continues to argue that my system is losing money. I am not a proud man, or not proud enough to be unable to accept an inconvenient truth. I am used to be wrong, I am a scientist (I have a PhD in biochemistry) and you have no idea how many times per day I am banging my head on the wall and ask myself "what the hell this result means?" Science humbled me and stock market humbled me as well. As a newbie in stock market I made the common mistake to believe that trading it's easy, "buy low and sell high, what's the big deal, even a monkey can do it". After losing almost everything I realized that things are not as simple as they seem. I started studying every indicator and oscillator out there (RSI, MACD, Bollinger Bands, Ichimodu cloud, OBV, DMI... you name it) and I reached the conclusion that the best system for my style of trading is EMAs crossing on 1-2 hours chart plus SMA 120 and a non-price indicator called DMI which is actually a momentum indicator. I am also fond of uptrend and downtrend lines as support/resistance levels.

He also pointed out that the system did not work in the last 3-4 years. Fair enough! Let's assume the best case scenario for buy and hold, that he invested exactly at the bottom, at 700 on SPX. EMAs crossing brought me into the market at 1050. This is a big 350 points advantage for buy and hold. If we are going to have a perpetual bull market, buy and hold will retain the 350 points gain. However, one single bear market will make the gain disappear in a matter a months since the buy and hold is going to lose money and EMAs crossing is going to make money. 

So, what do you think, am I wrong or am I right? Even if you never left a message on my board please do it this time. For my Market Watch friend it doesn't matter if I am wrong or right, he is not going to use my system anyway but for me is important since I am using it all the time. So, am I right or am I deluding myself into thinking my system really works? Did any of you enter on the long or short side based on the signals I posted on this board? Did you make money or did you lose money? Please let me know. 

No comments:

Post a Comment

Thank you for your feed-back