Tag Archive for: Hull Moving Average (HMA)

Moving Averages – how to calculate them

| 1-8-2017 | Lionel Pavey |


In the second article in this series we will be looking at different types of moving averages. Moving averages are used to determine the current trend of a price. They filter out the extremes within a range of data and present a smoother picture. They are almost exclusively calculated using the arithmetic mean. Some studies have been done using the median, though no advantages have been discovered. The following 3 methods are the most common approaches. In all following examples we shall assume an average calculated over a continuous series of 10 data points.

Simple Moving Average (SMA)

We take 10 consecutive values and calculate the simple arithmetic mean. When we calculate the next value we drop the oldest value in the series and add the newest value. We are constantly using the most current data in our calculation. Every data point receives the same weighting i.e. 10 per cent of the complete series. Whilst being very easy to calculate criticism is levelled at the fact that all data points receive the same weighting. This can distort the average when the market is volatile – more recent data is closer to the true market price.

Weighted Moving Average (WMA)

Here the 10 data points are assigned different weights, usually based on a simple mathematical progression. The 10th data point (most recent data) would be multiplied by 10; the 9th data point (second most recent data) would be multiplied by 9; etc. The product of these calculations would then be divided by 55 to produce a weighted average. This weighted average applies more importance on the most recent prices and, therefore, more closely match the current price.

Exponential Moving Average (EMA)

This is another form of a weighted average, but the weighting factors decrease exponentially. As such, whilst the older data points decrease exponentially in value, they never stop. Therefore, this average encompasses considerably more data than the previous 2 examples whilst still being an average calculated with only 10 data points.

The results

EMA is more responsive than SMA. An EMA graph will accelerate faster, turn quicker and fall faster than a SMA graph. This is due to the weighting given to the most recent data. However, these are all lagging indicators – they will always be behind the price. Furthermore, if a market is trapped in a very small trading range the averages will not be as smooth as the actual data. One of the main goals of using averages is to see if prices break out of a range and start a new trend.

Moving averages can be used simply to see what the current trend is. They can be further used by applying different 2 moving averages (one for 10 days and another for 50 days) to ascertain the change in momentum by 2 different time lines. But they all lag the market data.

Most of the time prices will tend to concentrate in a small area, with occasional larger movements up or down establishing the next area of consolidation. Is there an alternative way to design moving averages that take this into consideration?

Adaptive Moving Average (AMA)

Instead of just weighting the data, AMA also look at the price volatility. When prices are in a small range AMA will notice this lack of volatility and provide a trendline that is almost flat. As prices break out of the range AMA will move quickly up or down, depending on the change in prices. The advantages of AMA are that, visually, when prices are reasonably flat (little volatility) a clear flat line is shown so that even if the actual market price is lower than the AMA, it is clear that it is still within a range. As AMA is more sensitive to volatility, it can contain more data about the current trend. An initial breakout from a tight range will result in a very steep line for AMA. The trend can continue, but AMA will clearly show earlier than other averages when the trend is weakening. The only basic problem with AMA is the calculation – it is far more complex to calculate and is not so intuitive when you come to explain it to someone who does not know it.

As stated earlier, all moving averages suffer from lag – they are behind the actual price curve. Our last example is an average that attempts to remove this lag, whilst being more reactive to the current price.

Hull Moving Average (HMA)

Initially, a WMA is taken for 10 data points. Then a WMA is taken for half this period (5 data points) and is calculated with the 5 newest data points. The difference between these 2 is then combined with the WMA for the shorter period to arrive at a new average – the HMA.

The HMA is faster, smoother and eliminates most of the lag that is present in the other moving averages. In fact, it most closely resembles the actual market data.

All these averages are used to attempt to show what the trend is in the actual price, whilst filtering out the noise from all the prices, and presenting the data in a smooth form. Yet again, as previously mentioned, a change in the underlying fundamentals of the price will always have more impact on the price than any form of technical analysis.

However, if we concede that for a large majority of time prices are just trending, a moving average can be used to try and predict when the prices have moved out of their range and are on a new path with fresh momentum until that slows down and the following range is established.

When charting data we need to appreciate the amount of data we will be producing. Even if we just use the price at the start of the day, or the end of the day, we will accumulate at least 255 data points every year. If prices are in a small range, then more data is added to the chart series to provide a more dynamic picture. But this can make the visual data more cluttered once we include the actual data and 1 or 2 moving averages. Would it not be better if we could eliminate time and just look at price?

Read also my first article in this series where I tell you more about several types of forecasts.

In the last article in this series I will look at 2 common methods of showing price data devoid of timelines.

Lionel Pavey

 

Lionel Pavey

Cash Management and Treasury Specialist