ages, create a table showing the significance of each oldest day in the exponentialcalculation. In Table 4-6, the .50 smoothing constant gives 50% of the total value tothe arent price, 25% to the prior day, 12.5% to the next oldest, until the 7th oldest day a so ty.8% to the total value of the exponential moving average: Table 4-7 accumulates the:weights to show how much of the calculation has been completed by the elap: ed aysprinted across the top. Table 4-7 is plotted in Figure 4-7. The most recent days (on Jef)receive the bulk of the significance; the oldest prices are of little impact. The : smoothing calculation is 90.1% complete by day 22; the total remaining days added together o1
account for 9.9% of the value.
 
FIGURE 4-6 Comparative changes in-straight and exponential moving averages.
   
123-45 6789 1018121314 1514131211109 87 6 S
 
 
RELATING EXPONENTIAL AND STANDARD MOVING AVERAGES 83
 
 
TABLE 4-5 | Comparison of Lag between Standard and ExponentiallySmoothed Moving Averages
Stondard S-Point Standard ShangePrice SDoy 20% Exp 20% Exp SDay__—S-20% Exp 20% Exp
1 — 1.00 1.00 _ = _2 -— 120 1.20 - _ ~3 =_ 1.56 156 - Not enough —4 _ 2.05 2.05 — data _5 3 264 264 — — _6 4 3.64 331 1.00 1.007 5 464 4.05 1.00 1.008 6 5.64 4.84 1.00 1.009 7 6.64 5.67 1.00 1.00
10 8 7.64 6.54 1.00 1.00
" 9 8.64 7.43 1.00 1.00
2 10 9.64 834 1.00 1.00
13 WW 10.64 9.27 1.00 1.00
14 12 11.64 10.22 1.00 1.00
1s 13 12.64 11.17 1.00 1.00
14 13.6 13.24 1174 60
3 13.8 13.52 1h99
12 136 13.54 11.99
" 13 13,.36— 11.79
10 12 1236 11439 " 1136 10.958 to 10.367 9 969°
6 8 8.95
5 7 B16
4 6 7.33
3 5 6.46
2 4 5.57' 3
     
. 465 ‘ :tt
Figure 4-7 relates the fully calculated exponential smoothing (within 1%) to the stan-dard moving average. Find the smoothing constant on the left and the number of days in astandard moving average along the bottom. Observe that, if you perform an optimizationwith equally spaced exponential smoothing constants, there is an unexpected distributionrelative to past days.
Equating Standard Moving Averages to Exponential Smoothing
Smoothing constant (%) lo 220 30 40 50 60 70 80 -90Standard (n-day average) 20 10 6 4 3 225 175 140 LIS
 
If the equally distributed smoothing constants shown above are used for testing, half of thetests will analyze moving averages of 3 days or less. If the testing program is to relate to thestandard moving average, reverse the process, finding the smoothing constant for a known 
ce S18
  
¥6L
Tee
    
 
 
 
199 C19 OLS US 89% OIF FE Iu Os O01 oF= 2 TTT TT T $% 986 sre vee vis eee 99 vee ow ste THO Os Be O9 OO oC_ _ _ _ _ _ _ _ _ _ > _ _ — 0% Tre 816 TE TEE OM SO Os oOE of2D DDD ttt rt rt =m = cee £86 is Es Tt O18 FEL OF OF- 2 DFT DPD tt rt rt = = = ee $86 696 ee Sue OM ON OFSDP ID Pr ttt rt rH = = = = 566 (066 26 986 OF 007 OFDTD DPD ttt ttt tr = = = 866 ee Ee Os OeOTS20 DIFP I ttt ttt tte et FH = = = 666 086 006 OFee FF ott74 rsa 12 Ot él a at 9 st ol al a i or 6 g Z 9 s r € z t (%)
40g ‘aN yBnoup uosnuy joy Sunydem
 
 
FIEG 40ld JO a2ue2yIUBIS—Bunoows jeRUauOdxg Jo UOREN|eAy /-» FTAVL
pene ep : . Oe
 
 
 
 
 
 
Y eet st oct gion ; St 6t fy BF ES 99 EL 18 06 Ol orangegeee & nH nl It Lt €€ Uy US ze vol Bzl oO 007 ot
- rrr Oe wT LN St OSE TL €Ol Lei OZ, OVE oea -~ Fe e t US 9B Fl OE \0Or oF=o af -- Fe rr rr He re €9 STI Ost 00S os- SSF SPP SPP fT PP te S| Be 9% OF 009 oySole - SF FFF FHF FHF HH BL EF OR OL onS25 l at - - - y TE O91 008 os"= = - - 6 06 006 06°= = =~ oe 5p Fee eS = om 001a&@ Ww iw ow 6 Bt Lt 9 St! HH Ef Uo Of 6 8 L Sor € tT Tt ana
sfog Jo raquiny 1804
 
Be Jo}id Jo aauEsyIUs}S—SuYpooWS jeAUBLOMXy jo UOEN|EAZ 9-) TTAVL—————— eee
   
