Monday, January 18, 2010

Backtesting a trading system

This post is mostly my feedback and analysis on a system that MarketMike has been working on. I figured it might be interesting to follow along for the readers and also interesting for us to look back and see how we developed it.



Above is the chart with the system implemented and the signals it has given since March on SPY. As it stands now, if you followed this system, you would have made -17.72%. But this does not mean that this is a complete waste, and below I show you why.

First, I think the logic on the system is reversed. If you simply turn all the short orders into long orders and long orders into short, you would have returned 21.52% since March.

Of course this falls very shy of the close to 68% you would have returned had you simply bought in March and never sold. So clearly we missed the boat on some good opportunities such as in July, October, and November. This is something that I will try to fix and see if I cannot get the system to not miss such good opportunities. An important thing to note, however, is the fact that once you reversed the orders you lost money only twice over the last year, which is pretty impressive.

I think if the system were supplemented with Fibonacci studies, one could filter out the unimportant trades and even find ones that the system missed. This will allow us to fine tune the system. Below is a chart of SPY on which I have drawn several Fibonacci levels. Note that all the levels I have drawn are based on data prior to 4/14/2009. So essentially all the Fibonacci levels are drawn as if today was 4/14/2009. This also assumes that I have ignored any signals the system has given up to this point.



As you can see there is very strong support at $81.50 and $82. SPY reached this level on 4/21/2009 Referring back to the chart above, you can see that there is in fact a Short (or after reversal, a long) signal on that very day. So I would have said, “OK, time to go long SPY”.

At this point, I would also project my resistance levels which you can see on the chart below. This time all Fibonacci levels are drawn using data prior to 4/21/2009, the day I went long SPY. As you can see the resistance lies between 87.15 and 87.5. We reached this price on 4/30 and lo and behold, the system gives a sell signal on that very day. My return on this trade would have been approximately 6.6%.Unfortunately, I would have got out too soon because had I waited another week, I would have made another 3% or so.



The next buy signal I get is on 5/8. I would not enter this position, however, because Fibonacci is telling me that there is resistance at $91.8. A very similar situation occurred on 5/12 and again I would not have entered this position unless I saw that the price broke the resistance lines. Not surprisingly, SPY hit the resistance lines and then fell right back to the 87.50 area which we had identified as resistance (and has now become support).



Ideally, the system should have given a buy signal on 5/15 or 5/26. There was a double bottom at a very important support level and I would have definitely liked to go long at this point. Had I gone long using the Fibonacci information, I would have entered at around 87.50 and exited at 91.70, returning around 5%.

After this the system is quiet for a long time, which is unfortunate because right around 7/10, it missed a huge opportunity that Fibonacci would have caught and returned around 15%. Many other such opportunities are missed and most of the other signals do not lie on Fibonacci levels or give false signals.

I think after some fine tuning this has the potential to be a very effective trading system. I think that the indicators need to be set on a faster response. I realize that this will give a lot more false signals, but you can eliminate those false signals using supplemental studies like Fibonacci or EW.
I also need to analyze other securities and see how the system works on them. Will keep you posted.

-Wown
Stockjockz.blogspot.com

0 comments:

Post a Comment