smartMoney-logo
Join
search

Products

Moving Average Method: Meaning, Indicator, Types

timing-check

READING

clock-svg8 mins read

Do you recollect your school days when you had to calculate averages in math class? Also, do you remember how class averages were drawn to understand how students performed? 

Let’s get a quick refresher. If you and 4 other friends spend ₹400 on chocolates, then the ‘average’ money each friend would have to shell out would be ₹80. (You divide 400/5). That’s how you ‘average’ out the costs. 

But think about it – Do the ‘averages’ mean anything in the outside world? Can they actually serve a purpose? Well, the truth is that the ‘averages’ concept forms a very important part of the real world, especially the stock markets. Traders can draw out the average of stock prices, currencies, or even commodities over a period to understand the current price trend. The concept of averages, thus, finds application beyond theory, too. 

Did you ever think that a simple concept you learned in school would have an impact on your investments? Now that you understand, let’s quickly understand how averages work and how you can use them to navigate markets.  

What are Moving Averages?

The calculation of the average is based on a simple formula: you must first sum up the digits (or prices) and then divide by the number of digits. See this: 2+3+5+7+11 =28. The ‘28’ is the sum of the first five prime numbers. Now, we divide this number by ‘5’, the number of digits. You then get the average of the first five prime numbers as 5.6. 

A popular technical analysis tool called the moving average follows this exact principle. 

The Moving Average is a tool used to even out price fluctuations by calculating an ongoing average price over a certain timeframe. As new data comes in, the moving average updates by incorporating the latest prices and dropping the oldest ones. Traders widely use this method to spot trends and understand market direction. It simplifies the complex data in financial markets, making trends easier to spot. Here, we go beyond the old data and move to the latest price, hence the name ‘moving.’ This constant updating ensures that the moving average remains relevant to the changing prices and time. 

Types of Moving Averages

There are several different types of moving averages that traders use on a day-to-day basis to identify trends and price movements. We’ll cover the commonly used types of moving averages below. 

Simple Moving Average:

A Simple Moving Average (SMA), the most commonly used moving average type, is the arithmetic mean of a given set of prices over a specified number of periods, smoothing out price data to identify trends. It is calculated by summing up the prices for a certain period and then dividing by the number of prices.

Suppose you need to calculate the moving average for stock X with the following closing price data over 5 trading sessions –

Date

Closing price (In )

October 1

250.45

October 2

252

October 3

251.5

October 4

253

October 5

249.6

Total 

1,256.55

 

Now, you need to divide the sum of the closing prices under consideration, i.e. ₹1,256.55, by 5 (just like how we calculate a typical average), and your value would be 251.31. So, the moving average (5-Day SMA) of stock X over the last 5 trading sessions is 251.31. You will follow the same process to calculate the 5-Day SMA from October 2 to October 6. The closing price of stock X on October 1 will be excluded to calculate the moving average from October 2 to October 6. This example illustrates how we discard the old data and move to the latest price, thereby giving the name ‘moving’.

You can use the formula below to calculate the moving average –

SMA  = X1+ X2+X3...Xn/n

Here, ‘X’ is different stock prices, and ‘n’ is the period.

The SMA can be calculated using various data points beyond just the closing prices, including opening prices, high and low prices of the trading session, or any other relevant data points. The flexibility of the SMA extends to its period as well; it can be computed over any time frame, ranging from minutes and hours to days, weeks, months, or even years, depending on the analysis requirement.

Additionally, the SMA can be plotted for various periods such as 5, 10, 50, 100, 200, etc. These periods can represent any time interval, such as 5-Day SMA, 10-Day SMA, and so forth, making it a versatile tool for analysing trends over different time frames. This adaptability allows traders and analysts to use SMA lines for a wide array of financial instruments and in diverse market conditions to gauge trend direction and momentum.

Below is the image representation of a 50, 100, and 200-day SMA –

Exponential Moving Average (EMA):

The Exponential Moving Average (EMA) is a type of moving average that emphasises more on the most recent price data, making it more responsive to new information compared to the SMA. Unlike the SMA, which treats all data points equally, the EMA gives increasing weight to more recent prices, reflecting their greater relevance to current market conditions.

EMA is a widely used technical analysis tool that helps traders understand the trend direction of a security's price by averaging past prices, with a focus on recent ones. It's important to note that EMAs are considered lagging indicators—they don't predict future prices but rather illustrate the current trend based on past data. So, while they can guide trading in line with the trend, they do not guarantee perfect entry and exit points due to their inherent lag.

EMA may detect trends sooner due to its sensitivity to recent price movements and is particularly useful for analysing short-term price fluctuations and identifying trend directions.

A rising EMA suggests a potential buying opportunity, signalling an uptrend, while a falling EMA may indicate a downtrend, suggesting a selling point. 

The formula for calculating the EMA is given by:

EMA = (K×(C−P))+P

where:

C is the current price,

P is the EMA of the previous period,

K is the smoothing constant, calculated as 2/(n+1), with n being the number of periods.

As an example, let's walk through the EMA calculation with a new set of numbers:

Start with calculating the SMA for a chosen period, say 7 days. If the closing prices for these 7 days are 11, 12, 13, 14, 15, 16, and 17, then:

SMA = (11+12+13+14+15+16+17)/7=14

Next, determine the weighting multiplier using the formula for K. 

For a 7-day period:

K=2/(7+1)=0.25

Finally, calculate the EMA using the current price, the previous EMA (which can be approximated by the SMA for the first calculation), and the multiplier. If the current price is 18 and using the SMA as the previous EMA:

EMA=(0.25×(18−14))+14=15

This example shows how the EMA incorporates the most recent price data, with the latest prices having a more significant impact on the value of the moving average.

Weighted Moving Average (WMA)

This moving average type assigns weight to the price of each period, wherein more emphasis is placed on more recent periods. In WMA calculations, each observation is multiplied by a certain weight. 

WMA = (Price 1 x n) + ( Price 2 x (n-1)) +...Price n/ {nx(n+1)}/2

Let’s use an example to understand how WMA is calculated.  

Date

Closing

Weight

Weighted Average

October 12

₹80

1/15

5.33

October 13

₹82

2/15

10.93

October 14

₹84

3/15

16.8

October 15

₹83

4/15

22.13

October 16

₹81

5/15

27

 

Do you see how the latest and most relevant price data is assigned the highest weight? 

In this case, according to the formula, 

WMA = 5.33+ 10.93+ 16.6+ 22.13+ 27 = 81.99

Moving Average Crossover System

Now that you understand the basics of moving averages, it is important to recognise that relying solely on the Simple Moving Average (SMA) might not cut it in the intricate landscape of modern markets. You may consider mixing and matching various moving averages instead. This will enable you to more effectively pinpoint trends, as well as optimal entry and exit points, a strategy widely adopted by modern traders.

Below are a few SMA strategies:

  • SMA price crossover

In this strategy, the focus is on spotting potential shifts in market trends by observing the reactions between the price of a stock and a moving average. Note the keywords here – price and moving average. 

The concept is straightforward: when the price surpasses the moving average (imagine a candlestick cutting over an SMA line), it may be interpreted as a bullish signal, suggesting a possible upward trend. This can be treated as a trigger for ‘buy.’ Reverse the situation now: if the price is falling below the SMA line, then it can be an indication of a downtrend, prompting a sell signal.

Traders can plot any 20, 50 or 100 Day SMA on a chart to understand the crossover and spot the trend. 

  • Double SMA price crossover

The strategy here is to employ two distinct moving averages with varying time frames and observe their crossover to detect entry and exit points and overall trends. Traders can use identical moving averages, such as two simple moving averages or a combination of different moving averages, like an SMA and an EMA. 

So when the shorter SMA crossovers, the longer SMA line, it can be treated as a bullish sign. But if the shorter moving average crosses below the longer moving average line, then it can be considered a bearish sign. 

Let’s take a 20-day EMA and a 50-day EMA. The 20-day EMA, in this case, is the shorter moving average and will take fewer price points to arrive at an average. And for the same reason, is closer to the price ranges and reacts faster to change. The opposite is true for the 50-day EMA, which is the longer moving average, is away from the price range in comparison, and reacts slower. 

Now, some very interesting concepts emerge when these crossovers take place – Golden Cross and Death Cross.

A buy signal would be generated when the shorter moving average (20 Day EMA) cuts the longer moving average (50 Day EMA) from below. The cut point is referred to as the ‘Golden Cross.’ Now, when the shorter average moves downwards and cuts the longer average, it can generate a sell signal, and the cut point is called the ‘Death Cross.’ 

Real-Life Application of Moving Averages

Easy to calculate and understand, moving averages find wide applicability in the arena of technical analysis. Traders extensively use moving averages to gain insights into the price behaviour of a stock. By calculating the average price of a stock over a period, moving averages smoothen out short-term fluctuations and help reveal the underlying trend. 

For example, consider the commonly used 200-day moving average, which calculates the average price of stock over the past 200 trade sessions. Now, traders often compare the current price of a stock to its 200-day moving average to determine long-term trends. If the current price is above the 200-day SMA, it may suggest a bullish trend, and on the other hand, if it is below the 200-day SMA, it may indicate a bearish trend. 

Moving averages can also help identify support levels (where stocks find buying interest and bounce back) and resistance levels (where selling pressure is high). And as discussed above, the crossover method can help generate buy and sell signals.  

Above all, do note that moving averages are not restricted just to finance and investing. They find an array of practical applications in the fields of economics, manufacturing, weather forecasting, and more.  

This brings us to the end of the chapter about moving averages. In the next chapter, we will explore the concept of stop loss.

circle-menu