**What Is Moving Average In Stock?**

Moving average (MA) is an analytical tool that provides price data by utilizing a continuously updated average price. The average is taken over a specific number of days, which could be in minutes, hours, days, weeks, months, or whatever fits the need making this a useful tool for short-term and long-term data analysis.

**Key Takeaways**

- A moving average (MA) is a popular analytical tool that filters out irregularities from random short-term fluctuations and determines trend direction.
- There are multiple ways to calculate a moving average, and it can utilize any timeframe.
- When the price of an investment crosses over the moving average, it’s a trading signal for technical traders.
- Even though moving averages are great as a standalone tool, they also form the foundation for other indicators, like the moving average convergence divergence, for example.
- A simple moving average (SMA) is calculated by taking the average of a set of prices over a specified time period.
- An exponential moving average (EMA) is an average weighted such that the more recent data is of greater import.

## What Is a Moving Average?

Image via Flickr by cafecredit

Investors calculate the moving average by creating several averages of different subsets of a full data set of previous prices, and they use the MA to identify and analzye the trends of various investment options. The moving average essentially creates a rolling average price and filters out the temporary fluctuations to reduce the impacts of random short-term changes on actual trends. Investors use this information to guide future buying and selling to maximize profitability.

There’s no way to predict exactly what will happen with a stock’s price, but a tool like the moving average can help make more accurate predictions. For example, a rising moving average would suggest the stock is trending upward, while a dropping moving average would be indicative of a downward trend.

## How an MA Works

Investors use a moving average to create more accurate price data by constantly updating the average price. The longer a time period used, the more the indicator will lag, or reflect the current price data. The more data points you utilize and the further you go back, the longer it will take for the MA to “catch up.” For example, a 200-day MA will have far more lag than a 20-day MA because you’re pulling prices further in the past.

Investors typically follow the 50-day and 200-day moving average calculations. Other standard time frames uses would be 15, 20, 30, and 100 days.

Which time frame you use depends on your objectives. If you’re engaging in short-term investments like day trading, for example, you’ll want to utilize a much smaller range, whereas, for an asset to be considered for long-term in your portfolio, you would use a larger range. There’s no one best time frame or any hard rules on which ones to apply. Experiment with various time frames to see which one gives you the best information as it pertains to your strategy.

Crossovers are another aspect involving the MA that investors can use. Crossovers are instances where a shorter-term (30-day) average crosses a longer-term (100-day) average when charted. If a short-term moving average goes above a longer-term moving average, this is considered a bullish crossover and indicates upward momentum. Conversely, when a short-term MA drops below a longer-term MA, that’s referred to as a bearish crossover and indicates downward momentum. When the crossover is substantial, investors tend to buy for short-term gain purposes.

## Types of Moving Averages

Simple moving average and exponential moving average are the two moving averages used most often by investors. Here’s what you need to know about each:

### Simple Moving Average (SMA)

The SMA is just a straight mean of the prices over a given time frame. Add up all the prices together, and then divide by the total number in the data set. If the market for a particular financial instrument is highly volatile or you need a long-term trend indicator, the SMA is a great calculation.

The number of prices you have depends on the time frame you choose. In general, the formula is:

**(Day 1 + Day 2 + Day 3 + Day 4 + …)/Time frame**

### Exponential Moving Average (EMA)

In an effort to make moving averages more responsive to more recent information, analysts developed the exponential moving average.

Here are the steps involved in calculating the EMA:

**Find the SMA.**Calculate the simple moving average of a certain time period in order to have a starting point.**Calculate the multiplier**. Analysts refer to this as the ‘smoothing factor.’ You use this smoothing factor to calculate the exponential moving average for each day by using the price, multiplier, and the previous EMA. The formula for this multiplier is**(2 / (Time Period + 1))**.**Calculate the EMA using previous steps’ information.**Use this formula to find the current EMA:**{Price at Close – EMA(previous day)} x multiplier + EMA(previous day).**

This allows the exponential moving average to give more weight to the most recent prices in contrast to the simple moving average, which gives all dates the same weight.

## Examples of Simple and Exponential Moving Averages

As you can see in the example below, the quantity of time periods used is identical, but the EMA shifts direction much more rapidly to changing prices than the SMA. It’s this responsiveness that leads most investors to favor the EMA over the SMA.

### Example of a Simple Moving Average

