Question

Does the calculation of a Simple Moving Average include the current price in the average? e.g. If the prices are {1, 2, 3, 4, 5}, does the 3-day SMA look like {-, -, 2, 3, 4}, or {-, -, -, 2, 3}?

Was it helpful?

Solution

The question is not quite 'right'. The SMA calculates the average over a number of past periods, and therefore the position of those periods relative to the person doing the calculating is relevant. If you are calculating, say, the SMA of the Dow Jones closing number for the last five trading days, it's relevant when you do that calculation. By convention, you do not include the measure on the day (period) that you do the calculation, so that other people can generate the same number as you without having to work out whether you included the very latest value or not.

For example, it's 5pm on Friday 19th and I want the 5d SMA of the Dow, I could calculate M (15th),T, W, Th and Fr 19th. Or I could calculate using Fr (12th), M 15th, Tu, W and end Th 18th. Conventional choice would be to do the latter so that people don't have to wonder if you stayed around til after market close on Friday 19th or left to go bowling.

Of course, in the long run it does not matter at all, since a set of SMAs ultimately takes all values into account over time.

See http://www.mbtrading.com/help/navpro/Simple_and_Exponential_Moving_Average.htm for more.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top