“86 TREND CALCULATIONS
 
 
FIGURE 4-7 Evaluation of exponential smoothing.
 
ANUMBER OF DAYS USED IN CALCULATING
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100! 2 34 5 6 78910 2030904070E60 —Ta5 so A { T8 40&E 30 +——~gS 20 +8e19,954a&Bo >gs82 al8 3 |2=Ey85 |.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
i 2 3 4 S$ 67 8910 20 30MOVING AVERAGE NUMBER OF DAYSB
 
number of days. This process will be important when finding robust system parametersand will be discussed in Chapter 21 (“Testing and Optimization”).
Leen ee EEE
Equating Exponential Smoothing to Standard Moving Averages
 
Standard (n-day average) 2 4 6 & 10° 12 4 16 18 20Smoothing constant (%) 65 403023520525phil eceic S SEea
The distribution of smoothing constants is very close to logarithmié and is plotted ona log scale in Figure 4-6. To test exponential smoothing within a range of days, use a log-arithmic distribution of smoothing constants across that range, with closer values takenat the smaller numbers, if necessary. This may seem an unnecessary precaution, but itis not.
RELATING EXPONENTIAL AND STANDARD MOVING AVERAGES a7
TABLE 4-8 Comparison of ExponentialSmoothing Values
 
     
MovingAverage IstOrder 2nd-Order 3rd-OrderDays (n) pal p=2 p=33 500 293 2065 333 184 1267 .250 134 0919 200 106 072" 167 087 059B 143 074 0501s 125 065 04417 WL 057 03919 100 051 035,21 091 47 31ee
Best Approximation of Smoothing ConstantsThe standard conversion from the number of days to a smoothing constant s was given byHutson’ as
__2“n+l
 
s
where 7 is the equivalent number of days in the standard (linearly weighted) moving aver-age. In addition, 2nd- or 3rd-order exponential smoothing, based on the weighting of thepast 2 or 3 days' prices, may be desirable. This is the exponential equivalent to step weight-ing. Its general form is
= 2 \aum= -(-ga)
A comparison of the standard moving average days with Ist-, 2nd-, and 3rd-order expo-nential smoothing is shown in Table 4-8.
Estimating Residual Impact
The primary difference between the standard moving average and exponential smoothingis that prices impact the exponentially smoothed value indefinitely. For practical purposes,the effect of the oldest data may be limited. A general method of approximating thesmoothing constant s for a given level of residual impact is given by
s=1-RI”"
* Jack K. Hutson, “Filter Price Data: Moving Averages vs. Exponential Moving Averages,” Technical Analysis ofStocks & Commodities (May/June 1984). -
 
TABLE 4-9 Comparison of Exponential
 
 
Smoothing Residual Impact
n 2K(n + \) Ri (%) 10% RI 5%RI5 333 13.12 369 ASL10 182 13.44 206 25915 125 13.49 142. -18t
20 095 1351 109 139
  
ba TREND CALCULATIONSBewhere RI is the level of residual impact (€.g., .05, .10, .20). A lower percent level impliesmore residual impact, and n is the equivalent number of moving average days:
‘The approximation for the smoothing constant, given in the previous section as 2/(7 +1), can be shown to have a consistent residual impact of between 13 and 14%, The use ofthe preceding formula, as shown in Table 4-9, would allow the specific adjustment of resid-
ual impact.
© Donald R, Lambert, “Exponentially Smoothed Moving Averages,” Technical Analysis of Stocks & Commodities(September/October 1984).
 
 
Trend Systems
average, weighted averages, exponential smoothing, and regression-based values. Toprofit from identifying the trend requires the use of trading rules and the selectionof specific parameters that define the trend speed and position risk, among other factors.Often, the selection of rules is seen to be dependent on additional parameters. This chap-ter will first discuss those rules that are necessary to all trading strategies, then give exam-ples of actual systems. The selection of trend speed is handled only briefly here, but it iscontinued with a detailed analysis of these and other systems throughout the book, andespecially in Chapter 21 (“Testing”). Toward the end of this chapter, a section on viewingsequences of trends may prove interesting to the analyst trying to be more innovative.
T° previous chapter developed the tools for calculating trends—a standard moving
 
BASIC BUY AND SELL SIGNALS
Regardless of the selection of moving averages, the smoothed trend calculation will lagbehind the actual current market price. In rising markets, this lag will cause the movingaverage to be below the price; in falling markets, it will be above. When prices change direc-tion, the trendline and the actual market prices cross because the trend is slow to reflect thenew market direction. These crossings provide the opportunity for the basic trading signals
Buy when rising prices cross the trendline.Sell when declining prices cross the trendline.
It is also necessary to decide what prices are tobe used. The answer depends on theconstruction of the average and the testing of the system. If the average is composed onlyof closing prices, it is reasonable to start testing with the modified signals
Buy when rising prices close above the trendline.Sell when declining prices close below the trendline.
Ifan average of high and low prices were used, or the high, low, and close, a buy or sellwould be signaled when the new average (high + low)/2 or (bigh + low + close)/3 wasabove or below the corresponding moving average value. In all cases, consistency is impor-tant. The system that is tested and the one that is traded should be the same. In the fol-lowing discussion, the term close will be used. To find out if a trading signal occurred onany,day, wait until the close of trading, calculate the new moving average or trend value,and then see whether a crossing occurred according to the basic buy and sell rules.
~You may have realized that using the closing price to generate a signal usually requiresthat calculations occur after the market has closed, and orders must be placed in the after-hours market or on the next day's open. If the system is actually generating signals as ofthe closing price, then you are not following the system. To correct this problem, the valueof the closing price that would cause a new signal should be calculated in advance. Thiswould-allow execution on or near the close of the current day: The rules of the system canalso be changed to buy or sell on today’s close if that price is above or below yesterday's 
90 TREND SYSTEMS
moving average value. A-small amount of testing will determine which approach worksbest. Another choice would be to test today’s close against yesterday's projected movingaverage; therefore, if the moving average values for the past 2 days were
M,_, = 432M,-2= 429
the difference M,_, —_M,-2 = 3 would be added to M,_, to get the estimated turning crite-rion of M} for today. That means that the rate of change must differ for a signal to occur.More sophisticated approaches to projecting the moving average will be covered later.
Variations in Timing
Lead and lag are features common to the trend calculations discussed in Chapter 4, Theopposite in purpose, a lead of n days advances the plotted value of, for example, the mov-ing average M, from the same time as the current price P, to the position n periods ahead.In actual trading, this gives an advance criterion for a trading signal; prices must remainabove this level to maintain the current position. A lag time of 7 days plots the currentmoving average value at the same time as P,-», 7 days sooner. This indicates that a signalhas already occurred, but no action may be taken for n days. The lead plot tries to antici-pate a trend change, while a'lag is a commitment to holding a position. Both lead and lagtechniques may use the same basic buy and sell signals as standard trends.
Entry and exit timing may be improved by a delay in taking action on.a signal, usuallyfrom 1 to 3 days. This technique allows a number of days for the newly developed trend toreverse and show a false signal at the cost of missing the beginning of the trend. Systemsthat have a large number of short lived losing trades and a high profit/loss ratio can bene-fit from a delay of 1, 2, or 3 days.
Reversing a position on each trade signal results in a constant commitment to being inthe market. This philosophy will show greater profits when the trade is successful, butmore frequent losses because of the constant commitment to trend changes during whip-saw periods. An entry delay may also improve a reversal system.
BANDS AND CHANNELS
.‘Thus far, modifications have been based on a simple moving average or trendline. The plotcan be adjusted forward or backward, the position can be reversed, or the entry or exitdelayed in an attempt to begin the new trade at the time when the trend has decidedlytaken a new direction. Even if prices have begun what will become a major downtrend, anentry into a short position too soon may be subjected to sharp reversals caused by con-flicting fundamental and technical elements at these turning points. The simplest way toavoid these price variations is by using a band.
‘A band is an area surrounding a trendline above and below that acts as a zone of com-mitment for the trader and allows time, as measured by price movement and risk, forprices to settle into their new direction. Als6 called channels, bands can be created inmany ways, one of the most popular being a percentage of the current price or the currenttrendline value: A band that is formed from the trendline will be
(upper band) By=M, + cM,(owerband) B= M,-cM,
where c is a percentage, 0 < cS 1, and M, is today’s moving average value. Since the mov-ing average is much smoother than the price patterns; the band will be fairly uniform aswell. If the current price is used instead of the moving average then
 
BANDS AND CHANNELS: w
By=M,+ cP,BL=M,-cP,
The band will vary in width at a much faster rate using price. During an uptrend, the bandbased on prices can get very wide. Another popular type of band is based on absolutepoint value, for example, silver 5¢, corn 5¢, or cattle 25 points; each represents a dollarrisk to the trader. The use of this type of band is usually found coordinated with a moneymanagement program that limits losses on trades to a specific number or to a maximumpercentage of the portfolio being managed.
The independent smoothing of the high and low prices for any period forms a volatil-ity band. Although it may be practical to use the same technique or the same relativesmoothing (¢.g., 10-day or 10% smoothing constant) for the high, low, and closing prices,it is not a requirement. If the same smoothing criterion is used, the band will be uniformwith respect to the moving average of the closing price; if not, all three trendlines mayweave around one another. A volatility function can also be used to create a band. Ratherthan the simple percentage calculation shown first, the band may be increased at ratesequal to a price-volatility relationship. All of the methods of forming bands are subject toscaling. Scaling is accomplished using a value as a multiplier or scaling factor; it willincrease or reduce the sensitivity of any technique used for calculating the band. If $ is a
scaling factor, then the following bands can be constructed:B=M,+SxcxM, (percentage smoothing)
B=M,*+SxcxP, (percentage smoothing using price)
B=M,+5SxR (fixed risk using absolute point value)Bo=Sxf wo} (independent smoothing of highs or lows)Bi=Sx fl)
B=M,+Sx @,-L) (volatility of high-low)
B=M,+SxV(P) (volatility function at price level)
B=M,+SxV(M) (volatility at moving average level)
When S = 1, the scaling effect is nullified; for $ > 1, the width of the band is magnified; andfor S < 1, the band is reduced.
Different bands are not mutually exclusive. A variable band may be used to time theentries and exits subject to a maximum risk established by another band. It may also beconvenient to have separate exit and entry bands, the first more sensitive, such that a rever-sal of position is not always necessary. An exit band may be based on the intraday high orlow prices while entries are determined by closing prices.
Bollinger Bands
Perhaps the simplest and most robust measurement of price volatility is the standard devi-ation of the prices themselves over recent price history. Originally introduced by JohnBollinger and popularly called Bollinger bands, the value of 2 standard deviations of pricemovement over the past 20 periods are plotted above and below a 20-day moving average.As with other techniques, the popularity of the computer has allowed users to changeboth the calculation period and the number of standard deviations that form the band.Because the standard deviation represents a confidence level, the choice of 2 standarddeviations equates to a 95% confidence band, while 3 standard deviations give a confi-dence band of 99%.
  
2 TREND SYSTEMS
 
Another way of viewing Bollinger bands is as a percentage, seen as %b:%b = (Close — Lower band) / (Upper band — Lower band) ‘In TradeStation, a function that returns the upper and lower generalized Bollinger
bands, given the calculation period and standard deviation factor, is
{Function Bollinger_Band
Returns the width of the Bollinger band as measured from the moving average value)
inputs:period(numericsimple), nsd(numeric);
Bollinger_Band = nds * @stddev(close,period);
From the main program, the bands are created with the following instructions:
pandwidth = Bollinger_Band(period,nsd);
highband = @average(close,period) + band width;
lowband = @average(close,period) - band width;‘An excellent example of Bollinger bands uses a combination of weekly and daily dataapplied to the S&P 500, as seen in Figure 5-1. The price pattern follows the weeklyBollinger band higher, where the daily and weekly come together dusing the week ofJuly 14.
Rules for Using Bands
Regardless of the type of band that is constructed, rules for using bands to generate trad-ing signais are limited. The first decision to be made is whether a current position will beliquidated or reversed, causing the entry into a new position in the opposite direction.‘Assuming a reversal from Jong to short and from short to long, the following rules apply:
Buy (close out shorts and go long) when the price penetrates (closes above) the upper _
band.Sell (close out longs and go short) when the price penetrates (closes below) the lowerband.
This technique is always in the market with a maximum risk (without execution costs)equal to the width of the band at the time of entry (see Figure 5-2). If a neutral position ispreferred after exiting from each trade, there are the alternative rules:
Buy (go long) when prices penetrate the upper band. Close out longs when pricesreverse and go below the moving average value (the center of the band).
Sell (go short) when prices break below the lower band. Cover your shorts whenprices penetrate upward through the moving average value.
The band is then used to enter into new long or short trades, and the actual trendlinewithin the band is used only for liquidation. If prices are not strong enough to penetratethe opposite band on the close of the same day, the trade is closed out but not reversed.The next day, penetration of either the upper or lower band will signal a new long or shorttrade, respectively. . S
This technique allows a trade to be reentered in the same direction in the event of afalse breakout. If a pullback occurs after a closeout while no position is being held (asshown in Figure 5-3), an entry at a later date might be at a better price. A disadvantageoccurs when the price changes direction and moves so fast that both the closeout and thenew signal occur on the same day. Reversing the position immediately would be better in
_ a fast market.
‘The high and low of the day may also be used as penetration criteria. Again, using theouter bands for entry and the moving average for exit, apply the following rules:
 