Let’s look at an example of calculating the SMA followed by the EMA with the following data points:

- Week 1 : 20, 22, 24, 25, 23
- Week 2 : 26, 28, 26, 29, 27
- Week 3 : 28, 30, 27, 29, 28

For a 10-day simple moving average, you would take the first ten prices and simply average them to get your first SMA. After that, you would drop the oldest price and add in the newest one.

**(Day 1 + Day 2 + Day 3 + Day 4 + …)/Time frame**

- The first data point would be the end of Week 2 averaging the previous 10 days:
- (20 + 22 + 24 + 25 + 23 + 26 + 28 + 26 + 29 + 27)/10 =
**25**

- (20 + 22 + 24 + 25 + 23 + 26 + 28 + 26 + 29 + 27)/10 =
- For day 11, just drop off the first data point (20) and add in the 11th-day data point (28)
- (22 + 24 + 25 + 23 + 26 + 28 + 26 + 29 + 27 + 28) / 10 =
**25.8**

- (22 + 24 + 25 + 23 + 26 + 28 + 26 + 29 + 27 + 28) / 10 =
- Drop day 2 and add day 12 to the average.
- (24 + 25 + 23 + 26 + 28 + 26 + 29 + 27 + 28 + 30) / 10 =
**26.6**day 12 SMA

- (24 + 25 + 23 + 26 + 28 + 26 + 29 + 27 + 28 + 30) / 10 =
- Drop day 3 and add day 13
- (25 + 23 + 26 + 28 + 26 + 29 + 27 + 28 + 30 + 27) / 10 =
**26.9**day 13 SMA

- (25 + 23 + 26 + 28 + 26 + 29 + 27 + 28 + 30 + 27) / 10 =
- Drop day 4 and add day 14
- (23 + 26 + 28 + 26 + 29 + 27 + 28 + 30 + 27 + 29) / 10 =
**27.3**day 14 SMA

- (23 + 26 + 28 + 26 + 29 + 27 + 28 + 30 + 27 + 29) / 10 =
- Finally drop day 5 and add day 15
- (26 + 28 + 26 + 29 + 27 + 28 + 30 + 27 + 29 + 28) / 10 =
**27.8**day 15 SMA

- (26 + 28 + 26 + 29 + 27 + 28 + 30 + 27 + 29 + 28) / 10 =
- And, on Day 15 the final simple moving average is 27.8.

### Example of Exponential Moving Average

**{Price at Close – EMA(previous day)} x multiplier + EMA(previous day)**

To begin finding the EMA, we start with the SMA at day 10, which was 25. Next, we find the multiplier for a 10-day moving average, which is 2 / (10+1) = 0.1818. Using these data points, we get the following breakdown:

- Day 11 EMA: (day 11 price – day 10 SMA) x multiplier + day 10 EMA
- (28 – 25) x 0.1818 + 25 =
**25.55**

- (28 – 25) x 0.1818 + 25 =
- Day 12: (day 12 price – day 11 EMA) x multiple + day 11 EMA
- (30 – 25.55) x 0.1818 + 25.55 =
**26.36**

- (30 – 25.55) x 0.1818 + 25.55 =
- Day 13:
- (27-26.36) x 0.1818 + 26.36 =
**26.48**

- (27-26.36) x 0.1818 + 26.36 =
- Day 14:
- (29 – 26.48) x 0.1818 + 26.48 =
**26.94**

- (29 – 26.48) x 0.1818 + 26.48 =
- Day 15:
- (28-26.94) x 0.1818 + 26.94 =
**27.13**

- (28-26.94) x 0.1818 + 26.94 =

Here are the values lined up for easy comparison:

- SMA: 25.00, 25.8, 26.60, 26.90, 27.30, 27.80
- EMA: 25.00, 25.55, 26.36, 26.48, 26.94, 27.13

As you can see, the EMA is much more responsive to recent price fluctuations than the SMA.

M oving averages are a great way to stabilize price data, giving you a good idea of the trends, as long as you have a solid understanding and know the shortcomings as well as the situations where it may not be the best option. Regardless of the type of moving average, the shorter-term ones will respond quickly to price changes. While this is often good, it can generate false trend indications. On the same note, you must correctly interpret the interaction between the moving average and price action.

A moving average by itself does not accurately depict a substantial deviation or correlation, but looking at crossovers is one way to accomplish that.