2. CMT LEVEL - I
Learning Objectives
ļ¼ Moving Averages Basics
ļ¼ Types of Moving Averages
- Simple Moving Averages (SMA)
- The Linearly Weighted Moving
Average (LWMA)
- The Exponentially Smoothed
Moving Average (EMA)
- Wilder Method
- Geometric Moving Average
(GMA)
- Triangular Moving Average (TMA)
- Kaufman adaptive moving
average (KAMA)
3. CMT LEVEL - I
Learning Objectives
ļ¼ Length of Moving Averages
ļ¼ Directional Movement
- Directional Movement
Indicators
ļ¼ Envelopes, Channels, and
Bands ?
- Percentage Envelopes
- Bollinger Band
- Keltner Band
- STARC Band
- Donchian channel
ļ¼ Trading Strategies Using
Bands and Envelopes
4. Length of Moving Averages
ā¢ Moving averages tone down these fluctuatuations
ā¢ Technical analysts use moving averages to smooth erratic data & identify true
underlying trend
ā¢ Moving Averages used is to smooth out shorter fluctuations and focus on the
trend
ā¢ A moving average by its nature is just one number that represents a net of
certain past numbers
5. Types of Moving Averages
Simple
Moving
Averages
Exponential
Moving
Averages
Wilder
Moving
Averages
Weighted
Averages
Triangular
Averages
KAMA
Averages
MAMA
Averages
FAMA
Averages
Geometric
Averages
6. Simple Moving Averages (SMA)
ā¢ A simple moving average is formed
by computing the average price of a
security over a specific number of
periods.
ā¢ Moving averages are based on
closing prices
ā¢ A Moving Average is an average
that moves. Old data is dropped as
new data comes available.
ā¢ Moving Averages can be used to
identify the direction of the trend or
define potential support and
resistance levels.
Calculation of SMA
7. Exponential Moving Averages (EMA)
ā¢ Exponential moving averages (EMAs)
reduce the lag by applying more weight to
recent prices.
ā¢ EMA's reduce the lag by applying more
weight to recent prices relative to older
prices.
ā¢ EMAās react quicker to recent price
changes than a simple moving average.
Calculation of EMA
First Step : Simple moving average for the
initial EMA value
Second Step : calculate the weighting
multiplier
Third Step : Exponential moving average for
each day between the initial EMA value and
today, using the price, the multiplier, and the
previous period's EMA value
8. Linear Weighted Averages
ā¢ A type of moving average that assigns a higher weighting to recent price data than
does the common simple moving average.
ā¢ This average is calculated by taking each of the closing prices over a given time
period and multiplying them by its certain position in the data series.
ā¢ Once the position of the time periods have been accounted for they are summed
together and divided by the sum of the number of time periods.
ā¢ For example, in a 15-day linearly-weighted moving average, today's closing price is
multiplied by 15, yesterday's by 14, and so on until day 1 in the period's range is
reached. These results are then added together and divided by the sum of the
multipliers (15 + 14 + 13 + ... + 3 + 2 + 1 = 120)
ā¢ The linearly weighted moving average was one of the first responses to placing a
greater importance on recent data.
ā¢ The popularity of this moving average has been diminished by the exponential
moving average, but none the less it still proves to be very useful.
9. Wilder Moving Averages
Welles Wilder (1978) used another simple method to calculate a moving
average that weights the most recent number more heavily.
The formula for calculating Wilder's moving average is as follows:
For example, a 14-day Wilder moving average would be equal to the previous
day's moving average figure times 13 (that is, n ā 1, where n is the number of
items to be averaged) plus the current closing price, all divided by 14 (that is, n )
Wilder's method of calculating a moving average should be used in the average
true range (ATR), the relative strength index (RSI), and the directional
movement indicator (DMI) calculations that he invented rather than the SMA or
EMA.
10. Geometric Moving Averages
ā¢ The geometric moving average (GMA) is used mostly in indexes.
ā¢ It is a simple moving average of the percent changes between the previous
bar and the current bar over some past predetermined period.
ā¢ Using percentages rather than points does not change its range or dimensions
like a price-based moving average.
ā¢ GMA has all the other problems of equal weight and lag.
11. Triangular Moving Averages
ā¢ Moving average of a moving average gives a doubly smoothed moving average
ā¢ Triangular moving average (TMA) begins with a simple moving average of a
predetermined number of bars and then, using those results, takes a moving
average of a length of half the original number of bars.
ā¢ An example would be a 20-day SMA of daily closes smoothed in a ten-day
SMA
ā¢ The result is a smoothed line that emphasizes the weight of the middle of the
price series.
ā¢ The benefit of this method is that it doubly Smoothes the data and, thus,
better represents the trend.
ā¢ However, the double smoothing also detracts from its sensitivity to trend
changes
12. Kaufman Adaptive Moving Averages (KAMA)
ā¢ Kaufman's Adaptive Moving Average (KAMA) is a moving average designed to
account for market noise or volatility.
ā¢ KAMA will closely follow prices when the price swings are relatively small and
the noise is low.
ā¢ KAMA will adjust when the price swings widen and follow prices from a
greater distance.
ā¢ This trend-following indicator can be used to identify the overall trend, time
turning points and filter price movements.
ā¢ To Calculate Kaufman's Adaptive Moving Average. Let's first start with the
settings recommended by Perry Kaufman: KAMA(10,2,30).
ā¢ 10 is the number of periods for the Efficiency Ratio (ER).
ā¢ 2 is the number of periods for the fastest EMA constant.
ā¢ 30 is the number of periods for the slowest EMA constant.
13. Kaufman Adaptive Moving Averages (KAMA)
ā¢ Efficiency Ratio
ā¢ ER is basically the price change adjusted for the daily volatility.
ā¢ The Efficiency Ratio tells us the fractal efficiency of price changes.
ā¢ ER fluctuates between 1 and 0,
ā¢ ER would be 1 if prices moved up 10 consecutive periods or down 10
consecutive periods
ā¢ ER would be zero if price is unchanged over the 10 periods
14. Kaufman Adaptive Moving Averages (KAMA)
ā¢ Smoothing Constant (SC)
ā¢ The smoothing constant uses the ER and two smoothing constants based on an exponential
moving average.
ā¢ (2/30+1) is the smoothing constant for a 30-period EMA.
ā¢ The Fastest SC is the smoothing constant for shorter EMA (2-periods)
ā¢ The slowest SC is the smoothing constant for the slowest EMA (30-periods).
ā¢ Note that the ā2ā at the end is to square the equation.
ā¢ KAMA
ā¢ With the Efficiency Ratio (ER) and Smoothing Constant (SC), we are now ready to calculate
Kaufman's Adaptive Moving Average (KAMA)
17. MESA Moving Averages
ā¢ Developed by John Ehlers, the MESA Adaptive Moving Average is a technical trend-
following indicator which, according to its creator, adapts to price movement ābased on the
rate change of phase as measured by the Hilbert Transform Discriminatorā.
ā¢ This method of adaptation features a fast and a slow moving average so that the composite
moving average swiftly responds to price changes and holds the average value until the
next barās close.
ā¢ Ehlers states that because the averageās fallback is slow, you can create trading systems with
almost whipsaw-free trades.
ā¢ It produces two outputs, MAMA and FAMA. FAMA (Following Adaptive Moving Average) is a
result of MAMA being applied to the first MAMA line.
ā¢ The FAMA is synchronized in time with MAMA, but its vertical movement comes with a lag.
ā¢ Thus, the two donāt cross unless a major change in market direction occurs, resulting in a
moving average crossover system which is āvirtually free of whipsaw tradesā, according to
Ehlers.
18. MESA Moving Averages
ā¢ First, they act as strong support and resistance areas and the price will tend to
rebound from them upon contact. This makes pullbacks to the MAMA and FAMA
suitable with-trend entry areas.
ā¢ Second, crossovers between the MAMA and FAMA, resembling a golden or death
cross, are also widely traded. When the MAMA crosses the FAMA from below and
edges higher, this means that the market will likely continue to move up, generating
a buy signal. Conversely, when the MAMA crosses the FAMA from above and edges
lower, it implies the market is edging lower and will most likely continue to do so,
thus generating a short entry signal.
ā¢ The MESA Adaptive Moving Average, just like traditional moving averages, can be
used as a stand-alone indicator, but also in conjunction with other indicators, which
are typically combined with SMA and EMAs in order to improve your decision-
making
20. Fractal Adaptive Moving Averages(FAMA)
ā¢ Fractal Adaptive Moving Average (FAMA) was authored by John Ehlers.
ā¢ The FAMA averages the differences of highest highs and lowest lows over
different parts of the period length.
ā¢ The user may change the input (midpoint) and period length.
ā¢ Fractal Adaptive Moving Average is a trend indicator and may be used in
conjunction with other studies. No trading signals are calculated.
ā¢ The advantage of FRAMA is the possibility to follow strong trend movements
and to sufficiently slow down at the moments of price consolidation.
21. Concept of Directional Movement
ā¢ Concept of trend and direction is the concept of directional movement that
Welles Wilder (1978) developed in his book New Concepts in Technical Trading
Systems.
ā¢ Wilder compared a stock's trading range for one day with the trading range
on the previous day to measure trend.
ā¢ Positive directional movement occurred when the high for a day exceeded the
high of the previous day.
ā¢ The amount of positive directional movement (+DM) is the day's high minus
the previous day's high, or the vertical distance between the top of the two
bars.
ā¢ If the low for the day is less than the previous day's low, negative directional
movement occurs. The value of the negative directional movement (āDM) is
the difference between the two lows.
23. Constructing Directional Movement Indicators
ā¢ A moving average is calculated for both +DM and āDM, usually over 14 days,
using the Wilder method of averaging.
ā¢ In addition, a 14-day average trading range (ATR) is calculated. Two indicators
are calculated using this data.
ā¢ The positive directional movement indicator (DI+) is the ratio between the
smoothed +DM and the TR; this calculation gives the percentage of the true
range that was above equilibrium for those 14 days.
ā¢ The second indicator is the negative directional movement indicator (DIā),
which is calculated as the ratio between the smoothed āDM and the ATR.
24. Average True Range (ATR)
ā¢ Average True Range (ATR) is an indicator that measures volatility.
ā¢ A volatility formula based only on the high-low range would fail to capture
volatility from gap or limit moves.
ā¢ Wilder created Average True Range to capture this āmissingā volatility.
ā¢ It is important to remember that ATR does not provide an indication of price
direction, just volatility.
ā¢ Wilder designed ATR with commodities and daily prices in mind. Commodities
are frequently more volatile than stocks.
25. True Range (ATR)
ā¢ Wilder started with a concept called True Range (TR), which is defined as the
greatest of the following:
Method 1: Current High less the current Low
Method 2: Current High less the previous Close (absolute value)
Method 3: Current Low less the previous Close (absolute value)
ā¢ Absolute values are used to ensure positive numbers. After all, Wilder was
interested in measuring the distance between two points, not the direction.
ā¢ If the current period's high is above the prior period's high and the low is
below the prior period's low, then the current period's high-low range will be
used as the True Range.
ā¢ Methods 2 and 3 are used when there is a gap or an inside day (Directional
Movement)
26. True Range (ATR)
ā¢ Example A: A small high/low range
formed after a gap up. The TR equals the
absolute value of the difference between
the current high and the previous close.
ā¢ Example B: A small high/low range
formed after a gap down. The TR equals
the absolute value of the difference
between the current low and the
previous close.
ā¢ Example C: Even though the current close
is within the previous high/low range, the
current high/low range is quite small. In
fact, it is smaller than the absolute value
of the difference between the current
high and the previous close, which is
used to value the TR.
27. Calculation of ATR
ā¢ Average True Range (ATR) is based on 14
periods and can be calculated on an intraday,
daily, weekly or monthly basis.
ā¢ the first TR value is simply the High minus the
Low, and the first 14-day ATR is the average of
the daily TR values for the last 14 days.
ā¢ IN the excel sheet first True Range value (.91)
equals the High minus the Low (yellow cells).
The first 14-day ATR value (.56)) was
calculated by finding the average of the first
14 True Range values (blue cell). Subsequent
ATR values were smoothed using the formula
above.
29. Conclusion ATR
ā¢ ATR is not a directional indicator, such as MACD or RSI.
ā¢ ATR is a unique volatility indicator that reflects the degree of interest or
disinterest in a move.
ā¢ Strong moves, in either direction, are often accompanied by large ranges, or
large True Ranges. This is especially true at the beginning of a move.
ā¢ ATR can be used to validate the enthusiasm behind a move or breakout.
ā¢ A bullish reversal with an increase in ATR would show strong buying pressure
and reinforce the reversal.
ā¢ A bearish support break with an increase in ATR would show strong selling
pressure and reinforce the support break.
ā¢ Calculate back at least 250 periods (typically much further), to ensure a much
greater degree of accuracy for our ATR values.
30. Directional Movement Indicators (ADX)
ā¢ The Average Directional Index (ADX), Minus Directional Indicator (-DI) and
Plus Directional Indicator (+DI) represent a group of directional movement
indicators that form a trading system developed by Welles Wilder.
ā¢ Positive and negative directional movement form the backbone of the
Directional Movement System.
ā¢ Wilder determined directional movement by comparing the difference
between two consecutive lows with the difference between their respective
highs.
ā¢ The Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI) are
derived from smoothed averages of these differences, and measure trend
direction over time.
31. Directional Movement Indicators (ADX)
ā¢ These two indicators are often referred to collectively as the Directional
Movement Indicator (DMI).
ā¢ The Average Directional Index (ADX) is in turn derived from the smoothed
averages of the difference between +DI and -DI, and measures the strength of
the trend (regardless of direction) over time.
ā¢ Using these three indicators together, chartists can determine both the
direction and strength of the trend.
32. Calculation (ADX)
ā¢ Directional movement is positive (plus)
when the current high minus the prior high
is greater than the prior low minus the
current low. This so-called Plus Directional
Movement (+DM) then equals the current
high minus the prior high, provided it is
positive. A negative value would simply be
entered as zero.
ā¢ Directional movement is negative (minus)
when the prior low minus the current low is
greater than the current high minus the
prior high. This so-called Minus Directional
Movement (-DM) equals the prior low
minus the current low, provided it is
positive. A negative value would simply be
entered as zero.
33. Calculation (ADX)
ā¢ Calculate the True Range (TR), Plus Directional Movement (+DM) and Minus Directional Movement
(-DM) for each period.
ā¢ Divide the 14-day smoothed Plus Directional Movement (+DM) by the 14-day smoothed True Range
to find the 14-day Plus Directional Indicator (+DI14). Multiply by 100 to move the decimal point two
places. This +DI14 is the green Plus Directional Indicator line (+DI) that is plotted along with the ADX
line.
ā¢ Divide the 14-day smoothed Minus Directional Movement (-DM) by the 14-day smoothed True
Range to find the 14-day Minus Directional Indicator (-DI14). Multiply by 100 to move the decimal
point two places. This -DI14 is the red Minus Directional Indicator line (-DI) that is plotted along with
the ADX line.
ā¢ The Directional Movement Index (DX) equals the absolute value of +DI14 less -DI14 divided by the
sum of +DI14 and -DI14. Multiply the result by 100 to move the decimal point over two places.
ā¢ After all these steps, it is time to calculate the Average Directional Index (ADX) line. The first ADX
value is simply a 14-day average of DX. Subsequent ADX values are smoothed by multiplying the
previous 14-day ADX value by 13, adding the most recent DX value, and dividing this total by 14
35. Interpretation (ADX)
ā¢ The Average Directional Index (ADX) is used to measure the strength or
weakness of a trend, not the actual direction.
ā¢ Directional movement is defined by +DI and -DI. In general, the bulls have the
edge when +DI is greater than -DI, while the bears have the edge when -DI is
greater.
ā¢ Crosses of these directional indicators can be combined with ADX for a
complete trading system.
ā¢ Stocks have price characteristics similar to commodities, which tend to be
more volatile with short and strong trends.
ā¢ Stocks with low volatility may not generate signals based on Wilder's
parameters.
36. Interpretation (ADX)
ā¢ Average Directional Index (ADX) can be used to determine if a security is
trending or not.
ā¢ This determination helps traders choose between a trend-following system or
a non-trend-following system.
ā¢ Wilder suggests that a strong trend is present when ADX is above 25 to 40.
ā¢ No trend is present when below 20.
ā¢ Exhaust of trend above 40 .
ā¢ ADX at Zero means market at its peak consolidation time.
40. Envelope
ā¢ Moving Average Envelopes are percentage-based envelopes set above and
below a moving average.
ā¢ The moving average, which forms the base for this indicator, can be a simple
or exponential moving average.
ā¢ Each envelope is then set the same percentage above or below the moving
average. This creates parallel bands that follow price action.
ā¢ Moving Average Envelopes can be used as a trend following indicator.
However, this indicator is not limited to just trend following.
ā¢ The envelopes can also be used to identify overbought and oversold levels
when the trend is relatively flat.
41. Calculations - Envelope
ā¢ Calculation for Moving Average Envelopes is straight-forward.
ā¢ First, choose a simple moving average or exponential moving average.
ā¢ Simple moving averages weight each data point (price) equally.
ā¢ Exponential moving averages put more weight on recent prices and have less
lag.
ā¢ Second, select the number of time periods for the moving average. Third, set
the percentage for the envelopes.
ā¢ A 20-day moving average with a 2.5% envelope would show the following two
lines
43. Interpretation - Envelope
ā¢ Moving Average Envelopes are a natural trend following indicator. As with
moving averages, the envelopes will lag price action.
ā¢ The direction of the moving average dictates the direction of the channel.
ā¢ In general, a downtrend is present when the channel moves lower, while an
uptrend exists when the channel moves higher. The trend is flat when the
channel moves sideways.
ā¢ A strong trend does not take hold after an envelope break and prices move
into a trading range.
ā¢ The envelopes can then be used to identify overbought and oversold levels for
trading purposes.
ā¢ A move above the upper envelope denotes an overbought situation, while a
move below the lower envelope marks an oversold condition.
44. Parameter - Envelope
ā¢ The parameters for the Moving Average
Envelopes depend on your trading/investing
objectives and the characteristics of the
security involved.
ā¢ Traders will likely use shorter (faster) moving
averages and relatively tight envelopes.
Investors will likely prefer longer (slower)
moving averages with wider envelopes.
ā¢ A security's volatility will also influence the
parameters. Bollinger Bands and Keltner
Channels have built-in mechanisms that
automatically adjust to a security's volatility.
Bollinger Bands use the standard deviation
to set bandwidth. Keltner Channels use the
Average True Range (ATR) to set channel
width.
46. Band Bollinger
ā¢ Developed by John Bollinger, Bollinger BandsĀ® are volatility bands placed
above and below a moving average.
ā¢ Volatility is based on the standard deviation, which changes as volatility
increases and decreases.
ā¢ The bands automatically widen when volatility increases and narrow when
volatility decreases.
ā¢ This dynamic nature of Bollinger Bands also means they can be used on
different securities with the standard settings.
ā¢ For signals, Bollinger Bands can be used to identify M-Tops and W-Bottoms or
to determine the strength of the trend.
48. Basic Rules - Band Bollinger
ā¢ 1. Bollinger Bands provide a relative definition of high and low
ā¢ 2. That relative definition can be used to compare price action and indicator
action to arrive at rigorous buy and sell decisions.
ā¢ 3. Appropriate indicators can be derived from momentum, volume, sentiment,
open interest, intermarket data, etc.
ā¢ 4. Volatility and trend already have been deployed in the construction of
Bollinger Bands, so their use for confirmation of price action is not
recommended.
ā¢ 5. The indicators used for confirmation should not be directly related to one
another. Two indicators from the same category do not increase confirmation.
Avoid collinearity
49. Basic Rules - Band Bollinger
ā¢ 6. Bollinger Bands can be used to clarify pure price patterns such as M-type
tops and W-type bottoms, momentum shifts, etc.
ā¢ 7. Price can, and does, walk up the upper Bollinger Band and down the lower
Bollinger Band.
ā¢ 8. Closes outside the Bollinger Bands can be continuation signals, not reversal
signals-as is demonstrated by the use of Bollinger Bands in some very
successful volatility-break- out systems.
ā¢ 9. The default parameter of 20 periods for calculating the moving average and
standard deviation and the default parameter of 2 standard deviations for the
Bandwidth are just that, defaults. The actual parameters needed for any given
market or task may be different.
ā¢ 10. The average deployed should not be the best one for crossover signals.
Rather, it should be descriptive of the intermediate-term trend.
50. Basic Rules - Band Bollinger
ā¢ 11. If the average is lengthened, the number of standard deviations needs to be
increased simultaneously-from 2 at 20 periods to 2.1 at 50 periods. Likewise, if the
average is shortened, the number of standard deviations should be reduced-from 2
at 20 periods to 1.9 at 10 periods.
ā¢ 12. Bollinger Bands are based upon a simple moving average. This is because a
simple moving average is used in the standard deviation calculation and we wish to
be logically consistent.
ā¢ 13. Be careful about making statistical assumptions based on the use of the standard
deviation calculation in the construction of the bands. The sample size in most
deployments of Bollinger Bands is too small for statistical significance, and the
distributions involved are rarely normal.
ā¢ 14.Indicators can be normalized with %b, eliminating fixed thresholds in the process.
ā¢ 15. Finally, tags of the bands are just that-tags, not signals. A tag of the upper
Bollinger Band is not in and of itself a sell signal. A tag of the lower Bollinger Band is
not in and of itself a buy signal.
51. Keltner Band
ā¢ To construct these bands, first calculate the āTypical Priceā (Close + High +
Low) Ć· 3, and calculate a ten-day SMA of the typical price.
ā¢ Next, calculate the band size by creating a ten-day SMA of High minus Low or
bar range.
ā¢ The upper band is then plotted as the ten-day SMA of the typical price plus
the ten-day SMA of bar range.
ā¢ The lower band is plotted as the ten-day SMA to the typical price minus the
ten-day SMA of bar range. (When the calculation is rearranged, it is similar to
the use of an ATR. These bands are sometimes referred to as ATR bands.
ā¢ Keltner's original calculation used ten-day moving averages, many analysts
using this method have extended the moving averages to 20 periods. The 20-
period calculation is more in line with the calculation for a Bollinger Band.
52. STARC Band
ā¢ STARC is an acronym for Stoller Average Range Channel, invented by Manning
Stoller.
ā¢ This system uses the ATR over five periods added to and subtracted from a
five-period SMA of prices.
ā¢ It produces a band about prices that widens and shrinks with changes in the
ATR or the volatility of the price.
ā¢ Just as with the Keltner Bands, the length of the SMA used with STARC can be
adjusted to different trading or investing time horizons.
53. Donchian channel
ā¢ Signals occur with the Donchian channel when
the breaking above or below a high or low over
some past period occurs
ā¢ This method does not require the construction of
a trend line; the only requirement is a record of
the highs and lows over some past period.
ā¢ Donchian channel method, the period was four
weeks (20 days), and the rule was to buy when
the price exceeded the highest level over the past
four weeks and sell short when the price declined
below the lowest low over the past four weeks.
ā¢ Such systems are usually āstop and reverseā
systems that are always in the market, either long
or short. As is likely imagined, the channel
systems are more commonly used in the
commodities markets where long and short
positions are effortless and prices tend to trend
much longer.