## What is a Moving Average?

A moving average is a technical indicator that market analysts and investors may use to determine the direction of a trend. It sums up the data points of a financial security over a specific time period and divides the total by the number of data points to arrive at an average. It is called a “moving” average because it is continually recalculated based on the latest price data.

Analysts use the moving average to examine support and resistance by evaluating the movements of an asset’s price. A moving average reflects the previous price action/movement of a security. Analysts or investors then use the information to determine the potential direction of the asset price. It is known as a lagging indicator because it trails the price action of the underlying asset to produce a signal or show the direction of a given trend.

**Summary**

**A moving average is a technical indicator that investors and traders use to determine the trend direction of securities.****It is calculated by adding up all the data points during a specific period and dividing the sum by the number of time periods.****Moving averages help technical traders to generate trading signals.**

### Types of Moving Averages

The following are the two basic forms of moving averages:

#### 1. Simple Moving Average (SMA)

The simple moving average (SMA) is a straightforward technical indicator that is obtained by summing the recent data points in a given set and dividing the total by the number of time periods. Traders use the SMA indicator to generate signals on when to enter or exit a market. An SMA is backward-looking, as it relies on the past price data for a given period. It can be computed for different types of prices, i.e., high, low, open, and close.

In financial markets, analysts and investors use the SMA indicator to determine buy and sell signals for securities. The SMA helps to identify support and resistance prices to obtain signals on where to enter or exit a trade.

When generating the SMA, traders must first calculate this average by adding prices over a given period and dividing the total by the total number of periods. The information is then plotted on a graph.

The formula for Simple Moving Average is written as follows:

##### SMA = (A_{1 }+ A_{2 }+ ……….A_{n}) / n

Where:

**A**is the average in period n**n**is the number of periods

**Example of a Simple Moving Average**

John, a stock trader, wants to calculate the simple moving average for Stock ABC by looking at the closing prices of the stock for the last five days. The closing prices for Stock ABC for the last five days are as follows: $23, $23.40, $23.20, $24, and $25.50. The SMA is then calculated as follows:

SMA = ($23 + $23.40 + $23.20 + $24 + $25.50) / 5

**SMA = $23.82**

#### 2. Exponential Moving Average (EMA)

The other type of moving average is the exponential moving average (EMA), which gives more weight to the most recent price points to make it more responsive to recent data points. An exponential moving average tends to be more responsive to recent price changes, as compared to the simple moving average which applies equal weight to all price changes in the given period.

When calculating the exponential moving average, the following three steps are used:

**1. Calculate the simple moving average for the period**

The EMA needs to start somewhere, and the simple moving average is used as the previous period’s EMA. It is obtained by taking the sum of the security’s closing prices for the period in question and dividing the total by the number of periods.

**2. Calculate the multiplier for weighting the exponential moving average**

The formula for calculating the multiplier is as follows:

##### Multiplier = [2 / (Selected Time Period + 1)]

For example, if the time period in question is 10, the multiplier will be calculated as follows:

**Multiplier** **= [2 / (10+1)] =** **0.1818**

**3. The last step is to calculate the current exponential moving average**

The last step calculates the current EMA by taking the period from the initial EMA until the most recent time period, using the price, multiplier, and the previous period’s EMA value. It is computed using the following formula:

##### Current EMA = [Closing Price – EMA (Previous Time Period)] x Multiplier + EMA (Previous Time Period)

The weighting given to recent price data is higher for a longer-period EMA than a shorter-period EMA. A multiplier of 18.18% is applied to the recent price points of a 10-period EMA, whereas a 9.52% multiplier is applied for the recent price points of a 20-period EMA.

### Exponential Moving Average vs. Simple Moving Average

The main difference between the two technical indicators is the sensitivity that they place on price changes. The exponential moving average tends to show more sensitivity to recent price point changes. This makes the EMA more responsive to the latest price changes.

The formula for calculating the EMA tends to be complicated, but most charting tools make it easy for traders to follow an EMA. In contrast, the SMA applies equal weighting to all observations in the data set. It is easy to calculate, being obtained by taking the arithmetic mean of prices during the time period in question.

### More Resources

CFI is the official provider of the global Commercial Banking & Credit Analyst (CBCA)™ certification program, designed to help anyone become a world-class financial analyst. Through financial modeling courses, training, and exercises, anyone in the world can become a great analyst. To keep advancing your career, the additional CFI resources below will be useful: