Chapter 7: Kicking the Wheels of a New Strategy
9. Test system; evaluate results
Although I don’t detail each step with a figure, you will see figures in this chapter that highlight some of these steps to give you a feel for what you’ll be doing when you perform your own backtest.
Check the average value of losing trades, as well as maximum and consecu- tive losses to determine if a system is suitable.
118 Part II: Evaluating Markets, Sectors, and Strategies
12_241769 ch07.qxp 2/22/08 3:32 PM Page 118
A long only, rate of change (ROC) momentum system was tested using a simple moving average (SMA) crossover to signal trade entry[ROC: 34, SMA:
13] and exit [ROC: 21, SMA: 8]. Because a faster signal was used for trade exit, a second parameter had to be added to trade entry requiring the 21-day ROC to be higher than its 13-day SMA. Otherwise the appropriate trade exit may never be signaled. This is a trending system that seeks to capitalize on a longer- term momentum push upward. To limit losses and profit erosion a faster momentum signal is used to exit the position.
The backtest was performed over a six year period that included bullish and bearish periods (1999 to 2005)on a group of six semiconductor stocks includ- ing SMH, an ETF for the sector. $20,000 was used for the system with 50% of the cash available used for each trade. A $10 per trade commission was added to the costs. No stops were part of the initial system test.
Figure 7-4 displays side-by-side charts for a trade generated by the system.
The image provides two charts for Intel Corporation (INTC) showing trade entry and trade exit conditions. The position was entered on 12/29/1999 and exited six calendar days later for a gain of 3%.
A system does not have to be robust to be effective. Because volatility and trending characteristics vary for different securities, some are better suited to certain types of systems.
Figure 7-4:
ROC trending system sample trade (INTC 12/30/1999–
1/5/2000).
119
Chapter 7: Kicking the Wheels of a New Strategy
12_241769 ch07.qxp 2/22/08 3:32 PM Page 119
Reviewing system results
Because managing risk is a main theme throughout this book, evaluating a system with no stops may seem counter-intuitive. When you think about it though, stop levels are pretty arbitrary — the market doesn’t really care if you entered a position at $45. It may or may not have support 5% or 10%
below that amount. Allow the system to identify a viable stop-loss point when backtesting it, then decide if it represents suitable risk for you.
System results were very favorable on a variety of measures for the initial run, so no filter was added. The Max Adverse Excursion% was reviewed to determine if a reasonable stop level could be added. A 15% stop was included and the system test run once again. Results were only slightly less favorable so the stop was incorporated.
Charting packages may use different calculations for the same indicator. If changing systems, be sure to compare indicator values that provide signals so you’re trading the same system tested. Always consider re-testing the system on the new platform.
Two forward tests were also run, with and without the stop. A two year period was used for each and the system remained viable, with much lower profitability. Expect this to happen with forward tests and actual system per- formance. This is due to changing conditions and inefficiencies that get worked out of the markets. That’s one of the reasons why you need to period- ically review system performance and incorporate reasonable stops when- ever possible.
Table 7-2 provides system results for the four different runs.
Table 7-2 ROC System Review
System Average Median Gain: Loss Average Average Max
Run Return Return (number) Gain Loss Loss
Test1 4.7 3.0 1.96 10.1 5.8 35%
Test2 4.6 3.0 1.91 10.0 5.9 16%
FTest1 1.6 1.0 1.56 4.0 2.3 10%
FTest2 1.6 1.0 1.56 4.1 2.3 10%
A lower percentage stop can be considered to bring the average and median return closer, but because average gains are outpacing average losses (letting profits run) you want to first compare the average and median for winning trades and losing trades separately.
120 Part II: Evaluating Markets, Sectors, and Strategies
12_241769 ch07.qxp 2/22/08 3:32 PM Page 120
You can use a standard deviation calculation to assess the stability of profits for any market approach.
Adding risk management to a backtest
All trade approaches need to take risk management into account. Focus on larget adverse moves for a strategy when trying to identify stops that still allow the strategy to work. If adding this stop maintains profitability and sta- bility of the system andis consistent with your risk tolerance, you can con- sider implementing the strategy or system.
Cutting losses
An approach that is systematic, but not mechanical, can still be backtested.
Regardless of how you go about performing that backtest, you should keep an eye on large adverse moves that occurred for the trades generated. This allows you to identify reasonable, systematic filters and stops geared toward minimizing losses.
A stop-loss order can result in a larger percentage loss by the time a trade is executed. A worst-case scenario occurs when a signal is generated at the close of trading one day and the security has a price gap at the open the next day.
Taking profits
Identifying stop-loss points that manage risk is probably secondhand to you by now. On the other end of the spectrum, have you ever been in a profitable trade that starts moving the wrong way? Right around that point you realize you don’t have a specific exit plan for taking profits. Sometimes you focus so much on risk that you forget to identify favorable price targets. Or maybe you did identify a profitable exit point, but conditions start to deteriorate before that price level is reached.
In addition to identifying a stop-loss level, identify a trailing stop percentage or dollar amount to minimize the number of profitable trades that turn into losses. The trailing stop should be incorporated into your system or strategy and tested. If you want the system to generate the trailing amount, evaluate trades with large favorable moves that yielded significantly less in the way of profits (or turned into losses). After completing your review, you may do as follows:
Add a filter that accelerates your exits
Generate a trailing percentage using max favorable excursion % data
121
Chapter 7: Kicking the Wheels of a New Strategy
12_241769 ch07.qxp 2/22/08 3:32 PM Page 121
Letting profits run
An effective trading approach doesn’t necessarily have to have more winning trades than losing trades. It just needs profits to outpace declines. That’s actually the case for many trend-oriented systems. You end up with more losing trades, but the average value of the loss is much smaller than the aver- age value of gaining trades. And so goes the mantra, “be sure to cut your losses while letting profits run.”
Sorting trades by greatest lost to greatest profit allows you to more easily review statistics for both.
Although you need to identify a method for taking profits, you also have to avoid cutting profit levels in such a way that they no longer outpace losses.
Trading successfully requires quite a bit of pre-work. You’ll see your trading evolve by focusing on the following: