I'm having some trouble understanding the simple moving average lines that can be added to a quote graph from Google finance. This related Stack Exchange question indicates that the only input parameters necessary to calculate a simple moving average are the period over which the averages will be calculated and the data points from which to calculate the averages. However, when I visit Google's pages and select a particular stock or index (for example, the NASDAQ Composite Index) and then view a simple moving average for, say, 20 days, the results seem to depend on the range for the horizontal axis of the graph.

For example, click here to view the NASDAQ Composite Index over the past year. Then, click "technicals" under the graph and add a simple moving average with the default period of 20 days. You'll notice that the index dips below the moving average at several intervals throughout 2013. However, if you then click the 5y link at the top of the graph to display the index and the SMA (Simple Moving Average) for the past 5 years, you'll notice that the index does not dip below the average during 2013. This seems incorrect, since the time period for both averages is the same, i.e. 20 days.

Is the average being calculated differently? This seems contradictory...

2 Answers 2


The difference is that for the one year time frame the data is represented based on daily data and the SMA is 20 days, whilst for the 5 year timeframe the data is automatically represented as weekly data with the SMA represented by 20 weeks not 20 days anymore.

This happens due to daily data on this chart being too much data to represent over a 5 year period so the data defaults to weekly data over such a long period. If the chart is represented as weekly data then any indicators will also have to be represented in weekly data.

If you use a more sophisticated charting program you can actually select to see daily or weekly data over longer periods such as 5 years or more.


I looked at this a little more closely but the answer Victor provided is essentially correct. The key to look at in the google finance graph is the red labled SMA(###d) would indicate the period units are d=days. If you change the time axis of the graph it will shift to SMA(###m) for period in minutes or SMA(###w) for period in weeks. Hope this clears things up!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .