Professional Documents
Culture Documents
Part 4A. Moving Average
Part 4A. Moving Average
Part 4A. Moving Average
Moving Average
ECON 3140B
Financial Data Analysis
Spring 2020
1
Introduction
⚫ Chart analysis is largely subjective and
difficult to test
⚫ Technical indicators are more objective
⚫ Moving average is one of the most widely
used of all technical indicators
⚫ Easily quantified and tested
3
Moving Averages: Overview
⚫ MA can be used to identify the direction of
the trend or define potential support and
resistance levels
⚫ MA form the building blocks for many other
technical indicators and overlays, such
as Bollinger Bands and MACD
4
Types of Moving Averages
⚫ Simple Moving Average (SMA)
⚫ Weighted Moving Average (WMA)
⚫ Exponential Moving Average (EMA)
5
Simple Moving Average (SMA)
SMA = (C1 + C2 + … + Cn)/ n
⚫ A simple moving average (SMA) is formed by
computing the average price of a security
over a specific number of periods
⚫ Most moving averages are based on closing
prices
⚫ A 10-day simple moving average is the sum
of 10 days’ closing prices divided by 10
6
SMA: Numerical Example
Time Close SMA
Day 1 10 --
Day 2 8 --
Day 3 7 --
Day 4 7.5 Start Here
Day 5 6
Day 6 9
Day 7 10
Day 8 11
7
SMA: Numerical Example
⚫ Suppose you want to find out the 4-day SMA
of this stock
⚫ 4-day SMA in Day 4
= (8 + 7 + 7.5 + 6) / 4 = 7.125
⚫ 4-day SMA in Day 6
= (7 + 7.5 + 6 + 9) / 4 = 7.375
8
SMA: Numerical Example
Time Close SMA
Day 1 10 --
Day 2 8 --
Day 3 7 --
Day 4 7.5 8.125
Day 5 6 7.125
Day 6 9 7.375
Day 7 10 8.125
Day 8 11 9
9
Simple Moving Average (SMA)
⚫ As its name implies, a moving average is
an average that moves
⚫ Old data is dropped as new data comes
available
⚫ This causes the average to move along the
time scale
⚫ Q: By observing the 4-day SMA in this
example, what can you tell about the price
trend?
10
Calculating SMA By Using
Excel Spreadsheet
11
Weighted Moving Average
(WMA)
1 * C1 + 2 * C2 + … + n *Cn
WMA =
1+2+…+n
⚫ With the same logic to smooth price data and
identify the direction of the trend, WMA place
more weight on more recent data
⚫ The WMA is considered more responsive to
recent market activity than the SMA 12
WMA: Numerical Example
Time Close WMA
Day 1 10 --
Day 2 8 --
Day 3 7 --
Day 4 7.5 Start Here
Day 5 6
Day 6 9
Day 7 10
Day 8 11
13
WMA: Numerical Example
⚫ Suppose you want to find out the 4-day WMA
of this stock
⚫ 4-day WMA in Day 4
16
Exponential Moving Average
(EMA)
EMAt = (1 – SF) * EMAt-1 + SF * Ct
⚫ while SF = Smoothing Factor = 2 / (n+1)
19
EMA: Numerical Example
EMAt = (1 – SF) * EMAt-1 + SF * Ct
20
EMA: Numerical Example
⚫ 4-day EMA in Day 3, EMA3
= (1 – 0.4) * EMA2 + 0.4*C3
= 0.6 * 9.2 + 0.4* 7
= 8.32
⚫ 4-day EMA in Day 4, EMA4
23
Types of Moving Averages:
Comments
⚫ SMA is the most popular type of MA
⚫ EMA have less lag and are therefore more
sensitive/ responds quicker to recent prices
changes than WMA and SMA
⚫ We will use EMA when we calculate
Moving Average Convergence/ Divergence
(MACD)
24
Trend Identification
⚫ The direction of the moving average conveys
important information about prices
⚫ A rising MA shows that prices are generally
increasing (uptrend)
⚫ A falling MA indicates that prices, on average
are falling (downtrend)
25
Trend Identification Example
26
Trend Identification Example
27
Lengths of MA Period
⚫ The length of the moving average period
depends on the analytical objectives
⚫ Some are more popular than others
⚫ Short-term trend: 10-day and 20-day MA
29
MA as Support in Uptrend
Breakout
30
MA as Resistance in Downtrend
Breakout
31
Double Crossovers
⚫ Two moving averages can be used together to
generate crossover signals
⚫ Double crossovers involve one relatively short-
term MA and one relatively long-term MA
⚫ Popular combinations
⚫ 10-day MA and 50-day MA
32
Double Crossovers
⚫ If the shorter period MA crosses over the
longer period MA from below to above, then it
is considered bullish and a buy opportunity
⚫ Golden Cross 黃金交叉
33
Golden Cross + Death Cross
Death
Cross
Golden Cross
34
Generating Double Crossovers
Signal By Using Excel
35
Sorting of Moving Averages:
Analytical Tool For Sentiment
Strong Uptrend
⚫ When current price is decisively higher than
all moving averages, and,
⚫ Short-term MA is decisively higher than
medium-term MA, and,
⚫ Medium-term MA is decisively higher than
long-term MA
36
37
Sorting of Moving Averages:
Analytical Tool For Sentiment
Before/ Waiting For Breakout
⚫ When short-term MA, medium-term MA and
long-term MA are very close to each other,
and,
⚫ When current price is in between the clusters
of those moving averages
38
Sorting of Moving Averages:
Analytical Tool For Sentiment
Strong Downtrend
⚫ When current price is decisively lower than all
moving averages, and,
⚫ Short-term MA is decisively lower than
medium-term MA, and,
⚫ Medium-term MA is decisively lower than
long-term MA
39
40
Final Say on Moving Average
⚫ The direction of the moving average conveys
important information about price trend
⚫ Double crossovers generate good trading
signal
⚫ Sorting of moving averages give you ideas
about the market sentiment
41
Final Say on Moving Average
⚫ However, moving averages are lagging
indicators: give late signals
⚫ Don’t expect to sell at the top and buy at
the bottom using moving averages
⚫ As with most tools, moving averages should
be used in conjunction with other tools
⚫ e.g. Use moving averages to define the
overall trend and then use RSI to
define overbought or oversold levels
42