Simple Moving Average
A moving average is primarily used as an indicator to gauge the momentum and trend for a stock, bond, commodity, or currency.
A moving average is based on the average price of the security over a given time frame.
The simple moving average or SMA is calculated by adding the closing price of the security for a specified time period and then dividing it by that number of periods.
The closing prices of Tesla over the last five trading days has been:
315.23, 310.42, 315.73, 323.66, 322.31.
The sum of the stock prices over those five trading days is: 1,587.35
Take that sum and divide it by the number of trading days, in this case five.
1587.35/5 = 317.47
The average price of Tesla over the last five trading days has been 317.47.
The problem with using such a small sample size is that an outlier can easily influence the average. For example, Bill Gates is reportedly worth more than $88B, imagine if he was grouped with four individuals whose net worth was zero. The average income of those five individuals would be $17.6B.
That said, popular moving averages traders follow are the 20, 50, 100, and 200-day time periods.
Exponential Moving Average
A moving averages is a lagging indicators. One attempt to reduce that lag is by applying a higher weight on the most recent prices. This type of moving average is known as the exponential moving average (EMA).
Here is the formula over a ten-day period.
Initial simple moving average: 10-day sum/10
Multiplier: (2/(10 + 1) = 0.1818
EMA: (Close – EMA(previous day)) x multiplier + EMA (previous day)).
How Traders Use Moving Averages
Now, the above chart is of the SPDR S&P 500 ETF (NYSE: SPY), notice that the trend has been up until recently. The lines on the chart are the 20, 50, 100, and 200-day moving averages.
Traders use moving averages to try to identify the current trend, as well as possible levels of support and resistance. In addition, they’ll use them to identify if the momentum is bullish or bearish.
Moving averages are used by many traders and even some investors. Even if you don’t believe in technical analysis they are worth watching. For example, if you have an idea of what levels traders might dump a stock or start supporting it that might help in your decision making process.