BANDS AND CHANNELS 93
 
FIGURE 5-1 Combining daily and weekly Bollinger bands.
                                   
 
 
 
 
SarayDaty and Wey Bolinger bandePlott ante tne Daly Bareil icy snc gna es eg 09Bolinger Ganda otuonce tnd Sonn he Lower Tine’Frame {ally} Bolinger bance Pees "A and "6"‘atop porn trend ovarsaa,‘eoe9 Average of th Daly‘aceeco
 
Source: Chart created using The Fibonacci Trader. Used with permis i i: permission from Fibonacci Trader Co! ,757 SE \7th Street, Suite 272, Ft. Lauderdale, FL 33316. www.fibonaccitrader.com. evermore
FIGURE 5-2 Simple trading rules for moving averages.
Sellingrisk
Movingaverage
Sell when pricesmove down,o through band
Buy when pricesmove up through.band
Buyingrisk
  
94 TREND SYSTEMS
aFIGURE 5-3 Basic rules for using bands.
 
Buy when the high of the day penetrates the upper band, and close out longs when thelow of the day penetrates the moving average.
Sell when the low of the day penetrates the lower band, and cover shorts when thehigh penetrates the moving average.
With both the first and second set of rules, risk is limited to half of the full band width.In the second case, the chances of exiting one trade and remaining neutral are greater thanthe first.
Timing the Order
‘The type of execution order placed when following a system will have a long-term effect onits results. The use of a band with a single moving average identifies change of trends whena breakout occurs. Buying during an upside break or selling during a downside break oftenresults in poor entry prices, and has been known to place the trader in a new trend at thepoint where prices are ready for a technical adjustment. The most frequent complaint oftrend followers is that their new positions usually show losses and that it takes a long timebefore the technical adjustment ends and the new trend returns to its entry price level.This reasoning has caused many variations from the original rules:
Buy (or sell) on the close after an entry signal has been indicated.
Buy (or sell) on the next market open following a signal. _
Buy (or sell) with a delay of 1, 2, or 3 days after the signal.
Buy (or sell) after a price retracement of 50% (or some other value) following a signal.
Buy (or sell) when prices move to within a specified risk relative to a stop-loss point.”These modifications are for the purpose of entering.a new position with an immediateprofit or preventing excessive risk. Some can be categorized as timing and others as riskmanagement. If intraday prices are used to signal new entries and exits, a rule may beadded that states:
Only one order can be executed in one day—either the liquidation of a current posi- -
tion or an entry into a new position.
‘The goal of improving exit and entry points is well worth spending time and effort. Withlimited capital, the conservation of the investment is important when the greater number
 
