ing is the most important part ofsystem testing and performance evaluation. The business of trading isexpected to return a profit for an acceptance of risk. Without clearlyunderstanding the risks of each strategy, you cannot intelligentlychoose the best system and decide how much capital will be required totrade.
*
8
SmarterTrend-FollowingIf you could achieve only one goal in price analysis, it should be identifying the price direction, or trend. If you take positions in the directionof the trend, then you should capture the biggest price moves and havereasonable control over risk. When you use a trend to select trades or sethedge positions by confirming the correct trend direction, your tradingperformance must improve.
Forecasting and FollowingFinding the TrendThere are two ways to find the trend. By analyzing major economic factors, you can conclude that prices should go higher. Greater demand,good management, better technology, and cheaper money may all contribute to long-term growth, higher dividends, and higher share prices.Energy prices may be pushed up by greater consumption, a unifiedOPEC position to cut production, or supply disruption in Siberia. Butbasic fundamental evaluation is difficult and dependent on reliableinformation. The conclusion may change if new factors are introduced.Changes must be constantly monitored and weighed.Many traders supplement or substitute a moving average to identifythe trend. There may seem to be no relationship between a simple mathematical formula and the result of events that drive prices, but that isnot the case. A moving average creates a trend by smoothing erraticprice movement. Because it is an average of past prices, it reduces theeffects of outliers that appear to have been extreme reactions to news.129
130
Using Old and New Trading Tools for Reasonable Objectives
Averaging longer periods of data gives smoother trends. The result isoften a good representation of long-term market direction, and a validparallel to government monetary or interest rate policy. Moving averages are also used in econometrics to remove known seasonal or cycliceffects. For many years, stock market analysts have used a 200-daymoving average as their benchmark.A moving average is exactly what it seems to be: the average value of aprior data period. A 3-day moving average is simplyaverage = (price + price[1] + price[2])/3
Most computer trading software, even spreadsheets, will have the moving average formulas preprogrammed, so that it is only necessary to enter@average(price,n)
where price is the data to be averaged, and n is the number of periods(e.g., days or hours). There are many variations on a moving average:• A weighted average may assign different importance to each data item.A 3-day weighted average typically values 60 percent of the mostrecent price and 30 percent of each prior day:@weighted_average(price,3) = .60 x price + .30 x price[1] + .30 x price[2]
• An exponential moving average (called an "exponential") is a specialtype of weighted average, in which each data item is reduced in valueby a constant percentage as it becomes older:exponential = exponential!"!] + percentage xj(price - exponential[1])
which may also be entered@exp_ma(price,smoothing_constant)
where smoothing_constant is the percentage weighting.In most of this book, whenever a moving average is needed, an exponential moving average ("exponential") will be used. It is the simplestcalculation because it does not require all the past data, and the resultsare nearly identical to other moving averages.Fundamental Analysis andTrend FollowingEconomic or fundamental analysis forecasts, and trend evaluation follows.Fundamental analysis attempts to anticipate events by assessing the
Smarter Trend-Following
131
reaction to current factors and weighing the impact of probable events.Trend calculations look at past data, reduce price movement to a netdirection, and assume that prices will continue to do the same as in thepast. Trend-following systems respond to events, rather than anticipatethem.Both fundamental analysis and trend following are good methods,but neither are simple nor are they foolproof. This chapter is concernedwith trend-following methods and computer applications. New, highpowered graphics equipment has made looking backward much easier,and computerized strategy testing packages have made searching forsuccessful systems painless. But it is not that easy. What worked in thepast does not seem to work in the future^—at least not as well, or not allthe time.
Trend TradingNoiseTrading in the direction of the trend is a safe, conservative approach. Animportant feature of trending systems is that they let profits run and cutlosses short. Financial analysts call this "conservation of capital." Themost reliable trends are slower ones, capturing the long-term directionof interest rates or the decline of the U.S. dollar. Long-term trends shouldreflect the same direction as government policy.Trend systems should not be expected to work with data periodsshorter than 1 hour. As you look at prices over intervals such as 5 minutes, you see mostly "noise." Noise is caused by buy and sell ordersfrom all over the world entering the market for different reasons.Liquidation of stocks for personal reasons, trading objectives that focuson different time periods, currency transactions that hedge international business exposure, all come in a steady flow into the marketplace.Orders vary in size, and some larger orders find periods of low volume.This results in price gaps and short, fast moves that may appear to be anew price direction.The level of volatility that occurs during a sustained sideways, directionless period is a convenient measure of intrinsic noise. A price trendwill be unreliable if it is signaled by a move that is no greater than theintrinsic level of market noise (see Figure 8-1).Slow Trends and LagsAlthough longer-term trends are the most dependable, they respondvery slowly to changing market conditions. A 200-day moving average
132
Using Old and New Trading Tools for Reasonable Objectives
Figure 8 - 1 . Intrinsic noise in the Dow Jones Industrial Average, (a) Intrinsicnoise can be seen as the lowest normal level of volatility. In the year before theOctober 1987 plunge, the DOW showed remarkably uniform volatility. The dallytrading range of about 25 points makes a stop-loss of 25 points likely to be executed without any expectation that prices would continue in one direction,(b) Because of noise, small changes in the daily closing price cannot be consideredimportant Price changes, from close to close, show that over 2 to 3 days, pricescould move up or down 30 points. A trend system that buys when prices moveup by only 20 DOW points will be unreliable. (Charts courtesy TeleTVac.)
barely reacts to a 10-day burst of energy in a stock issue. If the price ofIBM ran from $50 to $70 per share in 20 days, a 200-day moving averagewould have moved up by no more than $2. It is difficult to consider amethod as "trend-following" when a moving average is catching up toa price move that is already over.
Smarter Trend-Following
133
Adaptive ApproachTo avoid false signals due to noise, yet eliminate some of the lag inherent in long-term trends, an adaptive method is needed—a moving average that will speed up when markets move and do nothing when thereis no direction. "Adaptive" is the term given to techniques that selfadjust to market conditions. But again, it is not always clear what patterns will signal the moving average to change speeds.
The Traditional SolutionThe most popular way of finding the "best" moving average speed issimply to test all possible trend speeds using historical data. The answergiven by the computer depends on the amount of data tested. If you usea long data history, the best choice will be a very slow moving average.If short time periods are tested, the computer will find a number ofhighly profitable fast and slow solutions; often it will hone in on a single large price move to capture all its profits. Because these patterns donot continue, faster trends rarely succeed.Typically, the more data tested, the more likely the results will be avery slow trend-following system. And that solution is correct. Shortterm price bursts are erratic and unpredictable, but the long-term trendis stable. Unfortunately, large equity swings are associated with holdinga trade for weeks or months. Everyone wants a short-term, fast-tradingtrend that works without large losses. That combination does not exist.Another popular solution is using a computer frequently to retest thespeed of the trend. By including the most recent data, the trend speed isalways expected to be the best. This still requires decisions such as howoften to retest and how much data to use for retesting. Jumping fromone fast trend speed to another creates two additional problems. Thecomputer may want you to get into a trade that it entered some time agoand is already highly profitable. That should worry you. It may alsoresult in "overfitting," isolating a very short-term pattern that does notwork anymore. If the "best" choice changes frequently, it is because thelast choice was not the best.
Adapting to DifferentMarket TraitsA trend-following method is needed that adapts to different marketconditions. It must be slow when prices are drifting aimlessly and fastwhen it is necessary to capture profits. Frequent retesting cannot find
134
Using Old and New Trading Tools for Reasonable Objectives
this trend because an emerging pattern is only a small piece of the totaldata.A solution can be found by remembering how certain market patternsaffect trends. To begin, what do we know about price movement thatwould help an analysis?• Fast-moving averages are best when the market is moving quickly inone direction.• Slow-moving averages are best when prices are going nowhere inchoppy markets.Therefore, the system would be "smart" if it changed speeds according to a combination of market direction and speed. Figure 8-2 showsfour cases that explain the transition.Another important principle to remember is that analyzing a lot ofdata produces robust results. It may give less profitable solutions, butthese tend to be more dependable. Analyzing small amounts of dataresults in many solutions that appear to be good but rarely work.
Moving from Specific Casesto a General SolutionThe best choice for a moving average will be the fastest one that can beused for a situation. What, then, do these four cases have in common?Each one shows that the fastest trend that can be used is limited by theamount of noise, or unpredictable price movements. As the market pattern goes from ideally smooth to very noisy (from (a) to (c) in Figure 8-3)the trend speed must get slower to avoid whipsaw losses.When prices move faster in one direction, the market speed makes thenoise less important. Therefore, the choice of a trend speed is based onboth noise and direction. A price move that is either cleaner or faster canuse a faster trend. What is needed is a mechanism to sense market speedand choppiness; this information can then be fed back into the movingaverage to adjust the speed of its smoothing.The Efficiency Ratio combines these features. This ratio divides the netprice movement by the total price movement (the sum of each of the individual moves taken as a positive number). It can also be considered aratio of the price direction to its volatility. The more efficient, the faster thetrend. A safety factor is built in to the selection of the right trend. If thereis any uncertainty, a slower trend is picked. Some readers will recognizethe Efficiency Ratio as being what has been recently named generalizedfractal efficiency.
Smarter Trend-Following
135
(a) Runaway markets: Very faatMarkets that break out and neverlook back can be traded using thefastest practical speed.
(b) Faat markets: Fast speeds.Fast markets may have some sharpreversals within a prolonged directional move. A moving average mustlag enough to avoid getting caughtby the short reversals. The faster themarket is rising (falling), the lessimpact the reversals have on thespeed of the trend.
(c) Congested markets: Very slow.Markets that enter, or are already in,a sideways partem, cannot beactively traded. A slow trend speedwith a large trend change criteria willhold the same position, therefore itwill avoid getting whipsawed.
(d) Middle-trends with some volatility: Slightly faster sometimes.As markets start to trend after asideways period, the speed of thetrend can increase. This only worksif the level of noise declines; otherwise, a slow speed is still necessary.
Figure 8-2. Observing price patterns and trends.
The Efficiency Ratio has values ranging from 0, when markets arevery noisy for the current amount of direction, to +1 when prices arehighly directional. This notation is convenient because it fits perfectly asan exponential smoothing constant. A small transformation scales thevalue and increases stability (see Box 8-1).
136
Using Old and New Trading Tools for Reasonable Objectives
(a) No Nois*.Any trend speed will work.
Price
(b) More Noise.A slower trend must be used.
(c) Lots of Noise.The slowest trend is best.
Figure 8 - 3 . What do these situations have in common? Figure8-2 shows two characteristics In common: the speed of the pricechange and the amount of noise associated with that move. Look atthe same price change with different amounts of noise.
Defining the Range ofTrend SpeedsThe range of the Efficiency Ratio (ER), from 0 to 1, can be mapped onto arange of trend speeds using a simple formula. Let ER = 0 be the slowestspeed and let ER = 1 be the fastest speed. Then the ratio itself can beused as a percentage that moves between the slowest and the fastest. Ifthe trend speed, in days, is converted to a smoothing constant approximation using sc = 2/(N + 1), then the slowest speeds have the smallestvalues. The formula for scaling the smoothing constant becomesScaled smoothing constant = ER x (fast sc - slow sc) + slow sc
The range of fast to slow is selected as 2 to 30 days, which is the same asthe smoothing constants .6667 and .0645. The scaled speed formula is then
Box 8-1. VOLATILITY MEASUREMENTThere are three popular ways to measure volatility. The method chosenmay differ for specific applications. Figure 8-4 (a)-(c) shows the threeapproaches. The first (a) is simply the net change in price from the firstto the last point. This tends to be the most conservative measurement,because it smooths any price movement that occurs between the beginning and end. The high-low range (b) is more descriptive of anyextremes that might have occurred within the period. The sum of allchanges (c) is the most encompassing measurement because it distinguishes the number of times a price moves from high to low. TheEfficiency Ratio uses the last method because a low value of this sum isconsistent with the strictest idea of "efficiency."
V(1) =@ABS(P 2 -P 1 )
V(2) =High - Low
V(3) =1+2+3+.+ 15+16
Figure 8-4. Volatility measurement, (a) Positive change inprice, (b) High-low range, (c) Sum of all positive changes.137
138
Using Old and New Trading Tools for Reasonable Objectives
Scaled smoothing constant: sc = ER x (.6667 - .0645) + .0645= ER X .6022 + .0645
One last step is necessary because the longer-term 30-day movingaverage will still move slowly up and down, even in a sideways market.The Adaptive Moving Average will be best if it can stop moving whenthe direction of the market is uncertain. To accomplish this, the finalspeed is the result of squaring the scaled speed value.c = sc x sc = s c ^
The AdaptiveMoving AverageThe smoothing constant c is calculated every day and used in the exponential moving average formula. This becomes an Adaptive Moving Average:Adaptive Moving Average:AMA = AMA[1] + smoothing_constant x (price - AMA[1])
The complete calculation of the AMA can be found in Box 8-2. This trendline has special features:• It uses a small number of days (always fixed at 10 in this book) toassign a trend range from very fast to very slow.• The AMA trendline appears to stop when markets have no direction.• When prices make a significant move, the AMA trendline catches up,resulting in a very small lag.• Only one parameter may be changed. The Efficiency Ratio can bebased on a 10-day calculation, and that time period may be used forall markets. The filter size (discussed later) allows some flexibility fordifferent trading speeds.• The AMA was based on analysis rather than testing.Stock and Forez ExamplesCastrol is used to compare the Adaptive Moving Average with a 30-daystandard and a 30-day exponential moving average. Comments on trading are also included. The Deutsche mark is used to show how the AMA
Smarter Trend-Following
139
can produce a smooth trendline through a period of changing marketpatterns and speed. They also show the adaptability of the AMA, independent of the market selected.CastrolThe Castrol chart (Figure 8-5) shows that the three trendlines cometogether at key points. The AMA does not necessarily turn up or downahead of the others, but it shows much less lag. Notice the two periods,December 1992 and March 1993. In the first case, the AMA moves up ina few days, then sideways for the next IV2 months until the other trendlines catch up. A similar situation occurs in March, although the AMAcontinues to move slowly lower, based on a slightly directional market.Trending versus Lagging. During December 1992, the Castrol chartshows that the standard trendlines successfully stayed in the upwardmove until after the peak near the end of February. But during the monthof December, there was no trend. December was highly volatile. Had themarket continued lower in mid-December, the standard and exponentialmoving averages would have lost all their profits.A serious problem with any trend that is fixed at one speed is that itspends most of the time catching up to a price move that has ended. InDecember and March, the price moves took only a few days, but thetrendlines needed another month to catch up. When a trending indicator tells you that the trend is down, it really means that the trendline isgoing down, even though prices may be going up.Profit-Taking. The selection of the fastest AMA trend speeds, seenduring the sharp rise and fall of the trendline in December and March, precede the end of a significant price move. For reasons discussed in detail inChapter 5, this becomes an excellent point to exit the position. TheDecember peak above 1000, and the first March low at 800 are near, or better, than the exit price that would have been achieved by waiting for theend of the trend. Combined with better executions and lower volatility,covered later, profit-taking is strongly recommended based on a highvalue of the Efficiency Ratio.Deutsche Mark: Efficiency Ratioand AMA TrendlineFigure 8-6 uses an arbitrary period for the Deutsche mark to show theEfficiency Ratio and the corresponding AMA trendline. In the middle ofNovember 1992, the Efficency Ratio declines to 0, indicating a period of
140
Using Old and New Trading Tools for Reasonable Objectives
Box 8-2. A SMARTER MOVING AVERAGEUSING THE EFFICIENCY RATIOTo create the Adaptive Moving Average, it is first necessary to calculatean Efficiency Ratio, then convert that ratio to a trend speed.Step 1: Price DirectionPrice direction is expressed as the net price change over time. For example,using the time interval of n-days (or n-hours):direction = price - price[n]ordirection = @momentum(price,n)
where direction is the current price difference, or directional valueprice is current price (daily close or hourly price)price[n] is the close n-days ago (or n-periods ago)Step 2: VolatilityVolatility is the amount of market "noise." It can be defined a numberof different ways, but this calculation uses the sum of all the day-to-dayor hour-to-hour price changes (each taken as a positive number), overthe same n periods. It is expressed asvolatility = @sum(@abs(price - price[1]),n)
where volatility is today's volatility value@abs is the absolute value (positive value of any number)@sum(value,n) is the sum of "value" over n periodsStep 3: Efficiency RatioThese two components are combined to express the ratio of directionalmovement to noise, called the Efficiency Ratio, ER:Efficiency_Ratio = direction/volatility
By dividing the directionality by the noise, the ratio varies from 0 to 1.When the market moves in the same direction for all n-days, then direction = volatility and Efficiency_Ratio = 1. If volatility increases for thesame price move, volatility gets larger and the ratio ER moves awayfrom 1. If prices go nowhere, then direction = 0 and ER = 0.
Smarter Trend-Following
141
This result is convenient as an exponential smoothing constant,which changes the trendline by a percentage each day. ER = 1 is equivalent to 100 percent, the fastest moving average, which should workbecause prices moved in one direction without a retracement. WhenER = 0, a very slow moving average is best to avoid getting stoppedout while the market goes nowhere.Step 4: Transforming the Ratio into the Trend SpeedThe ratio will be changed into a smoothing constant c, for use in anexponential moving average. By using this formula, the trend speedcan change each day by simply changing the smoothing constant. Itbecomes adaptive. The formula for this is@exp_ma - @exp_ma[1] + c x (price - @exp_ma[1])
which shows that the exponential moving average gets closer totoday's close by a percentage, c, of yesterday's gap. The constant crelates closely to the number of days in a standard moving average bythe relationship 2/(n - 1), where n is the number of days.Tests show that squaring the value of the smoothing constant greatly improves the results by virtually stopping the trendline from moving during a sideways market. This process selects very slow trendsduring sideways markets, and speeds up to a very fast trend (but not100%) during highly trending periods. The smoothing constant is thenfastest = 2/(N + 1) = 2/(2 + 1) = .6667slowest = 2/(N + 1) = 2/(30 + 1) = .0645smooth = ER x (fastest - slowest) + slowestc = smooth x smooth = smoothA2
Squaring smooth forces the value of c toward zero. This means thatslower moving averages will be used more often than fast ones. That isthe same as being more conservative when you are uncertain.AMA = AMA[1] + c x (price - AMA[1])
142
Using Old and New Trading Tools for Reasonable Objectives
Figure 8-5. Castrol chart. Three trends are shown: a standard 30-day movingaverage, a 30-day exponential, and the 10-day adaptive moving average. (Chartcourtesy TeleTrac.)
more noise relative to trend direction. The AMA trendline becomesnearly horizontal for this period (see Figure 8-6(a)), indicating a sideways period and allowing the system to hold its long position, or tostand aside, depending on your rules.During the months of October 1992 and June 1993, clear trends causethe AMA trendline to begin slowly, then increase its speed as the trenddevelops. In both cases, the Efficiency Ratio peaks over .80 (see Figure8-6(b)). The Efficiency Ratio may vary from 0 to .40 without the speed ofthe trendline changing by much. The period from March through May
Figure 8-6. Deutsche mark on TeleTrac. (a) Deutsche mark prices with AMAtrendline. (b) Efficiency ratio, (c) Moving average days corresponding to thechanging AMA smoothing constant. (Charts courtesy TeleTrac.)
Smarter Trend-Following
143
1993 shows a relatively noisy but low level for the Efficiency Ratio,resulting in a very slow trend for the AMA.Figure 8-6(c) shows the moving average days corresponding tothe smoothing constant. The days appear upside down relative to theEfficiency Ratio because the trendline slows as the days increase.The days also move in a more extreme manner than the Efficiency Ratio,remaining at its peak level (the program cuts the tops off at 40 days)longer but moving from fast to slow quickly. This is due to the squaringof the smoothing constant after all other calculations are done.
Trading RulesA basic trend-following system should not be confused with a completetrading strategy. There are no subtleties in the selection of entry and exittiming, nor are there special techniques for entering multiple positions,taking profits, or using other risk controls. Those features must be analyzed separately to maintain their integrity in a lateral solution. Toknow if one trend-following method is better than another, it is necessary to simply enter and hold a long position when the trendline movesup, and reverse to a short position when the trendline turns down.Basic Buy and Sell SignalsThe trading rules for the Adaptive Moving Average are:• Buy when the Adaptive Moving Average turns up.• Sell when the Adaptive Moving Average turns down.Because the trendline is the result of netting all the price moves, itshould represent the best evaluation of the trend. Therefore, the buyand sell signals are based on the direction of the trendline, rather thanthe price penetration of the trendline.When exponential smoothing is used, the trendline always turns upand down at the same time the price penetrates the line. The benefit ofusing the trendline for the Adaptive Moving Average signal is that theformula limits the amount of change in the trendline, making it easy toincrease reliability by using a small entry filter.A Filter for False SignalsA filter is needed for any trending system to avoid false signals causedby noise when prices are moving sideways. During a nondirectional
144
Using Old and New Trading Tools for Reasonable Objectives
period, prices will move back and forth through the smoothed trendlinevalue. This affects all moving average systems in the same way, but it ismore obvious with faster trends. The trendline must move higher orlower by the amount of the filter to qualify for a trading signal.The Adaptive Moving Average produces a very slow trend duringnoisy market periods. The 30-day maximum, or .0645 smoothing constant, becomes .0041 when squared, equivalent to a 486-day movingaverage. When prices move through the AMA, the trendline makes onlya very small change. Therefore, only a small filter is needed to avoidmost whipsaws.Self-Adjusting Filter. To be consistent with the adaptive nature of thesystem, the filter will be also get larger and smaller when prices becomemore or less volatile. To accomplish this, the filter is defined as a small percentage of the changes in the AMA trendline:filter = percentage x @std_dev(AMA - AMA[1],n)
where percentage is the percentage of 1 standard deviation,@std_dev(series,n) is the standard deviation of seriesover n periods, andAMA - is the 1-day change in the AMA trendline.The. smallest filter percentages of .01 can be used for faster trading,while the larger percentages of 1.0 select those trades that have had amore significant price move. Typically, forex and futures markets tradefaster, stock and interest rate markets trade slower. Normally, the filteris calculated over a period of 20 days.Adding the Filter to the Rules. Using the filter, the one-periodchange in the AMA trendline must be bigger or smaller than the filter sizeto get a buy or sell signal. This works well for selecting trades and eliminating false signals. One problem occurs, however, when the trendlinevery gradually changes direction. The change in the AMA trendline maynot be greater than the filter on the first or the second or the third day. Thatmay be good, because a slow trend change may reverse to be a continuation of the opposite trend direction. But if those small changes continue,the trend could have reversed without giving a new trading signal.If the new buy and sell signals are based on comparing the one-periodchanges in the AMA trendline with the filter, a signal could occurwell after the new trend begins. To eliminate this possibility, the mostrecent lowest and highest points on the AMA are recorded. Instead ofcomparing the one-period changes with the filter, the total change in theAMA since its recent high and low is compared against the filter.
145
Smarter Trend-Following
Low Pointof AMA
Figure 8-7. Filtering a slow trend change. Because a slowtrend change may result In a series of days which fall to penetrate the filter, the net change over 1 to 3 days Is substituted fora single day.
The first day of the trend change, marked " 1 " in Figure 8-7, is verysmall, therefore no buy signal occurs. The changes on days 2 and 3,taken separately, are also smaller than the filter. Instead, on day 2 thetotal change from the 2nd day of the trend change to the recent low iscompared with the filter, but that is still too small. A signal occurs onthe third day, when the total difference from the low is greater than thefilter, AMA(low + 3 days) > Filter.The new rules for trading signals areBuy when AMA - @lowest(AMA,n) > filterSell when @highest(AMA,n) - AMA > filter
When programming a computer, the sell signal may also be writtenSell when AMA - @highest(AMA,n) < -filter
Alternate Buy and Sell Rules. It is difficult to record the recent highand low trend points on some computers and programmable tradingmachines. A simple, practical substitute is to compare the last three accumulated trend changes against the filter to generate a buy or sell signal.
146
Using Old and New Trading Tools for Reasonable Objectives
This approach should work as well in all cases. For example,Buy when AMA - AMA[1] > filterorBuy when AMA - AMA[2] > filterorBuy when AMA - AMA[3] > filter
Testing the AMABefore using the Adaptive Moving Average, it will be necessary to testeach market. The following points should help:1. The primary parameter is the number of days used to calculate theEfficiency Ratio. This will be near 10 for the fast trader. Using a valuebelow 5 will cause the ratio to jump from 0 to 1 quickly. Using amuch larger value will cause the ratio to be more stable noise relationship that can be very attractive to the position trader.2. The filter value is expressed as a percentage of the standard deviation of the trend changes; therefore, it is independent of price.However, a larger or smaller filter percentage is used to change thelength of a trade. A small value allows an entry sooner, while a larger percentage will delay entry.3. The number of days in the standard deviation, which determines thefilter, could be fixed at 20. A statistical measure requires at least 20days to have some stability.Testing for short-term trading could fix the AMA days at 10 and thestandard deviation days at 20, and test only the filter. Fewer parametersmean a more dependable solution. Longer-term positions are not affected by the filter; therefore it can be fixed at some value under 1.0.Profit-Taking. Another look at Figure 8-6 shows that the EfficiencyRatio peaks over .80 (panel b) and the moving average days dropsunder 10 (in panel c) at points that would be good for taking profits. Itis a characteristic of the Adaptive Moving Average that a high value forthe Efficiency Ratio cannot be sustained and will be followed by areversal. It would be best simply to take profits whenever the valueexceeds a preset level. That threshold will vary based on the intrinsicnoise of the market.
Smarter Trend-Following
147
Programming the