Related Posts Plugin for WordPress, Blogger...

Sunday, August 25, 2013

What is Simple moving average: How to calculate SMA

As the name indicates Simple moving average (SMA) is the simplest form of all the moving averages. It is the unweighted mean of the previous 'n' data points.
 In stock market SMA is simply calculated by taking the mean (average) of a security over a specified number of days. One can calculate moving averages from open, high, low or close prices. But in most cases, close prices are used to calculate SMA.
 If you want to calculate a seven day simple moving average of a security, add the previous seven day closing prices and divide it by seven (mean or average of last seven days). You can't calculate simple moving average if you don't have last seven days closing price.
 An example of a seven day moving average is given below
 

Day Close 7 Day SMA
1 58
2 64
3 62
4 60
5 63
6 65
7 65 62.43
8 67 63.71
9 68 64.29
10 67 65.00
11 66 65.86
12 64 66.00
13 65 66.00
14 67 66.29
15 69 66.57
16 70 66.86
17 67 66.86
18 65 66.71
19 62 66.43
20 63 66.14
21 66 66.00
22 68 65.86
23 71 66.00
24 69 66.29
25 70 67.00

 You can also calculate simple moving average of 'n' days using the following formula.

 Suppose  previous 'n' day closing prices are  p_M, p_{M-1},\dots,p_{M-(n-1)}

 Then Simple moving average

\textit{SMA} = { p_M + p_{M-1} + \cdots + p_{M-(n-1)} \over n }

In order to calculate simple moving average in a row (for successive values) use the following formula

 \textit{SMA}_\mathrm{today} = \textit{SMA}_\mathrm{yesterday} - {p_{M-n} \over n} + {p_{M} \over n} 

For short term trading most people use 5, 10, 20 and 50 SMA. For long term 100, 200 SMA's are considered as important.

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.