APPLICATIONS OF SINGLE TRENDS 95
of trades are expected to lose money. Better entry points will reduce the risk on a largerpart of the trades and allow longer strings of poor performance.
Waiting for the right time to enter a trade may have more disadvantages than isapparent. In tests on trend-following systems conducted over many years, it can beshown that positions entered at the market opening on the day following the system sig-nal improved fill prices about 75% of the time but resulted in smaller overall profits forthe year. Why? Fast breakouts never adjusted back to allow the trader to enter at a betterprice. The three out of four better fills were more than offset by the one breakout thatkept going.
APPLICATIONS OF SINGLE TRENDS
‘The selection of the trend speed (calculation period) is as important as any of the system'srules. The speed determines the activity of trading and the nature of the trend to be isolated.‘To help this decision, some of the preceding sections have shown comparisons of the dif-ferent speeds as well as approaches, based on minimizing the magnitude of the forecasterrors, Without a computer, extensive examination of alternatives is impossible. Chapter 21concentrates on the use of the computer for selection of trend speed and risk parametersfor single- and multiple-trend systems, as well as breakout systems. It also includes an analy-sis of results. .
Prior to being able to optimize, the trend period was based on multiples of calendarperiods, expressed as trading days. In doing this, there is an opportunity to be in phasewith behavioral patterns of traders and brokerage houses, who may work within weekly ormonthly spans. The most popular intervals for selection have been 3 days, the expectedduration of a short price move; 5 days, a trading week; 20 to 23 days, a trading month, andso on. Included in the next sections are well-known systems using single trends, followedby examples of multiple-trend systems.
MPTDI (A Step-Weighted Moving Average)
In 1972, Robert Joel Taylor published a system called the “Major Price Trend DirectionalIndicator” (MPTDI), which was reprinted in summary form in the September 1973 issue ofCommodities Magazine. The system was promoted and implemented through EnterexCommodities in Dallas and was tested in 1972 on historical data by Dunn and HargittFinancial Services in West Lafayette, Indiana. It was one of the few well-defined publishedsystems, and it served as the basis for much experimentation for current technicians andaspiring analysts.
MPTDI is based on a step-weighted moving average of varying lengths, with a band ofchanging widths relative to volatility. It is unique in its complete dependence on incre-mental values for all aspects of the system: the moving average, entry, and stop-loss points.For example, Table 5-1 shows what conditions might be assigned to gold.
If gold were trading in an average range of 250 to 350 points each day, the weightingfactor for the moving average would be TYPE C, indicating medium volatility (TYPE A islowest). Using TYPE C with a 15-day moving average, the most recent 5 days are given theweight 3, the next 5 days 2, and the last 5 days are weighted by 1. The buy and sell sig-nals use the corresponding entry-signal penetration of 250 points above the movingaverage as a buy signal and 250 below as a sell entry. The highs or lows of intraday trad-ing are used to activate the entry based on values calculated after the close of trading onthe prior day. A stop-loss point is fixed at the time of entry equal to the value on the sameline as the proper volatility. The penetration of the stop-loss wilt cause the liquidation ofthe current trade. A new signal in the reverse direction will serve as both a stop-loss andreentry point. 