190 likes | 850 Views
Moving Average. What is Moving Average?. Moving averages - popular tools Low-pass filter data series spot trends. The two most popular moving averages Are SMA and EMA. Simple Moving Average (SMA) Exponential Moving Average (EMA). SMA (Simple Moving Average). Ex: 5 data point window
E N D
What is Moving Average? • Moving averages - popular tools • Low-pass filter data series • spot trends
The two most popularmoving averagesAre SMA and EMA. • Simple Moving Average (SMA) • Exponential Moving Average (EMA)
SMA (Simple Moving Average) • Ex: 5 data point window • 10+11+12+13+14 = 60 • SMA = 60/5 = 12 Then next data (6th data) coming) • 11+12+13+14+15 = 65 • SMA =65/5 =13
Weighted Moving Average More recent values have A higher weight P1 is most recent
Denominator • Denominator is a series that comes to (N**2 + N) / 2
Exponential Moving Average (EMA) • reactsfasterthan SMA • Lower lag than SMA • recent data has more weight The most used MAs are:SMA(10) SMA(50) SMA(100)SMA(200) EMA(20)
Formula for EMA • period-based EMA, "Multiplier" is equal to 2 / (1 + N) where N is the specified number of periods. • For 10-period EMA Multiplier is
Example of EMA • For the first period's EMA, the simple moving average was used as the previous period's exponential moving average (yellow highlight for the 10th period). • From period 11 onwards, the previous period's EMA was used. The calculation in period 11 breaks down as follows: • (C - P) = (61.33 - 63.682) = -2.352 • (C - P) x K = -2.352 x .181818 = -0.4276 • ((C - P) x K) + P = -0.4276 + 63.682 = 63.254