Definition: what is a moving average?
A moving average is a statistical method used to smooth data series over a specific period. It is particularly useful in technical analysis, as it helps identify trends and filter out short-term price fluctuations. By calculating an average value from a set number of data points, it creates a dynamic line that updates with each new value.
This tool is often used to determine the overall market direction and to identify key signals such as buy or sell points. It provides a clearer overview of price movements, helping investors make better-informed decisions. Moving averages are easy to use and form a valuable basis for well-founded market analysis.
Types of moving averages
There are various types of moving averages, mainly differing in their calculation methods. The two most common types are the simple moving average (SMA) and the exponential moving average (EMA). Both are used to analyse price movements, and each has specific advantages and disadvantages, which can be leveraged depending on the trading strategy.
Simple moving average
The simple moving average (SMA) is the most basic form of a moving average. It is calculated by taking the average closing price over a set number of days or periods. For example, a 10-day SMA is the mean of the last ten closing prices. As a new closing price is added, the oldest one is removed from the calculation, keeping the line dynamic.
This method is particularly popular among beginners, as it is easy to calculate and understand. The SMA helps identify the overall trend direction and is often used as a foundation for buy or sell signals, especially when combined with other indicators. However, the SMA reacts more slowly to sudden price changes, as all data points are weighted equally.
Exponential moving average
The exponential moving average (EMA) places greater weight on recent price movements. This is achieved by applying a weighting factor that gives more significance to recent data points. As a result, the EMA is more sensitive to short-term changes, making it particularly useful for traders looking to capitalise on fast market movements.
One advantage of the EMA is its ability to detect current trends more quickly, making it appealing for short-term trading strategies and volatile markets. However, its higher sensitivity can also lead to more frequent reactions to short-term fluctuations, which are not always relevant.
Moving average – an example
A practical example of a moving average is a 10-day SMA (Simple Moving Average). Suppose the closing prices over the last ten trading days were £100, £102, £101, £103, £105, £107, £108, £110, £109, and £111.
The simple moving average is calculated by summing these values and dividing by the number of days (10). In this case, the SMA equals £105.60.
This value represents the average closing price over the past ten days and indicates the general trend direction. With each new trading day, the oldest closing price is removed, and the latest one is added, ensuring that the moving average remains up to date. On a price chart, this value is displayed as a line that smooths price movements and reduces fluctuations.
In practice, a trader could use this SMA to determine whether the current price is above or below the average:
If the price is above the moving average, this often indicates an uptrend
If it is below the moving average, this could suggest a downtrend
Why choose a 10-day SMA instead of a 50- or 200-day SMA?
The choice of period depends on the trading strategy:
Short-term traders use 10- to 20-day SMAs to get quick signals for short-term market movements
Swing traders (who hold positions for several days to weeks) use 50-day SMAs to identify mid-term trends
Long-term investors prefer 100- or 200-day SMAs to detect large market trends and make long-term decisions
Depending on the strategy, a shorter or longer period may be more suitable.
How to calculate the moving average
Calculating a moving average is straightforward and can be done in different ways, depending on whether you want to use a simple moving average (SMA) or an exponential moving average (EMA). Below are the calculation methods for both:
Simple moving average (SMA)
Collect data: Record the closing prices over the desired number of days (e.g. 10 days)
Sum the values: Add up the closing prices for the selected period
Calculate the average: Divide the sum by the number of days
Example:For a 10-day SMA with closing prices of £100, £102, £101, £103, £105, £107, £108, £110, £109, and £111, the calculation is:
Exponential moving average (EMA)
The EMA places more emphasis on recent price movements and is slightly more complex:
Calculate the starting point: Use the SMA as the base value for the first EMA calculation
Determine the weighting factor: The factor is calculated using the formula:Weighting factor = 2 / (number of periods + 1)
For a 10-day EMA, the factor is 0.1818
Calculate the EMA using the formula:EMA = (current price - previous day's EMA) × weighting factor + previous day's EMA