NEW TECHNIQUES Dynamic Zones Most indicators use a fixed zone for buy and sell signals. Here s a concept based on zones that are responsive to past levels of the indicator. by Leo Zamansky, Ph.D., and David Stendahl ne approach to active investing employs the use of oscillators to O exploit tradable market trends. This investing style follows a very simple form of logic: Enter the market only when an oscillator has moved far above or below traditional trading levels. However, these oscillatordriven systems lack the ability to evolve with the market because they use fixed buy and sell zones. Traders typically use one set of buy and sell zones for a bull market and substantially different zones for a bear market. And therein lies the problem. Once traders begin introducing their market opinions into trading equations, by changing the zones, they negate the system s mechanical nature. The objective is to have a system automatically define its own buy and sell zones and thereby profitably trade in any market bull or bear. Dynamic zones offer a solution to the problem of fixed buy and sell zones for any oscillator-driven system. An indicator s extreme levels can be quantified using statistical methods. These extreme levels are calculated for a certain period and serve as the buy and sell zones for a trading system. The repetition of this statistical process for every value of the indicator creates values that become the dynamic zones. The zones are calculated in such a way that the probability of the indicator value rising above, or falling below, the dynamic zones is equal to a given probability input set by the trader. To better understand dynamic zones, let s first describe them mathematically and then explain their use. The dynamic zones definition: Find V such that: For dynamic zone buy: P{X V}=P1 For dynamic zone sell: P{X V}=P2 where P1 and P2 are the probabilities set by the trader, X is the value of the indicator for the selected period and V represents the value of the dynamic zone. The probability input P1 and P2 can be adjusted by the trader to encompass as much or as little data as the trader would like. The smaller the probability, the fewer data values above and below the dynamic zones. This translates into a wider range between the buy and sell zones. If a 10% probability is used for P1 and P2, only those data values that make up the top 10% and bottom 10% for an indicator are used in the construction of the zones. Of the values, 80% will fall between the two extreme levels. Because dynamic zone levels are penetrated so infrequently, when this happens, traders know that the market has truly moved into overbought or oversold territory. CALCULATING THE DYNAMIC ZONES The algorithm for the dynamic zones is a series of steps. First, decide the value of the lookback period t. Next, decide the value of the probability P buy for buy zone and value of the probability P sell for the sell zone. For i=1, to the last lookback period, build the distribution f(x) of the price during the lookback period i. Then find the value V i1 such that the probability of the price less than or equal to V i1 during the lookback period i is equal to P buy. Find the value V i2 such that the probability of the price greater or equal to V i2 during the lookback period i is equal to P sell. The sequence of V i1 for all periods gives the buy zone. The sequence of V i2 for all periods gives the sell zone. In the algorithm description, we have: Build the distribution f(x) of the price during the lookback period i. The distribution here is empirical namely, how many times a given value of x appeared during the lookback period. The problem is to find such x that the probability of a price being greater or equal to x will be equal to a probability selected by the user. Probability is the area under the distribution curve. The task is to find such value of x that the area under the distribution curve to the right of x will be equal to the probability selected by the user. That x is the dynamic zone. FOR EXAMPLE Assume that in a lookback period i with a length of 80, we counted the times that the following prices appeared: 1, one time; 3, three times; 6, seven times; 9, 16 times; 11, 24 times; 13, 13 times; 15, eight times; 19, four times; 20, three times, and 21, one time. This is the frequency f(x). Assume that the probability selected is 0.1. If we multiply 0.1 times 80, which equals 8, and then look for the price that represents the point that the frequency equals 8, adding the last three frequencies (4, 3 and 1) will give us 8. From that we conclude that in this case, the value x=19 will be the zone with the probability of 0.1. This procedure is done for both buy and sell zones data independently. Figure 1 illustrates the buy and sell zones for the Standard & Poor s 500 market using a nine-day relative strength indicator (RSI). The area above and below the dynamic zones constitute the upper and lower 10% boundaries. The zones
TRADESTATION (OMEGA RESEARCH) FIGURE 1: BUY AND SELL ZONES, S&P 500. Figure 1 illustrates the buy and sell zones for the Standard & Poor s 500 market using a nine-day relative strength indicato. The area above and below the dynamic zones constitute the upper and lower 10% boundaries. The zones appear to evolve with the market because they use a rolling 70-day period of indicator values in their construction. FIGURE 2: RSI, THE DYNAMIC AND FIXED ZONES. Figure 2 shows the RSI system with the dynamic zones in the top graph and fixed zones in the bottom graph. Note how the dynamic zones adjust to accommodate the prevailing short-term trend in the market. These self-adjusting zones offer not only more efficient trades but additional trading opportunities. The overbought/oversold extreme levels associated with the dynamic zone indicator were penetrated more frequently than were the fixed zones, allowing for greater trading flexibility. appear to evolve with the market because they use a rolling 70-day period of indicator values in their construction. FOR A TRADING EXAMPLE Say our nine-day RSI system has been profitable over the last few years using the generally accepted fixed buy and sell zones of 30/70. The system buys the market as the RSI crosses above the 30 level and sells when it crosses below the 70 level. The system remains in the market 100% of the time. Using these set parameters, the RSI performs well in a bull market but breaks down in bear markets. The system s temporary failure may not be due entirely to the indicator itself; rather, it may be caused by the system s strict buy and sell zones. In this case, the zones should be altered to fit the declining market. In a bear market, the buy and sell zones of 20/70 may work more efficiently. The dynamic zones work with the market adjusting themselves automatically, increasing for the bull market and decreasing for the bear market. The parameters that construct the RSI remain constant, but the zones adjust to better reflect the current trading environment. This is accomplished by using a rolling average of indicator values in the calculation of the zones. After all, the key is to have a mechanical system make its own decisions. INDICATOR COMPARISON The principles behind the dynamic zones can be used with any oscillator-based trading system. As an example, a 26- year period (1/5/70 11/27/96) was used to trade the S&P 500 cash index. Our sample nine-day relative strength indicator will be used to construct our dynamic zones. Our system will use a lookback period of 70 days with a probability of 10% for both the buy and sell zones. The fixed zones will use the traditional 30/70 levels. (These systems have been designed for comparison purposes only and are not recommended for actual trading.) DZ RSI FIXED RSI Net profit $202,235 $86,395 % Profitable 68.18% 73.68% Win/loss ratio 0.80 0.45 Profit factor 1.72 1.25 Adj. profit factor 1.37 0.96 Sharpe ratio 0.27 (0.26) Total trades 176 133 Avg. trade $1,149 $649 Avg. runup $4,420 $4,805 Max. runup $205,105 $160,820 Avg. drawdown $4,567 $5,809 Max. drawdown $65,040 $84,606 TRADING RESULTS COURTESY OF PERFORMANCE SUMMARY PLUS Figure 2 shows the RSI system with the dynamic zones in the top graph and fixed zones in the bottom graph. Note how the dynamic zones adjust to accommodate the prevailing shortterm trend in the market. These self-adjusting zones offer not only more efficient trades but additional trading opportunities. The overbought/oversold extreme levels associated with the dynamic zone indicator were penetrated more frequently than were the fixed zones, allowing for greater trading flexibility. Any oscillator-driven system that attempts to trade a market, whether bullish, bearish or neutral, should benefit from the use of dynamic zones. The trading results from this trading system confirm these findings. Indicators with the ability to adjust their own buy and sell zones should in fact outperform those indicators that use fixed zones. To improve trading results, further refinements can be made to systems
using dynamic zones. These improvements include: separate probability inputs for the two zones, various exit signals and the use of money management techniques. Dynamic zone trading systems are limited only by the imagination of the trader. REAL WORLD INVESTING Let s take a look at an actual trading system and put dynamic zones to the test. The DZ %R system we have created uses Williams %R indicator (parameter 1) smoothed by a weighted moving average (parameter 2). The system is simple and straightforward, buying and exiting the S&P 500 cash index as the indicator crosses its respective extreme zones. In this example, the extreme zones are calculated by the dynamic zones program using the lookback period of 70 days (N), and the buy/sell probability factor of 12% (StartPrB & StartPrS). The actual dynamic zones program allows the users to create indicators using a total of five separate user parameters in addition to the time and probability factors. If necessary, each of these parameters can be optimized by HOLLIS BOGDANNFY
TradeStation/SuperCharts. The specific system outlined below can be used for trading options, futures or even mutual funds. The system is specifically designed to recognize highprobability trading points set by the S&P 500 market. TRADESTATION CODE (partial code only) DZ %R System Input: Par1(9),Par2(3),Par3(3),Par4(4),Par5(5),N(70),StartPrS (0.12),StartPrB(0.12); Vars: BuyZone(0), SellZone(0), Indicator(0); SellZone=DZSell(Par1,Par2,Par3,Par4,Par5,StartPrS,N); BuyZone=DZBuy(Par1,Par2,Par3,Par4,Par5,StartPrB,N); Indicator = WAverage(PercentR(Par1), Par2); IF CurrentBar > 1 and Indicator crosses above BuyZone then Buy at market; IF CurrentBar > 1 and Indicator crosses below SellZone then ExitLong at market; Overall, the performance of this system is well above average (Figure 3). Now examine the system even further by reviewing the trading results over various periods. We will begin with an annualized breakdown of the key performance figures. These results reflect trades that were initiated and closed within the calendar year. ANNUAL ANALYSIS (MARKED-TO-MARKET) Period Net profit %Gain Profit Trades %Profitable factor YTD $18,980 8.05% 100 2 100.00% 12 mos 47,140 22.72 2.22 6 83.33 1996 53,390 29.29 11.21 8 87.50 1995 39,565 27.73 100.00 7 100.00 1994 (625) (0.44) 0.93 7 57.14 1993 20,375 16.57 9.69 9 88.89 1992 6,485 5.57 3.54 7 57.14 1991 30,490 35.46 100.00 6 100.00 1990 6,235 7.82 1.47 7 57.14 1989 17,695 28.52 8.59 7 71.43 1988 7,210 13.15 3.26 6 83.33 1987 4,840 9.68 100 1 100.00 The trading results for the DZ %R trading system are impressive, given that it only trades 42% of the time. Its consistent nature is set up for SPX position traders or even index mutual fund traders. The system can also be used as a filter for other short-term trading systems. Net profit $204,640 Total trades 63 % Profitable 77.78% Win/loss ratio 1.80 Profit factor 6.30 Adj. profit factor 4.26 Sharpe ratio 0.30 Return retracement 6.63 Avg. trade $3,140 Avg. winning trade $4,798 Avg. losing trade $2,664 Avg. runup $6,444 Avg. drawdown $4,470 Max. equity runup $215,525 Max. equity drawdown $38,000 Entry efficiency 59.12% Exit efficiency 73.44% % Time in market 42.15% Avg. time-in-winner 23.27 Avg. time-in-loser 32.36 Next, the systems performance over extended periods is itemized. The trading results remain extremely consistent through various market conditions. ANNUAL ROLLING PERIOD ANALYSIS (MARKED-TO-MARKET) Period Net profit % Gain Profit Trades %Profitable factor 1997 $18,980 8.05% 100.00 2 100.00% 1996-97 72,370 39.70 14.84 10 90.00 1995-97 111,935 78.44 22.40 17 94.12 1994-97 111,310 77.66 9.15 24 83.33 1993-97 131,685 107.10 9.23 33 84.85 1992-97 138,170 118.63 8.45 40 80.00 1991-97 168,660 196.16 10.09 46 82.61 1990-97 174,895 219.32 6.50 53 79.25 1989-97 192,590 310.38 6.65 60 78.33 1988-97 199,800 364.33 6.36 66 78.79 1987-97 204,640 409.28 6.49 67 79.10 This special Williams %R trading system can outperform any indicator-based system in its class. The trading logic behind the dynamic zones can benefit any oscillator-based trading system (Figure 4).
FIGURE 3: EQUITY CURVE. Here s the equity curve for the dynamic zone %R. CONCLUSION Dynamic zones offer traders a different perspective on the typical trading system. The markets are constantly changing, and if oscillator-driven trading systems are to remain competitive, they must learn to evolve with the markets. Dynamic zone based trading systems can actually quantify the extremes and thereby improve the trading process. Most important, these trading improvements can be used to increase the profit potential in any market. Leo Zamansky is president of RINA Systems, Inc., which specializes in the design, development, evaluation and im- FIGURE 4: DYNAMIC ZONES, 70-DAY LOOKBACK AND PROBABILITY. In this example, the extreme zones are calculated by the dynamic zones program using the lookback period of 70 days (N), and the buy/sell probability of 12% (StartPrB & StartPrS). The trading results for the DZ %R trading system are impressive, given that it only trades 42% of the time. Its consistent nature is set up for SPX position traders or even index mutual fund traders. The system can also be used as a filter for other short-term trading systems. provement of trading systems. David C. Stendahl is a professional trader and vice president of financial services with RINA Systems. RINA Systems is the developer of Performance Summary Plus and Portfolio Evaluator, performance evaluation software packages for Omega Research s TradeStation and SuperCharts. See Traders Glossary for definition S&C